30 #ifndef CORE_DATATYPES_VUNSTRUCTUREDMESH_H
31 #define CORE_DATATYPES_VUNSTRUCTUREDMESH_H
82 virtual void mlocate(std::vector<VMesh::Node::index_type> &i,
const std::vector<Core::Geometry::Point> &point)
const;
83 virtual void mlocate(std::vector<VMesh::Elem::index_type> &i,
const std::vector<Core::Geometry::Point> &point)
const;
90 virtual void minterpolate(std::vector<Core::Geometry::Point> &p,
91 const std::vector<VMesh::coords_type> &coords,
123 unsigned int which_edge,
124 unsigned int div_per_unit)
const;
128 unsigned int which_face,
129 unsigned int div_per_unit)
const;
152 virtual void node_reserve(
size_t size);
153 virtual void elem_reserve(
size_t size);
154 virtual void resize_nodes(
size_t size);
155 virtual void resize_elems(
size_t size);
168 int basis_order)
const;
173 int basis_order)
const;
175 virtual void get_minterpolate_weights(
const std::vector<Core::Geometry::Point>& point,
177 int basis_order)
const;
179 virtual void get_minterpolate_weights(
const std::vector<VMesh::coords_type>& coords,
182 int basis_order)
const;
186 int basis_order)
const;
191 int basis_order)
const;
193 virtual void get_mgradient_weights(
const std::vector<Core::Geometry::Point>& point,
195 int basis_order)
const;
197 virtual void get_mgradient_weights(
const std::vector<VMesh::coords_type>& coords,
200 int basis_order)
const;
202 virtual bool find_closest_node(
double& pdist,
207 virtual bool find_closest_node(
double& pdist,
211 double maxdist)
const;
213 virtual bool find_closest_nodes(std::vector<VMesh::Node::index_type> &nodes,
215 double maxdist)
const;
217 virtual bool find_closest_nodes(std::vector<double> &distances,
218 std::vector<VMesh::Node::index_type> &nodes,
220 double maxdist)
const;
222 virtual bool find_closest_elem(
double& pdist,
228 virtual bool find_closest_elem(
double& pdist,
233 double maxdist)
const;
244 template <
class MESH>
250 this->mesh_->size(s);
254 template <
class MESH>
260 this->mesh_->size(s);
264 template <
class MESH>
270 this->mesh_->size(s);
274 template <
class MESH>
280 this->mesh_->size(s);
284 template <
class MESH>
290 this->mesh_->size(s);
294 template <
class MESH>
300 this->mesh_->size(s);
304 template <
class MESH>
310 this->mesh_->size(s);
317 template <
class MESH>
322 return(this->mesh_->locate_node(idx,point));
325 template <
class MESH>
330 return(this->mesh_->locate_elem(idx,point));
334 template <
class MESH>
339 return(this->mesh_->locate_elems(array,bbox));
342 template <
class MESH>
349 return(this->mesh_->locate_elem(idx,coords,point));
353 template <
class MESH>
356 mlocate(std::vector<VMesh::Node::index_type> &idx,
const std::vector<Core::Geometry::Point> &point)
const
358 idx.resize(point.size());
359 for (
size_t i=0; i<point.size(); i++)
361 if(!(this->mesh_->locate_node(idx[i],point[i]))) idx[i] = -1;
365 template <
class MESH>
368 mlocate(std::vector<VMesh::Elem::index_type> &idx,
const std::vector<Core::Geometry::Point> &point)
const
370 idx.resize(point.size());
371 for (
size_t i=0; i<point.size(); i++)
373 if(!(this->mesh_->locate_elem(idx[i],point[i]))) idx[i] = -1;
377 template <
class MESH>
387 template <
class MESH>
397 template <
class MESH>
401 const std::vector<VMesh::coords_type>& coords,
404 p.resize(coords.size());
405 for (
size_t i=0; i<coords.size(); i++)
409 template <
class MESH>
419 template <
class MESH>
426 return(this->mesh_->get_elem_neighbor(neighbor,elem,delem));
430 template <
class MESH>
437 return(this->mesh_->get_elem_neighbors(array,elem,delem));
440 template <
class MESH>
446 this->mesh_->get_elem_neighbors(array,idx);
449 template <
class MESH>
455 this->mesh_->get_node_neighbors(array,idx);
459 template <
class MESH>
463 unsigned int which_edge,
464 unsigned int div_per_unit)
const
466 this->basis_->approx_edge(which_edge, div_per_unit, coords);
469 template <
class MESH>
473 unsigned int which_face,
474 unsigned int div_per_unit)
const
476 this->basis_->approx_face(which_face, div_per_unit, coords);
480 template <
class MESH>
487 this->mesh_->size(sz);
491 template <
class MESH>
501 template <
class MESH>
512 template <
class MESH>
524 template <
class MESH>
532 template <
class MESH>
541 template <
class MESH>
546 this->mesh_->node_reserve(size);
549 template <
class MESH>
554 this->mesh_->elem_reserve(size);
557 template <
class MESH>
562 this->mesh_->resize_nodes(size);
565 template <
class MESH>
570 this->mesh_->resize_elems(size);
573 template <
class MESH>
581 template <
class MESH>
589 template <
class MESH>
597 template <
class MESH>
605 template <
class MESH>
614 template <
class MESH>
619 p = this->mesh_->points_[idx];
622 template <
class MESH>
627 if (this->num_enodes_per_elem_)
629 this->basis_->get_node_value(p,static_cast<VMesh::index_type>(idx));
637 template <
class MESH>
645 template <
class MESH>
653 template <
class MESH>
661 template <
class MESH>
669 template <
class MESH>
677 template <
class MESH>
683 for (
size_t j=0; j <array.size(); j++)
689 template <
class MESH>
695 for (
size_t j=0; j <array.size(); j++)
703 template <
class MESH>
708 this->mesh_->points_[i] = point;
711 template <
class MESH>
716 if (this->num_enodes_per_elem_)
718 if (this->mesh_->edges_.size() != this->basis_->size_node_values())
720 this->basis_->resize_node_values(this->mesh_->edges_.size());
722 this->basis_->set_node_value(point,i);
726 ASSERTFAIL(
"CurveMesh does not contain Lagrangian nodes that can be edited");
730 template <
class MESH>
735 if (this->mesh_->points_.size() == 0)
return (0);
736 return (&(this->mesh_->points_[0]));
739 template <
class MESH>
747 template <
class MESH>
753 this->basis_->add_node_value(point);
756 template <
class MESH>
766 template <
class MESH>
776 template <
class MESH>
783 template <
class MESH>
788 this->mesh_->get_normal(norm,coords,i,j);
791 template <
class MESH>
796 int basis_order)
const
800 if(this->mesh_->locate(elem,point))
812 this->mesh_->get_coords(coords,point,elem);
819 ei.
weights.resize(this->basis_->num_linear_weights());
820 this->basis_->get_linear_weights(coords,&(ei.
weights[0]));
821 this->mesh_->get_nodes_from_elem(ei.
node_index,elem);
824 ei.
weights.resize(this->basis_->num_quadratic_weights());
825 this->basis_->get_quadratic_weights(coords,&(ei.
weights[0]));
826 this->mesh_->get_nodes_from_elem(ei.
node_index,elem);
827 this->mesh_->get_edges_from_elem(ei.
edge_index,elem);
830 ei.
weights.resize(this->basis_->num_cubic_weights());
831 this->basis_->get_cubic_weights(coords,&(ei.
weights[0]));
832 this->mesh_->get_nodes_from_elem(ei.
node_index,elem);
836 ASSERTFAIL(
"Interpolation of unknown order requested");
839 template <
class MESH>
845 int basis_order)
const
855 ei.
weights.resize(this->basis_->num_linear_weights());
856 this->basis_->get_linear_weights(coords,&(ei.
weights[0]));
857 this->mesh_->get_nodes_from_elem(ei.
node_index,elem);
860 ei.
weights.resize(this->basis_->num_quadratic_weights());
861 this->basis_->get_quadratic_weights(coords,&(ei.
weights[0]));
862 this->mesh_->get_nodes_from_elem(ei.
node_index,elem);
863 this->mesh_->get_edges_from_elem(ei.
edge_index,elem);
866 ei.
weights.resize(this->basis_->num_cubic_weights());
867 this->basis_->get_cubic_weights(coords,&(ei.
weights[0]));
868 this->mesh_->get_nodes_from_elem(ei.
node_index,elem);
872 ASSERTFAIL(
"Interpolation of unknown order requested");
876 template <
class MESH>
881 int basis_order)
const
883 ei.resize(point.size());
890 for (
size_t i=0; i<ei.size();i++)
892 if (i == 0) elem = ei[0].elem_index;
893 if(this->mesh_->locate(elem,point[i]))
895 ei[i].basis_order = basis_order;
896 ei[i].elem_index = elem;
900 ei[i].basis_order = basis_order;
901 ei[i].elem_index = -1;
909 for (
size_t i=0; i<ei.size();i++)
911 if (i == 0) elem = ei[0].elem_index;
912 if(this->mesh_->locate(elem,point[i]))
914 this->mesh_->get_coords(coords,point[i],elem);
915 ei[i].basis_order = basis_order;
916 ei[i].elem_index = elem;
917 ei[i].weights.
resize(this->basis_->num_linear_weights());
918 this->basis_->get_linear_weights(coords,&(ei[i].weights[0]));
919 this->mesh_->get_nodes_from_elem(ei[i].node_index,elem);
923 ei[i].basis_order = basis_order;
924 ei[i].elem_index = -1;
933 for (
size_t i=0; i<ei.size();i++)
935 if (i == 0) elem = ei[0].elem_index;
936 if(this->mesh_->locate(elem,point[i]))
938 this->mesh_->get_coords(coords,point[i],elem);
939 ei[i].basis_order = basis_order;
940 ei[i].elem_index = elem;
941 ei[i].weights.
resize(this->basis_->num_quadratic_weights());
942 this->basis_->get_quadratic_weights(coords,&(ei[i].weights[0]));
943 this->mesh_->get_nodes_from_elem(ei[i].node_index,elem);
944 this->mesh_->get_edges_from_elem(ei[i].edge_index,elem);
948 ei[i].basis_order = basis_order;
949 ei[i].elem_index = -1;
958 for (
size_t i=0; i<ei.size();i++)
960 if (i == 0) elem = ei[0].elem_index;
961 if(this->mesh_->locate(elem,point[i]))
963 this->mesh_->get_coords(coords,point[i],elem);
964 ei[i].basis_order = basis_order;
965 ei[i].elem_index = elem;
966 ei[i].weights.
resize(this->basis_->num_cubic_weights());
967 this->basis_->get_cubic_weights(coords,&(ei[i].weights[0]));
968 this->mesh_->get_nodes_from_elem(ei[i].node_index,elem);
969 ei[i].num_hderivs = this->basis_->num_hderivs();
973 ei[i].basis_order = basis_order;
974 ei[i].elem_index = -1;
980 ASSERTFAIL(
"Interpolation of unknown order requested");
983 template <
class MESH>
989 int basis_order)
const
991 ei.resize(coords.size());
993 for (
size_t i=0; i<coords.size(); i++)
995 ei[i].basis_order = basis_order;
996 ei[i].elem_index = elem;
1004 for (
size_t i=0; i<coords.size(); i++)
1006 ei[i].weights.resize(this->basis_->num_linear_weights());
1007 this->basis_->get_linear_weights(coords[i],&(ei[i].weights[0]));
1008 this->mesh_->get_nodes_from_elem(ei[i].node_index,elem);
1012 for (
size_t i=0; i<coords.size(); i++)
1014 ei[i].weights.resize(this->basis_->num_quadratic_weights());
1015 this->basis_->get_quadratic_weights(coords[i],&(ei[i].weights[0]));
1016 this->mesh_->get_nodes_from_elem(ei[i].node_index,elem);
1017 this->mesh_->get_edges_from_elem(ei[i].edge_index,elem);
1021 for (
size_t i=0; i<coords.size(); i++)
1023 ei[i].weights.resize(this->basis_->num_cubic_weights());
1024 this->basis_->get_cubic_weights(coords[i],&(ei[i].weights[0]));
1025 this->mesh_->get_nodes_from_elem(ei[i].node_index,elem);
1026 ei[i].num_hderivs = this->basis_->num_hderivs();
1030 ASSERTFAIL(
"Interpolation of unknown order requested");
1034 template <
class MESH>
1040 int basis_order)
const
1045 switch (basis_order)
1050 eg.
weights.resize(this->basis_->num_linear_derivate_weights());
1051 this->basis_->get_linear_derivate_weights(coords,&(eg.
weights[0]));
1052 this->mesh_->get_nodes_from_elem(eg.
node_index,elem);
1059 eg.
weights.resize(this->basis_->num_quadratic_derivate_weights());
1060 this->basis_->get_quadratic_derivate_weights(coords,&(eg.
weights[0]));
1061 this->mesh_->get_nodes_from_elem(eg.
node_index,elem);
1062 this->mesh_->get_edges_from_elem(eg.
edge_index,elem);
1069 eg.
weights.resize(this->basis_->num_cubic_derivate_weights());
1070 this->basis_->get_cubic_derivate_weights(coords,&(eg.
weights[0]));
1071 this->mesh_->get_nodes_from_elem(eg.
node_index,elem);
1079 ASSERTFAIL(
"Gradient of unknown order requested");
1085 template <
class MESH>
1090 int basis_order)
const
1097 if(!(this->mesh_->locate(elem,point)))
1103 this->mesh_->get_coords(coords,point,elem);
1107 switch (basis_order)
1112 eg.
weights.resize(this->basis_->num_linear_derivate_weights());
1113 this->basis_->get_linear_derivate_weights(coords,&(eg.
weights[0]));
1114 this->mesh_->get_nodes_from_elem(eg.
node_index,elem);
1121 eg.
weights.resize(this->basis_->num_quadratic_derivate_weights());
1122 this->basis_->get_quadratic_derivate_weights(coords,&(eg.
weights[0]));
1123 this->mesh_->get_nodes_from_elem(eg.
node_index,elem);
1124 this->mesh_->get_edges_from_elem(eg.
edge_index,elem);
1131 eg.
weights.resize(this->basis_->num_cubic_derivate_weights());
1132 this->basis_->get_cubic_derivate_weights(coords,&(eg.
weights[0]));
1133 this->mesh_->get_nodes_from_elem(eg.
node_index,elem);
1141 ASSERTFAIL(
"Gradient of unknown order requested");
1145 template <
class MESH>
1150 int basis_order)
const
1152 eg.resize(point.size());
1154 switch (basis_order)
1159 for (
size_t i=0; i< point.size(); i++)
1161 if(this->mesh_->locate(elem,point[i]))
1163 eg[i].basis_order = basis_order;
1164 eg[i].elem_index = elem;
1168 eg[i].basis_order = basis_order;
1169 eg[i].elem_index = -1;
1178 for (
size_t i=0; i< point.size(); i++)
1180 eg[i].basis_order = basis_order;
1181 if(this->mesh_->locate(elem,point[i]))
1183 eg[i].elem_index = elem;
1184 this->mesh_->get_coords(coords,point[i],elem);
1185 eg[i].weights.
resize(this->basis_->num_linear_derivate_weights());
1186 this->basis_->get_linear_derivate_weights(coords,&(eg[i].weights[0]));
1187 this->mesh_->get_nodes_from_elem(eg[i].node_index,elem);
1189 eg[i].inverse_jacobian.resize(9);
1190 this->mesh_->inverse_jacobian(coords,
typename MESH::Elem::index_type(elem),&(eg[i].inverse_jacobian[0]));
1191 eg[i].num_derivs = this->basis_->num_derivs();
1195 eg[i].elem_index = -1;
1204 for (
size_t i=0; i< point.size(); i++)
1206 eg[i].basis_order = basis_order;
1207 if(this->mesh_->locate(elem,point[i]))
1209 eg[i].elem_index = elem;
1210 this->mesh_->get_coords(coords,point[i],elem);
1211 eg[i].weights.
resize(this->basis_->num_quadratic_derivate_weights());
1212 this->basis_->get_quadratic_derivate_weights(coords,&(eg[i].weights[0]));
1213 this->mesh_->get_nodes_from_elem(eg[i].node_index,elem);
1214 this->mesh_->get_edges_from_elem(eg[i].edge_index,elem);
1216 eg[i].inverse_jacobian.resize(9);
1217 this->mesh_->inverse_jacobian(coords,
typename MESH::Elem::index_type(elem),&(eg[i].inverse_jacobian[0]));
1218 eg[i].num_derivs = this->basis_->num_derivs();
1222 eg[i].elem_index = -1;
1232 for (
size_t i=0; i< point.size(); i++)
1234 eg[i].basis_order = basis_order;
1235 if(this->mesh_->locate(elem,point[i]))
1237 eg[i].elem_index = elem;
1238 this->mesh_->get_coords(coords,point[i],elem);
1239 eg[i].weights.resize(this->basis_->num_cubic_derivate_weights());
1240 this->basis_->get_cubic_derivate_weights(coords,&(eg[i].weights[0]));
1241 this->mesh_->get_nodes_from_elem(eg[i].node_index,elem);
1242 eg[i].num_hderivs = this->basis_->num_hderivs();
1244 eg[i].inverse_jacobian.resize(9);
1245 this->mesh_->inverse_jacobian(coords,
typename MESH::Elem::index_type(elem),&(eg[i].inverse_jacobian[0]));
1246 eg[i].num_derivs = this->basis_->num_derivs();
1250 eg[i].elem_index = -1;
1256 ASSERTFAIL(
"Gradient of unknown order requested");
1261 template <
class MESH>
1267 int basis_order)
const
1269 eg.resize(coords.size());
1270 for (
size_t i=0; i< coords.size(); i++)
1272 eg[i].basis_order = basis_order;
1273 eg[i].elem_index = elem;
1276 switch (basis_order)
1281 for (
size_t i=0; i< coords.size(); i++)
1283 eg[i].weights.resize(this->basis_->num_linear_derivate_weights());
1284 this->basis_->get_linear_derivate_weights(coords[i],&(eg[i].weights[0]));
1285 this->mesh_->get_nodes_from_elem(eg[i].node_index,elem);
1287 eg[i].inverse_jacobian.resize(9);
1288 this->mesh_->inverse_jacobian(coords[i],
typename MESH::Elem::index_type(elem),&(eg[i].inverse_jacobian[0]));
1289 eg[i].num_derivs = this->basis_->num_derivs();
1293 for (
size_t i=0; i< coords.size(); i++)
1295 eg[i].weights.resize(this->basis_->num_quadratic_derivate_weights());
1296 this->basis_->get_quadratic_derivate_weights(coords[i],&(eg[i].weights[0]));
1297 this->mesh_->get_nodes_from_elem(eg[i].node_index,elem);
1298 this->mesh_->get_edges_from_elem(eg[i].edge_index,elem);
1300 eg[i].inverse_jacobian.resize(9);
1301 this->mesh_->inverse_jacobian(coords[i],
typename MESH::Elem::index_type(elem),&(eg[i].inverse_jacobian[0]));
1302 eg[i].num_derivs = this->basis_->num_derivs();
1306 for (
size_t i=0; i< coords.size(); i++)
1308 eg[i].weights.resize(this->basis_->num_cubic_derivate_weights());
1309 this->basis_->get_cubic_derivate_weights(coords[i],&(eg[i].weights[0]));
1310 this->mesh_->get_nodes_from_elem(eg[i].node_index,elem);
1311 eg[i].num_hderivs = this->basis_->num_hderivs();
1313 eg[i].inverse_jacobian.resize(9);
1314 this->mesh_->inverse_jacobian(coords[i],
typename MESH::Elem::index_type(elem),&(eg[i].inverse_jacobian[0]));
1315 eg[i].num_derivs = this->basis_->num_derivs();
1319 ASSERTFAIL(
"Gradient of unknown order requested");
1324 template <
class MESH>
1331 return(this->mesh_->find_closest_node(pdist,result,i,point));
1335 template <
class MESH>
1341 double maxdist)
const
1343 return(this->mesh_->find_closest_node(pdist,result,i,point,maxdist));
1346 template <
class MESH>
1351 double maxdist)
const
1353 return(this->mesh_->find_closest_nodes(nodes,point,maxdist));
1357 template <
class MESH>
1361 std::vector<VMesh::Node::index_type> &nodes,
1363 double maxdist)
const
1365 return(this->mesh_->find_closest_nodes(distances,nodes,point,maxdist));
1368 template <
class MESH>
1377 return(this->mesh_->find_closest_elem(pdist,result,coords,i,point));
1380 template <
class MESH>
1388 double maxdist)
const
1390 return(this->mesh_->find_closest_elem(pdist,result,coords,i,point,maxdist));
1393 template <
class MESH>
1400 return(this->mesh_->find_closest_elems(pdist,result,i,point));
Definition: VUnstructuredMesh.h:41
virtual void add_elem(const VMesh::Node::array_type &nodes, VMesh::Elem::index_type &i)
Add an element to a mesh.
Definition: VUnstructuredMesh.h:759
virtual double get_size(VMesh::Edge::index_type i) const
Get the geometrical size of topological mesh components.
Definition: VUnstructuredMesh.h:576
virtual bool find_closest_elems(double &pdist, Core::Geometry::Point &result, VMesh::Elem::array_type &i, const Core::Geometry::Point &point) const
Definition: VUnstructuredMesh.h:1396
std::vector< ElemInterpolate > MultiElemInterpolate
Definition: VMesh.h:208
Definition: FieldRNG.h:37
VDElemIndex< VMesh::index_type > index_type
Definition: VMesh.h:183
Distinct type for elem index.
Definition: FieldVIndex.h:228
StackVector< index_type, 8 > node_index
Definition: VMesh.h:199
std::vector< StackVector< double, 3 > > coords_array_type
An array of coords.
Definition: VMesh.h:83
virtual void pwl_approx_face(VMesh::coords_array2_type &coords, VMesh::Elem::index_type ci, unsigned int which_face, unsigned int div_per_unit) const
Definition: VUnstructuredMesh.h:471
VNodeIndex< VMesh::index_type > index_type
Definition: VMesh.h:107
StackVector< double, 9 > inverse_jacobian
Definition: VMesh.h:224
virtual void get_center(Core::Geometry::Point &point, VMesh::Node::index_type i) const
Get the center of a certain mesh element.
Definition: VUnstructuredMesh.h:617
virtual void get_dimensions(VMesh::dimension_type &dim)
Definition: VUnstructuredMesh.h:483
index_type elem_index
Definition: VMesh.h:198
virtual double inverse_jacobian(const VMesh::coords_type &coords, VMesh::Elem::index_type idx, double *Ji) const
Definition: VUnstructuredMesh.h:515
StackBasedVector< double, 64 > weights
Definition: VMesh.h:202
#define SCISHARE
Definition: share.h:39
virtual bool find_closest_elem(double &pdist, Core::Geometry::Point &result, VMesh::coords_type &coords, VMesh::Elem::index_type &i, const Core::Geometry::Point &point) const
Definition: VUnstructuredMesh.h:1371
virtual void node_reserve(size_t size)
Definition: VUnstructuredMesh.h:544
Distinct type for face index.
Definition: FieldVIndex.h:210
Distinct type for edge index.
Definition: FieldVIndex.h:200
Distinct type for elem index.
Definition: FieldVIndex.h:237
VEdgeIndex< VMesh::index_type > index_type
Definition: VMesh.h:128
virtual void mlocate(std::vector< VMesh::Node::index_type > &i, const std::vector< Core::Geometry::Point > &point) const
Definition: VUnstructuredMesh.h:356
VCellIndex< VMesh::index_type > index_type
Definition: VMesh.h:149
Distinct type for node index.
Definition: FieldVIndex.h:181
VUnstructuredMesh(MESH *mesh)
Constructor: This will initialize VMeshShared and VMesh.
Definition: VUnstructuredMesh.h:45
VENodeIndex< VMesh::index_type > index_type
Definition: VMesh.h:119
virtual void set_point(const Core::Geometry::Point &point, VMesh::Node::index_type i)
Definition: VUnstructuredMesh.h:706
virtual void add_enode(const Core::Geometry::Point &point, VMesh::ENode::index_type &i)
Definition: VUnstructuredMesh.h:750
size_type num_hderivs
Definition: VMesh.h:220
Definition: VMeshShared.h:40
Distinct type for additional lagrangian node.
Definition: FieldVIndex.h:190
virtual void get_gradient_weights(const Core::Geometry::Point &point, VMesh::ElemGradient &eg, int basis_order) const
Same functions but now for determining gradients.
Definition: VUnstructuredMesh.h:1088
long long size_type
Definition: Types.h:40
StackBasedVector< double, 64 > weights
Definition: VMesh.h:221
virtual void get_random_point(Core::Geometry::Point &p, VMesh::Elem::index_type i, FieldRNG &rng) const
Get the location of a random point inside the mesh.
Definition: VUnstructuredMesh.h:769
VFaceIndex< VMesh::index_type > index_type
Definition: VMesh.h:137
virtual bool get_neighbor(VMesh::Elem::index_type &neighbor, VMesh::Elem::index_type elem, VMesh::DElem::index_type delem) const
Get the neighbors of a node or an element.
Definition: VUnstructuredMesh.h:422
virtual void get_normal(Core::Geometry::Vector &norm, VMesh::Node::index_type i) const
Get normals, for surface meshes only.
Definition: VUnstructuredMesh.h:778
virtual double jacobian_metric(const VMesh::Elem::index_type elem) const
Jacobian of local to global transformation.
Definition: VUnstructuredMesh.h:535
virtual void add_node(const Core::Geometry::Point &point, VMesh::Node::index_type &i)
Add a node to a mesh.
Definition: VUnstructuredMesh.h:742
virtual bool find_closest_nodes(std::vector< VMesh::Node::index_type > &nodes, const Core::Geometry::Point &point, double maxdist) const
Definition: VUnstructuredMesh.h:1349
virtual void pwl_approx_edge(VMesh::coords_array_type &coords, VMesh::Elem::index_type ci, unsigned int which_edge, unsigned int div_per_unit) const
Draw non linear elements.
Definition: VUnstructuredMesh.h:461
virtual void interpolate(Core::Geometry::Point &p, const VMesh::coords_type &coords, VMesh::Elem::index_type i) const
Interpolate from local coordinates to global coordinates.
Definition: VUnstructuredMesh.h:390
#define ASSERTFAIL(string)
Definition: Assert.h:52
StackVector< index_type, 12 > edge_index
Definition: VMesh.h:200
virtual double det_jacobian(const VMesh::coords_type &coords, VMesh::Elem::index_type idx) const
Get the jacobian for the global coordinates to local coordinates transformation.
Definition: VUnstructuredMesh.h:494
virtual void elem_reserve(size_t size)
reserve memory by specifying the number of elements that is expected
Definition: VUnstructuredMesh.h:552
virtual void resize_elems(size_t size)
Definition: VUnstructuredMesh.h:568
Distinct type for cell index.
Definition: FieldVIndex.h:219
virtual void jacobian(const VMesh::coords_type &coords, VMesh::Elem::index_type idx, double *J) const
Definition: VUnstructuredMesh.h:504
long long index_type
Definition: Types.h:39
Definition: ParallelLinearAlgebraTests.cc:751
virtual bool get_neighbors(VMesh::Elem::array_type &elems, VMesh::Elem::index_type elem, VMesh::DElem::index_type delem) const
Definition: VUnstructuredMesh.h:433
void resize(size_t size, const value_type &val=value_type())
Definition: StackVector.h:61
virtual double scaled_jacobian_metric(const VMesh::Elem::index_type elem) const
Element Quality metrics:
Definition: VUnstructuredMesh.h:527
size_type num_derivs
Definition: VMesh.h:223
VElemIndex< VMesh::index_type > index_type
Definition: VMesh.h:168
virtual void size(VMesh::Node::size_type &size) const
Definition: VUnstructuredMesh.h:247
StackBasedVector< index_type, 8 > node_index
Definition: VMesh.h:218
virtual void get_mgradient_weights(const std::vector< Core::Geometry::Point > &point, VMesh::MultiElemGradient &eg, int basis_order) const
Definition: VUnstructuredMesh.h:1148
virtual void get_minterpolate_weights(const std::vector< Core::Geometry::Point > &point, VMesh::MultiElemInterpolate &ei, int basis_order) const
Definition: VUnstructuredMesh.h:879
size_type num_hderivs
Definition: VMesh.h:201
virtual void resize_nodes(size_t size)
Definition: VUnstructuredMesh.h:560
virtual void derivate(VMesh::dpoints_type &p, const VMesh::coords_type &coords, VMesh::Elem::index_type i) const
Interpolate from local coordinates to a derivative in local coordinates.
Definition: VUnstructuredMesh.h:412
virtual bool get_coords(VMesh::coords_type &coords, const Core::Geometry::Point &point, VMesh::Elem::index_type i) const
Find the coordinates of a point in a certain element.
Definition: VUnstructuredMesh.h:380
virtual void minterpolate(std::vector< Core::Geometry::Point > &p, const std::vector< VMesh::coords_type > &coords, VMesh::Elem::index_type i) const
Multiple interpolations from local coordinates to global coordinates.
Definition: VUnstructuredMesh.h:400
std::vector< std::vector< StackVector< double, 3 > > > coords_array2_type
2D array of coords
Definition: VMesh.h:85
std::vector< size_type > dimension_type
Definition: VMesh.h:76
int basis_order
Definition: VMesh.h:216
StackVector< index_type, 12 > edge_index
Definition: VMesh.h:219
virtual bool find_closest_node(double &pdist, Core::Geometry::Point &result, VMesh::Node::index_type &i, const Core::Geometry::Point &point) const
Find the closest point on a surface or a curve.
Definition: VUnstructuredMesh.h:1327
virtual void get_centers(Core::Geometry::Point *points, VMesh::Node::array_type &array) const
Get the centers of a series of nodes.
Definition: VUnstructuredMesh.h:680
virtual Core::Geometry::Point * get_points_pointer() const
Definition: VUnstructuredMesh.h:733
int basis_order
Definition: VMesh.h:197
virtual void get_interpolate_weights(const Core::Geometry::Point &point, VMesh::ElemInterpolate &ei, int basis_order) const
Definition: VUnstructuredMesh.h:794
index_type elem_index
Definition: VMesh.h:217
int size
Definition: eabLatVolData.py:2
virtual bool locate(VMesh::Node::index_type &i, const Core::Geometry::Point &point) const
Definition: VUnstructuredMesh.h:320
std::vector< ElemGradient > MultiElemGradient
Multiple gradient calculations in parallel.
Definition: VMesh.h:229