3 int main(
int argc,
char *argv[])
8 std::cout <<
"Setting nodes." << std::endl;
17 std::cout <<
"Building Mesh." << std::endl;
18 con[0].push_back(1); con[0].push_back(2);
19 con[0].push_back(3); con[0].push_back(4);
20 con[1].push_back(5); con[1].push_back(6);
21 con[1].push_back(7); con[1].push_back(8);
22 con[2].push_back(1); con[2].push_back(2);
23 con[2].push_back(6); con[2].push_back(5);
24 con[3].push_back(2); con[3].push_back(3);
25 con[3].push_back(7); con[3].push_back(6);
26 con[4].push_back(3); con[4].push_back(4);
27 con[4].push_back(8); con[4].push_back(7);
28 con[5].push_back(4); con[5].push_back(1);
29 con[5].push_back(5); con[5].push_back(8);
31 std::cout <<
"Getting Inverse." << std::endl;
33 std::cout <<
"Creating points." << std::endl;
34 std::vector<GeoPrim::CPoint>
points;
43 points.push_back(point1); points.push_back(point2);
44 points.push_back(point3); points.push_back(point4);
45 points.push_back(point5); points.push_back(point6);
46 points.push_back(point7); points.push_back(point8);
47 std::cout <<
"Building box." << std::endl;
50 std::cout <<
"Searching for points" << std::endl;
51 std::vector<GeoPrim::CPoint>::iterator
pi = points.begin();
52 while(pi != points.end()){
56 std::cout <<
"Could not find point " << point_number
57 <<
" in the mesh" << std::endl;
59 std::cout <<
"Found point " << point_number <<
" in element "
60 << element_id <<
" with natc = " << natc << std::endl;
62 nodal_coords[0].
init(nc[con[element_id-1][0]]);
63 nodal_coords[1].
init(nc[con[element_id-1][1]]);
64 nodal_coords[2].
init(nc[con[element_id-1][2]]);
65 nodal_coords[3].
init(nc[con[element_id-1][3]]);
69 std::cout <<
"The interpolated coordinates are: " << point_coords << std::endl;
General connectivity object.
Mesh::IndexType FindPointInMesh_2(const GeoPrim::CPoint &p, const NodalCoordinates &nc, const Connectivity &ec, const Connectivity &dc, const GeoPrim::CBox &box, GeoPrim::CVector &natc)
Locate element containing given physical point.
void Inverse(Connectivity &, IndexType nnodes=0) const
CVector & init(const CPoint &p)
void interpolate(const GeoPrim::CVector f[], const GeoPrim::CVector &nc, GeoPrim::CVector &) const
int main(int argc, char *argv[])
IRAD::Primitive::IndexType IndexType
void init_node(IndexType n, const GeoPrim::CPoint &)