#include <SimpleMesh.h>
Public Member Functions | |
Square (GiNaC::ex x0, GiNaC::ex xn, int nx, int ny) | |
~Square () | |
int | no_of_triangles () |
int | no_of_boundary_nodes () |
Triangle | triangle (int i) |
GiNaC::ex | boundary_node (int i) |
Private Attributes | |
GiNaC::ex | x0 |
GiNaC::ex | xn |
int | nx |
int | ny |
Definition at line 7 of file SimpleMesh.h.
|
Definition at line 3 of file SimpleMesh.cpp. References nx, ny, x0, and xn.
|
|
Definition at line 12 of file SimpleMesh.h.
|
|
Definition at line 18 of file SimpleMesh.cpp. References DUMMY, no_of_boundary_nodes(), nx, ny, x0, and xn. 00018 { 00019 if (i>= 0 && i <= nx-1 ) { 00020 GiNaC::ex dx = (xn.op(0) - x0.op(0))/(nx-1); 00021 return GiNaC::lst(x0.op(0) + (i-1)*dx, x0.op(1)); 00022 } else if (i >= nx && i <= nx+ny-2) { 00023 GiNaC::ex dy = (xn.op(1) - x0.op(1))/(ny-1); 00024 return GiNaC::lst(xn.op(0), x0.op(1) + (i-nx)*dy); 00025 } else if (i >= nx+ny-1 && i <= 2*nx+ny-3) { 00026 GiNaC::ex dx = (xn.op(0) - x0.op(0))/(nx-1); 00027 return GiNaC::lst(xn.op(0) - dx*(i-nx-ny+1) , xn.op(1)); 00028 } else if (i >= 2*nx+ny-2&& i <= no_of_boundary_nodes() ) { 00029 GiNaC::ex dy = (xn.op(1) - x0.op(1))/(ny-1); 00030 return GiNaC::lst(x0.op(0), xn.op(1) - (i-2*nx-ny+2)*dy); 00031 } 00032 return DUMMY; 00033 }
|
|
Definition at line 14 of file SimpleMesh.cpp. Referenced by boundary_node().
|
|
Definition at line 10 of file SimpleMesh.cpp.
|
|
Definition at line 35 of file SimpleMesh.cpp. References DUMMY, nx, ny, x0, and xn. 00035 { 00036 GiNaC::ex dx = (xn.op(0) - x0.op(0))/(nx-1); 00037 GiNaC::ex dy = (xn.op(1) - x0.op(1))/(ny-1); 00038 00039 int box = (i-1)/2+1; 00040 00041 GiNaC::ex p0,p1,p2,p3; 00042 p0 = GiNaC::lst(0,0,0); 00043 p0 = GiNaC::lst(x0.op(0) + ((box-1)%(nx-1))*dx, x0.op(1) + ((box-1)/(ny-1))*dy); 00044 p1 = GiNaC::lst(x0.op(0) + (((box-1)%(nx-1))+1)*dx, x0.op(1) + ((box-1)/(ny-1))*dy); 00045 p2 = GiNaC::lst(x0.op(0) + ((box-1)%(nx-1))*dx, x0.op(1) + (((box-1)/(ny-1))+1)*dy); 00046 p3 = GiNaC::lst(x0.op(0) + (((box-1)%(nx-1))+1)*dx, x0.op(1) + (((box-1)/(ny-1))+1)*dy); 00047 00048 if (i%2 == 1) { 00049 return Triangle(p0,p1,p2); 00050 } else if ( i%2 == 0) { 00051 return Triangle(p3,p1,p2); 00052 } 00053 return Triangle(DUMMY,DUMMY,DUMMY); 00054 }
|
|
Definition at line 9 of file SimpleMesh.h. Referenced by boundary_node(), no_of_boundary_nodes(), no_of_triangles(), Square(), and triangle(). |
|
Definition at line 9 of file SimpleMesh.h. Referenced by boundary_node(), no_of_boundary_nodes(), no_of_triangles(), Square(), and triangle(). |
|
Definition at line 8 of file SimpleMesh.h. Referenced by boundary_node(), Square(), and triangle(). |
|
Definition at line 8 of file SimpleMesh.h. Referenced by boundary_node(), Square(), and triangle(). |