SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
VMesh Class Reference

#include <VMesh.h>

Inheritance diagram for VMesh:
VMeshShared< MESH > VUnstructuredMesh< MESH >

Classes

class  Cell
 
class  DElem
 
class  Edge
 Class for indexing edges. More...
 
class  Elem
 
class  ElemGradient
 
class  ElemInterpolate
 
class  ENode
 
class  Face
 Class for indexing faces. More...
 
class  Node
 

Public Types

typedef Mesh::index_type index_type
 VIRTUAL INTERFACE. More...
 
typedef double weight_type
 Weights for interpolation. More...
 
typedef Mesh::size_type size_type
 
typedef std::vector< index_typearray_type
 Array of indices. More...
 
typedef std::vector
< Core::Geometry::Point
points_type
 Array of points. More...
 
typedef std::vector< size_typedimension_type
 
typedef StackVector< double, 3 > coords_type
 
typedef std::vector
< StackVector< double, 3 > > 
coords_array_type
 An array of coords. More...
 
typedef std::vector
< std::vector< StackVector
< double, 3 > > > 
coords_array2_type
 2D array of coords More...
 
typedef StackVector
< Core::Geometry::Point, 3 > 
dpoints_type
 
typedef unsigned int mask_type
 
typedef StackBasedVector
< index_type, 12 > 
index_array_type
 
typedef StackBasedVector
< double, 12 > 
weight_array_type
 
typedef std::vector
< Node::array_type
nodes_array_type
 
typedef std::vector
< ElemInterpolate
MultiElemInterpolate
 
typedef std::vector< ElemGradientMultiElemGradient
 Multiple gradient calculations in parallel. More...
 

Public Member Functions

 VMesh ()
 
virtual ~VMesh ()
 
void begin (Node::iterator &it) const
 
void begin (ENode::iterator &it) const
 
void begin (Edge::iterator &it) const
 
void begin (Face::iterator &it) const
 
void begin (Cell::iterator &it) const
 
void begin (Elem::iterator &it) const
 
void begin (DElem::iterator &it) const
 
void end (Node::iterator &it) const
 
void end (ENode::iterator &it) const
 
void end (Edge::iterator &it) const
 
void end (Face::iterator &it) const
 
void end (Cell::iterator &it) const
 
void end (Elem::iterator &it) const
 
void end (DElem::iterator &it) const
 
virtual void size (Node::size_type &size) const
 
virtual void size (ENode::size_type &size) const
 
virtual void size (Edge::size_type &size) const
 
virtual void size (Face::size_type &size) const
 
virtual void size (Cell::size_type &size) const
 
virtual void size (Elem::size_type &size) const
 
virtual void size (DElem::size_type &size) const
 
size_type num_nodes () const
 
size_type num_enodes () const
 
size_type num_edges () const
 
size_type num_faces () const
 
size_type num_cells () const
 
size_type num_elems () const
 
size_type num_delems () const
 
virtual boost::shared_ptr
< SearchGridT
< SCIRun::index_type > > 
get_elem_search_grid ()
 NOTE NOT VALID FOR EACH MESH: More...
 
virtual boost::shared_ptr
< SearchGridT
< SCIRun::index_type > > 
get_node_search_grid ()
 
bool is_empty () const
 
virtual void get_nodes (Node::array_type &nodes, Node::index_type i) const
 
virtual void get_nodes (Node::array_type &nodes, Edge::index_type i) const
 
virtual void get_nodes (Node::array_type &nodes, Face::index_type i) const
 
virtual void get_nodes (Node::array_type &nodes, Cell::index_type i) const
 
virtual void get_nodes (Node::array_type &nodes, Elem::index_type i) const
 
virtual void get_nodes (Node::array_type &nodes, DElem::index_type i) const
 
virtual void get_enodes (ENode::array_type &nodes, Node::index_type i) const
 
virtual void get_enodes (ENode::array_type &nodes, Edge::index_type i) const
 
virtual void get_enodes (ENode::array_type &nodes, Face::index_type i) const
 
virtual void get_enodes (ENode::array_type &nodes, Cell::index_type i) const
 
virtual void get_enodes (ENode::array_type &nodes, Elem::index_type i) const
 
virtual void get_enodes (ENode::array_type &nodes, DElem::index_type i) const
 
virtual void get_edges (Edge::array_type &edges, Node::index_type i) const
 
virtual void get_edges (Edge::array_type &edges, Edge::index_type i) const
 
virtual void get_edges (Edge::array_type &edges, Face::index_type i) const
 
virtual void get_edges (Edge::array_type &edges, Cell::index_type i) const
 
virtual void get_edges (Edge::array_type &edges, Elem::index_type i) const
 
virtual void get_edges (Edge::array_type &edges, DElem::index_type i) const
 
virtual void get_faces (Face::array_type &faces, Node::index_type i) const
 
virtual void get_faces (Face::array_type &faces, Edge::index_type i) const
 
virtual void get_faces (Face::array_type &faces, Face::index_type i) const
 
virtual void get_faces (Face::array_type &faces, Cell::index_type i) const
 
virtual void get_faces (Face::array_type &faces, Elem::index_type i) const
 
virtual void get_faces (Face::array_type &faces, DElem::index_type i) const
 
virtual void get_cells (Cell::array_type &cells, Node::index_type i) const
 
virtual void get_cells (Cell::array_type &cells, Edge::index_type i) const
 
virtual void get_cells (Cell::array_type &cells, Face::index_type i) const
 
virtual void get_cells (Cell::array_type &cells, Cell::index_type i) const
 
virtual void get_cells (Cell::array_type &cells, Elem::index_type i) const
 
virtual void get_cells (Cell::array_type &cells, DElem::index_type i) const
 
virtual void get_elems (Elem::array_type &elems, Node::index_type i) const
 
virtual void get_elems (Elem::array_type &elems, Edge::index_type i) const
 
virtual void get_elems (Elem::array_type &elems, Face::index_type i) const
 
virtual void get_elems (Elem::array_type &elems, Cell::index_type i) const
 
virtual void get_elems (Elem::array_type &elems, Elem::index_type i) const
 
virtual void get_elems (Elem::array_type &elems, DElem::index_type i) const
 
virtual void get_delems (DElem::array_type &delems, Node::index_type i) const
 
virtual void get_delems (DElem::array_type &delems, Edge::index_type i) const
 
virtual void get_delems (DElem::array_type &delems, Face::index_type i) const
 
virtual void get_delems (DElem::array_type &delems, Cell::index_type i) const
 
virtual void get_delems (DElem::array_type &delems, Elem::index_type i) const
 
virtual void get_delems (DElem::array_type &delems, DElem::index_type i) const
 
virtual bool get_elem (Elem::index_type &elem, Node::array_type &nodes) const
 Get the topology index from the vertex indices. More...
 
virtual bool get_delem (DElem::index_type &delem, Node::array_type &nodes) const
 
virtual bool get_cell (Cell::index_type &cell, Node::array_type &nodes) const
 
virtual bool get_face (Face::index_type &face, Node::array_type &nodes) const
 
virtual bool get_edge (Edge::index_type &edge, Node::array_type &nodes) const
 
virtual void get_center (Core::Geometry::Point &point, Node::index_type i) const
 Get the center of a certain mesh element. More...
 
virtual void get_center (Core::Geometry::Point &point, ENode::index_type i) const
 
virtual void get_center (Core::Geometry::Point &point, Edge::index_type i) const
 
virtual void get_center (Core::Geometry::Point &point, Face::index_type i) const
 
virtual void get_center (Core::Geometry::Point &point, Cell::index_type i) const
 
virtual void get_center (Core::Geometry::Point &point, Elem::index_type i) const
 
virtual void get_center (Core::Geometry::Point &point, DElem::index_type i) const
 
virtual void get_centers (Core::Geometry::Point *points, Node::array_type &array) const
 Get the centers of a series of nodes. More...
 
virtual void get_centers (Core::Geometry::Point *points, Elem::array_type &array) const
 
void get_centers (points_type &points, Node::array_type &array) const
 
void get_centers (points_type &points, Elem::array_type &array) const
 
void get_all_node_centers (points_type &points) const
 
void get_all_elem_centers (points_type &points) const
 
double get_size (Node::index_type) const
 
double get_size (ENode::index_type) const
 
virtual double get_size (Edge::index_type i) const
 Get the geometrical size of topological mesh components. More...
 
virtual double get_size (Face::index_type i) const
 
virtual double get_size (Cell::index_type i) const
 
virtual double get_size (Elem::index_type i) const
 
virtual double get_size (DElem::index_type i) const
 
virtual double get_size (Node::array_type &array) const
 
double get_length (Edge::index_type i) const
 
double get_area (Face::index_type i) const
 
double get_volume (Cell::index_type i) const
 
double get_length (Elem::index_type i) const
 
double get_area (Elem::index_type i) const
 
double get_volume (Elem::index_type i) const
 
virtual void get_interpolate_weights (const Core::Geometry::Point &p, ElemInterpolate &ei, int basis_order) const
 
virtual void get_interpolate_weights (const coords_type &coords, Elem::index_type elem, ElemInterpolate &ei, int basis_order) const
 
virtual void get_minterpolate_weights (const std::vector< Core::Geometry::Point > &p, MultiElemInterpolate &ei, int basis_order) const
 
virtual void get_minterpolate_weights (const std::vector< coords_type > &coords, Elem::index_type elem, MultiElemInterpolate &ei, int basis_order) const
 
virtual void get_gradient_weights (const Core::Geometry::Point &p, ElemGradient &ei, int basis_order) const
 Same functions but now for determining gradients. More...
 
virtual void get_gradient_weights (const coords_type &coords, Elem::index_type elem, ElemGradient &ei, int basis_order) const
 
virtual void get_mgradient_weights (const std::vector< Core::Geometry::Point > &p, MultiElemGradient &ei, int basis_order) const
 
virtual void get_mgradient_weights (const std::vector< coords_type > &coords, Elem::index_type elem, MultiElemGradient &eg, int basis_order) const
 
virtual void get_weights (const coords_type &coords, std::vector< double > &weights, int basis_order) const
 
virtual void get_derivate_weights (const coords_type &coords, std::vector< double > &weights, int basis_order) const
 
virtual void get_gaussian_scheme (std::vector< VMesh::coords_type > &coords, std::vector< double > &weights, int order) const
 
virtual void get_regular_scheme (std::vector< VMesh::coords_type > &coords, std::vector< double > &weights, int order) const
 
virtual bool locate (VMesh::Node::index_type &i, const Core::Geometry::Point &point) const
 
virtual bool locate (VMesh::Elem::index_type &i, const Core::Geometry::Point &point) const
 
virtual bool locate (VMesh::Elem::index_type &i, VMesh::coords_type &coords, const Core::Geometry::Point &point) const
 
virtual void mlocate (std::vector< Node::index_type > &i, const std::vector< Core::Geometry::Point > &point) const
 
virtual void mlocate (std::vector< Elem::index_type > &i, const std::vector< Core::Geometry::Point > &point) const
 
virtual bool locate (VMesh::Elem::array_type &a, const Core::Geometry::BBox &bbox) const
 
virtual bool find_closest_node (double &dist, 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. More...
 
virtual bool find_closest_node (double &dist, Core::Geometry::Point &result, VMesh::Node::index_type &i, const Core::Geometry::Point &point, double maxdist) const
 
bool find_closest_node (Core::Geometry::Point &result, VMesh::Node::index_type &i, const Core::Geometry::Point &point, double maxdist)
 Simplified version that does not return the distance. More...
 
bool find_closest_node (Core::Geometry::Point &result, VMesh::Node::index_type &i, const Core::Geometry::Point &point)
 Simplified version that does not return the distance. More...
 
virtual bool find_closest_nodes (std::vector< VMesh::Node::index_type > &nodes, const Core::Geometry::Point &p, double maxdist) const
 
virtual bool find_closest_nodes (std::vector< double > &distances, std::vector< VMesh::Node::index_type > &nodes, const Core::Geometry::Point &p, double maxdist) const
 
virtual bool find_closest_elem (double &dist, Core::Geometry::Point &result, VMesh::coords_type &coords, VMesh::Elem::index_type &i, const Core::Geometry::Point &point) const
 
virtual bool find_closest_elem (double &dist, Core::Geometry::Point &result, VMesh::coords_type &coords, VMesh::Elem::index_type &i, const Core::Geometry::Point &point, double maxdist) const
 
bool find_closest_elem (double &dist, Core::Geometry::Point &result, VMesh::Elem::index_type &i, const Core::Geometry::Point &point) const
 Simplified version that does not return the local coordinates. More...
 
bool find_closest_elem (double &dist, Core::Geometry::Point &result, VMesh::Elem::index_type &i, const Core::Geometry::Point &point, double maxdist) const
 
bool find_closest_elem (Core::Geometry::Point &result, VMesh::Elem::index_type &i, const Core::Geometry::Point &point) const
 Even more simplified version. More...
 
bool find_closest_elem (VMesh::coords_type &coords, VMesh::Elem::index_type &i, const Core::Geometry::Point &point) const
 Another simplified version. More...
 
virtual bool find_closest_elems (double &dist, Core::Geometry::Point &result, VMesh::Elem::array_type &i, const Core::Geometry::Point &point) const
 
virtual bool get_coords (coords_type &coords, const Core::Geometry::Point &point, Elem::index_type i) const
 Find the coordinates of a point in a certain element. More...
 
virtual void interpolate (Core::Geometry::Point &p, const coords_type &coords, Elem::index_type i) const
 Interpolate from local coordinates to global coordinates. More...
 
virtual void minterpolate (std::vector< Core::Geometry::Point > &p, const std::vector< coords_type > &coords, Elem::index_type i) const
 Multiple interpolations from local coordinates to global coordinates. More...
 
virtual void derivate (dpoints_type &p, const coords_type &coords, Elem::index_type i) const
 Interpolate from local coordinates to a derivative in local coordinates. More...
 
virtual void get_normal (Core::Geometry::Vector &result, coords_type &coords, Elem::index_type eidx, DElem::index_type fidx) const
 
void get_normal (Core::Geometry::Vector &result, coords_type &coords, Elem::index_type eidx) const
 This is the surface version. More...
 
void get_normals (std::vector< Core::Geometry::Vector > &result, std::vector< coords_type > &coords, Elem::index_type eidx) const
 Multiple normals short cut. More...
 
virtual void get_random_point (Core::Geometry::Point &p, Elem::index_type i, FieldRNG &rng) const
 Get the location of a random point inside the mesh. More...
 
void get_point (Core::Geometry::Point &point, Node::index_type i) const
 
void get_point (Core::Geometry::Point &point, ENode::index_type i) const
 
Core::Geometry::Point get_point (Node::index_type i) const
 
Core::Geometry::Point get_point (ENode::index_type i) const
 
virtual void set_point (const Core::Geometry::Point &point, Node::index_type i)
 
virtual void set_point (const Core::Geometry::Point &point, ENode::index_type i)
 
virtual Core::Geometry::Pointget_points_pointer () const
 
virtual VMesh::index_typeget_elems_pointer () const
 
void copy_nodes (VMesh *imesh, Node::index_type i, Node::index_type o, Node::size_type size)
 
void copy_nodes (VMesh *imesh)
 
void copy_elems (VMesh *imesh, Elem::index_type i, Elem::index_type o, Elem::size_type size, Elem::size_type offset)
 
void copy_elems (VMesh *imesh)
 
virtual void node_reserve (size_t size)
 
void reserve_nodes (size_t size)
 
virtual void elem_reserve (size_t size)
 reserve memory by specifying the number of elements that is expected More...
 
void reserve_elems (size_t size)
 
virtual void resize_nodes (size_t size)
 
virtual void resize_elems (size_t size)
 
void resize_points (size_t size)
 
virtual void add_node (const Core::Geometry::Point &point, Node::index_type &i)
 Add a node to a mesh. More...
 
virtual void add_enode (const Core::Geometry::Point &point, ENode::index_type &i)
 
void set_node (const Core::Geometry::Point &point, Node::index_type i)
 alternative calls More...
 
void set_enode (const Core::Geometry::Point &point, ENode::index_type i)
 
virtual void set_nodes (Node::array_type &array, Edge::index_type idx)
 
virtual void set_nodes (Node::array_type &array, Face::index_type idx)
 
virtual void set_nodes (Node::array_type &array, Cell::index_type idx)
 
virtual void set_nodes (Node::array_type &array, Elem::index_type idx)
 
Node::index_type add_node (const Core::Geometry::Point &point)
 
void get_node (Core::Geometry::Point &point, Node::index_type i)
 
void get_enode (Core::Geometry::Point &point, ENode::index_type i)
 
VMesh::Node::index_type add_point (const Core::Geometry::Point &point)
 
virtual void add_elem (const Node::array_type &nodes, Elem::index_type &i)
 Add an element to a mesh. More...
 
VMesh::Elem::index_type add_elem (const Node::array_type nodes)
 Alternative calls for add_elem. More...
 
virtual void insert_node_into_elem (Elem::array_type &newelems, Node::index_type &newnode, Elem::index_type elem, Core::Geometry::Point &point)
 Currently only available for tetrahedra, triangles and curves. More...
 
virtual bool get_neighbor (Elem::index_type &neighbor, Elem::index_type from, DElem::index_type delem) const
 Get the neighbors of a node or an element. More...
 
virtual bool get_neighbors (Elem::array_type &elems, Elem::index_type i, DElem::index_type delem) const
 
virtual void get_neighbors (Elem::array_type &elems, Elem::index_type i) const
 
virtual void get_neighbors (Node::array_type &nodes, Node::index_type i) const
 
virtual void pwl_approx_edge (coords_array_type &coords, Elem::index_type ci, unsigned int which_edge, unsigned int div_per_unit) const
 Draw non linear elements. More...
 
virtual void pwl_approx_face (coords_array2_type &coords, Elem::index_type ci, unsigned int which_face, unsigned int div_per_unit) const
 
virtual void get_normal (Core::Geometry::Vector &norm, Node::index_type i) const
 Get node normals, needed for visualization. More...
 
virtual void get_dimensions (dimension_type &dim)
 
virtual void get_elem_dimensions (dimension_type &dim)
 
virtual double det_jacobian (const coords_type &coords, Elem::index_type idx) const
 
virtual void jacobian (const coords_type &coords, Elem::index_type idx, double *J) const
 
virtual double inverse_jacobian (const coords_type &coords, Elem::index_type idx, double *Ji) const
 
virtual double scaled_jacobian_metric (const Elem::index_type idx) const
 Element Quality metrics: More...
 
virtual double jacobian_metric (const Elem::index_type idx) const
 Jacobian of local to global transformation. More...
 
double volume_metric (const Elem::index_type idx) const
 Volume of an element. More...
 
virtual double inscribed_circumscribed_radius_metric (Elem::index_type idx) const
 Scaled inscribed to circumscribed ratio. More...
 
void get_constant_weights (coords_type &, std::vector< double > &weights)
 
virtual void get_linear_weights (coords_type &coords, std::vector< double > &weights)
 
virtual void get_quadratic_weights (coords_type &coords, std::vector< double > &weights)
 
virtual void get_cubic_weights (coords_type &coords, std::vector< double > &weights)
 
void get_constant_derivate_weights (coords_type &, std::vector< double > &weights)
 These four are for computating gradients. More...
 
virtual void get_linear_derivate_weights (coords_type &coords, std::vector< double > &weights)
 
virtual void get_quadratic_derivate_weights (coords_type &coords, std::vector< double > &weights)
 
virtual void get_cubic_derivate_weights (coords_type &coords, std::vector< double > &weights)
 
virtual Core::Geometry::BBox get_bounding_box () const
 Rerouting of some of the virtual mesh function calls. More...
 
virtual bool synchronize (unsigned int sync)
 This call is for synchronizing tables of precomputed elements. More...
 
virtual bool unsynchronize (unsigned int sync)
 
virtual bool clear_synchronization ()
 
virtual void transform (const Core::Geometry::Transform &t)
 
virtual Core::Geometry::Transform get_transform () const
 Get the transform from a regular field. More...
 
virtual void set_transform (const Core::Geometry::Transform &t)
 Set the transform of a regular field. More...
 
virtual void get_canonical_transform (Core::Geometry::Transform &t)
 
virtual double get_epsilon () const
 
virtual bool is_pointcloudmesh ()
 check the type of mesh More...
 
virtual bool is_curvemesh ()
 
virtual bool is_scanlinemesh ()
 
virtual bool is_structcurvemesh ()
 
virtual bool is_trisurfmesh ()
 
virtual bool is_quadsurfmesh ()
 
virtual bool is_imagemesh ()
 
virtual bool is_structquadsurfmesh ()
 
virtual bool is_tetvolmesh ()
 
virtual bool is_prismvolmesh ()
 
virtual bool is_hexvolmesh ()
 
virtual bool is_latvolmesh ()
 
virtual bool is_structhexvolmesh ()
 
bool is_constantmesh ()
 Check order of mesh. More...
 
bool is_linearmesh ()
 
bool is_quadraticmesh ()
 
bool is_cubicmesh ()
 
bool is_nonlinearmesh ()
 
template<class VEC1 , class VEC2 >
void convert_vector (VEC1 &v1, VEC2 v2) const
 
int basis_order ()
 
int dimensionality ()
 
bool is_point ()
 
bool is_line ()
 
bool is_surface ()
 
bool is_volume ()
 
unsigned int num_nodes_per_elem ()
 
unsigned int num_enodes_per_elem ()
 
unsigned int num_edges_per_elem ()
 
unsigned int num_faces_per_elem ()
 
unsigned int num_nodes_per_face ()
 
unsigned int num_nodes_per_edge ()
 
unsigned int num_edges_per_face ()
 
unsigned int num_gradients_per_node ()
 
bool has_normals ()
 
bool is_editable ()
 
bool is_regularmesh ()
 
bool is_irregularmesh ()
 
bool is_structuredmesh ()
 
bool is_unstructuredmesh ()
 
size_type get_ni () const
 
size_type get_nj () const
 
size_type get_nk () const
 
int generation () const
 
void from_index (index_type &i, index_type &j, index_type &k, Node::index_type idx)
 From index splits up the index into parts. More...
 
void from_index (index_type &i, index_type &j, index_type &k, Elem::index_type idx)
 
void from_index (index_type &i, index_type &j, Node::index_type idx)
 
void from_index (index_type &i, index_type &j, Elem::index_type idx)
 
void from_index (index_type &i, index_type &j, index_type &k, Cell::index_type idx)
 
void from_index (index_type &i, index_type &j, Face::index_type idx)
 
void to_index (Node::index_type &idx, index_type i, index_type j, index_type k)
 To index generates a new successive index. More...
 
void to_index (Node::index_type &idx, index_type i, index_type j)
 
void to_index (Elem::index_type &idx, index_type i, index_type j, index_type k)
 
void to_index (Elem::index_type &idx, index_type i, index_type j)
 
void to_index (Cell::index_type &idx, index_type i, index_type j, index_type k)
 
void to_index (Face::index_type &idx, index_type i, index_type j)
 
bool is_pnt_element ()
 Test for the type of elements. More...
 
bool is_crv_element ()
 
bool is_tri_element ()
 
bool is_quad_element ()
 
bool is_tet_element ()
 
bool is_prism_element ()
 
bool is_hex_element ()
 
void get_element_vertices (coords_array_type &coords)
 Get the unit vertex coordinates of the unit element. More...
 
void get_element_edges (nodes_array_type &edges)
 
void get_element_center (coords_type &coords)
 
double get_element_size ()
 

Protected Attributes

int basis_order_
 
int dimension_
 
bool has_normals_
 Mesh properties. More...
 
bool is_editable_
 
bool is_regular_
 
bool is_structured_
 
unsigned int num_nodes_per_elem_
 Mesh statistics. More...
 
unsigned int num_enodes_per_elem_
 
unsigned int num_edges_per_elem_
 
unsigned int num_faces_per_elem_
 
unsigned int num_nodes_per_face_
 
unsigned int num_edges_per_face_
 
unsigned int num_gradients_per_node_
 
double element_size_
 Size in local coordinate system. More...
 
coords_array_type unit_vertices_
 Definitions of local element topology. More...
 
nodes_array_type unit_edges_
 
coords_type unit_center_
 
size_type ni_
 
size_type nj_
 
size_type nk_
 
unsigned int generation_
 generation number of mesh More...
 

Member Typedef Documentation

typedef std::vector<index_type> array_type

Array of indices.

typedef std::vector<std::vector<StackVector<double,3> > > coords_array2_type

2D array of coords

typedef std::vector<StackVector<double,3> > coords_array_type

An array of coords.

typedef StackVector<double,3> coords_type

A stack vector is a faster class than vector but is limited to a maximum number of entries coords_type is used to denote the location inside an element in local coordinates

typedef std::vector<size_type> dimension_type

Dimensions of a mesh, these are used for the regular grids Irregular grids only have one dimension, namely the number of nodes or elements

Derivative of points each component contains the x,y, and z derivative of the point. This is used in higher order elements

A dual vector will store the first entries on the stack, if extra space is needed it will create vector to store data on. This way most operations are done directly from the stack, only in less common situations memory is allocated and is used to store data. Here we allow 12 spaces to be on the stack which should be enough.

VIRTUAL INTERFACE.

typedefs for Node, Edge, Face and Cell These are the basic types that we use, they are typedefed so we can alter the underlying type easily All indices are always of index_type

typedef unsigned int mask_type

Mask type for setting bits. This one is set to special type to remind the user that only bit operations asre valid on masks

typedef std::vector<ElemGradient> MultiElemGradient

Multiple gradient calculations in parallel.

typedef std::vector<ElemInterpolate> MultiElemInterpolate

We have special code for doing multiple interpolations at the same time all for speeding up the code and limit the number of virtual function calls.

typedef std::vector<Node::array_type> nodes_array_type
typedef std::vector<Core::Geometry::Point> points_type

Array of points.

size_type and index_type need to be the same but they have their own type to make the code more readable

typedef StackBasedVector<double,12> weight_array_type
typedef double weight_type

Weights for interpolation.

Constructor & Destructor Documentation

VMesh ( )
inline

instantiate the element information as these are protected the various derived constructors can fill these out.

This call is only made in DEBUG mode, to keep a record of all the objects that are being allocated and freed.

virtual ~VMesh ( )
inlinevirtual

Destructor needs to be virtual to ensure that we can delete the full virtual interface from the VMesh interface

This call is only made in DEBUG mode, to keep a record of all the objects that are being allocated and freed.

Member Function Documentation

void add_elem ( const Node::array_type nodes,
Elem::index_type i 
)
virtual

Add an element to a mesh.

Reimplemented in VUnstructuredMesh< MESH >.

VMesh::Elem::index_type add_elem ( const Node::array_type  nodes)
inline

Alternative calls for add_elem.

void add_enode ( const Core::Geometry::Point point,
ENode::index_type i 
)
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void add_node ( const Core::Geometry::Point point,
Node::index_type i 
)
virtual

Add a node to a mesh.

Reimplemented in VUnstructuredMesh< MESH >.

Node::index_type add_node ( const Core::Geometry::Point point)
inline
VMesh::Node::index_type add_point ( const Core::Geometry::Point point)
inline

Do not use this one as it is not clear whether it is a element node or edge node

int basis_order ( )
inline

Inline calls to information that is constant for a mesh and does not change for a mesh. These properties are stored directly in the vmesh data structure and hence we can replace them by simple inline calls.

void begin ( Node::iterator it) const
inline

iterators for the virtual topology indices. These are not strictly needed but make the concepts in line with previous version. All iterators now go from 0 to number of elements, using consecutive unique numbers

void begin ( ENode::iterator it) const
inline
void begin ( Edge::iterator it) const
inline
void begin ( Face::iterator it) const
inline
void begin ( Cell::iterator it) const
inline
void begin ( Elem::iterator it) const
inline
void begin ( DElem::iterator it) const
inline
bool clear_synchronization ( )
virtual

Reimplemented in VMeshShared< MESH >.

void convert_vector ( VEC1 &  v1,
VEC2  v2 
) const
inline

Used for local conversion of vector types At some point this function should go away

void copy_elems ( VMesh imesh,
Elem::index_type  i,
Elem::index_type  o,
Elem::size_type  size,
Elem::size_type  offset 
)
inline
void copy_elems ( VMesh imesh)
inline
void copy_nodes ( VMesh imesh,
Node::index_type  i,
Node::index_type  o,
Node::size_type  size 
)
inline

Copy nodes from one mesh to another mesh Note: currently only for irregular meshes

Todo:
: Add regular meshes to the mix
void copy_nodes ( VMesh imesh)
inline
void derivate ( dpoints_type p,
const coords_type coords,
Elem::index_type  i 
) const
virtual

Interpolate from local coordinates to a derivative in local coordinates.

Reimplemented in VUnstructuredMesh< MESH >.

double det_jacobian ( const coords_type coords,
Elem::index_type  idx 
) const
virtual

The following functions are intended so one can do the local to global transformation efficiently. As the transformation matrix is a constant for certain meshes, it is precomputed and this function looks up the precomputed jacobians, while for others it depends on the element and it is computed on the fly. To assure that the fastest method is used, use these functions. Get the determinant of the jacobian matrix Coords determine where the determinant needs o be evaluated Generally LatVol, ImageMesh, TriMesh, TetMesh have a jacobian that is independen of the local coordinate system, however HexVol, QuadSurf, and PrismVol have values that depend on the local position within the element

Reimplemented in VUnstructuredMesh< MESH >.

int dimensionality ( )
inline
void elem_reserve ( size_t  size)
virtual

reserve memory by specifying the number of elements that is expected

Reimplemented in VUnstructuredMesh< MESH >.

void end ( Node::iterator it) const
inline
void end ( ENode::iterator it) const
inline
void end ( Edge::iterator it) const
inline
void end ( Face::iterator it) const
inline
void end ( Cell::iterator it) const
inline
void end ( Elem::iterator it) const
inline
void end ( DElem::iterator it) const
inline
bool find_closest_elem ( double &  dist,
Core::Geometry::Point result,
VMesh::coords_type coords,
VMesh::Elem::index_type i,
const Core::Geometry::Point point 
) const
virtual

Find the closest location that is part of an element This function returns the projection point on the mesh and the euclidian distance to the field which is the distance between point and the projection. It also returns the local coordinates of the element where the projection point is located and the element index. if no elements are found the function returns false.

Reimplemented in VUnstructuredMesh< MESH >.

bool find_closest_elem ( double &  dist,
Core::Geometry::Point result,
VMesh::coords_type coords,
VMesh::Elem::index_type i,
const Core::Geometry::Point point,
double  maxdist 
) const
virtual

Same function, but now limited to a certain search ratius. if no elements are found the function returns false.

Reimplemented in VUnstructuredMesh< MESH >.

bool find_closest_elem ( double &  dist,
Core::Geometry::Point result,
VMesh::Elem::index_type i,
const Core::Geometry::Point point 
) const
inline

Simplified version that does not return the local coordinates.

bool find_closest_elem ( double &  dist,
Core::Geometry::Point result,
VMesh::Elem::index_type i,
const Core::Geometry::Point point,
double  maxdist 
) const
inline
bool find_closest_elem ( Core::Geometry::Point result,
VMesh::Elem::index_type i,
const Core::Geometry::Point point 
) const
inline

Even more simplified version.

bool find_closest_elem ( VMesh::coords_type coords,
VMesh::Elem::index_type i,
const Core::Geometry::Point point 
) const
inline

Another simplified version.

bool find_closest_elems ( double &  dist,
Core::Geometry::Point result,
VMesh::Elem::array_type i,
const Core::Geometry::Point point 
) const
virtual
Todo:
: Need to reformulate this one, closest element can have multiple

Reimplemented in VUnstructuredMesh< MESH >.

bool find_closest_node ( double &  dist,
Core::Geometry::Point result,
VMesh::Node::index_type i,
const Core::Geometry::Point point 
) const
virtual

Find the closest point on a surface or a curve.

These functions return the closest node to a certain point It returns the distance and the node index and the location of the node.

Reimplemented in VUnstructuredMesh< MESH >.

bool find_closest_node ( double &  dist,
Core::Geometry::Point result,
VMesh::Node::index_type i,
const Core::Geometry::Point point,
double  maxdist 
) const
virtual

This version uses a maximum radius for searching the node If no nodes are within radius the function returns false.

Reimplemented in VUnstructuredMesh< MESH >.

bool find_closest_node ( Core::Geometry::Point result,
VMesh::Node::index_type i,
const Core::Geometry::Point point,
double  maxdist 
)
inline

Simplified version that does not return the distance.

bool find_closest_node ( Core::Geometry::Point result,
VMesh::Node::index_type i,
const Core::Geometry::Point point 
)
inline

Simplified version that does not return the distance.

bool find_closest_nodes ( std::vector< VMesh::Node::index_type > &  nodes,
const Core::Geometry::Point p,
double  maxdist 
) const
virtual

Find the nodes within a spherical region arounf point. It returns the indices to the nodes

Reimplemented in VUnstructuredMesh< MESH >.

bool find_closest_nodes ( std::vector< double > &  distances,
std::vector< VMesh::Node::index_type > &  nodes,
const Core::Geometry::Point p,
double  maxdist 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void from_index ( index_type i,
index_type j,
index_type k,
Node::index_type  idx 
)
inline

From index splits up the index into parts.

These functions help dealing with regular meshes and translate Node indices to coordinate indices

void from_index ( index_type i,
index_type j,
index_type k,
Elem::index_type  idx 
)
inline
void from_index ( index_type i,
index_type j,
Node::index_type  idx 
)
inline
void from_index ( index_type i,
index_type j,
Elem::index_type  idx 
)
inline
void from_index ( index_type i,
index_type j,
index_type k,
Cell::index_type  idx 
)
inline
void from_index ( index_type i,
index_type j,
Face::index_type  idx 
)
inline
int generation ( ) const
inline
void get_all_elem_centers ( points_type points) const
inline
void get_all_node_centers ( points_type points) const
inline
double get_area ( Face::index_type  i) const
inline
double get_area ( Elem::index_type  i) const
inline
BBox get_bounding_box ( ) const
virtual

Rerouting of some of the virtual mesh function calls.

Reimplemented in VMeshShared< MESH >.

void get_canonical_transform ( Core::Geometry::Transform t)
virtual

Reimplemented in VMeshShared< MESH >.

bool get_cell ( Cell::index_type cell,
Node::array_type nodes 
) const
virtual
void get_cells ( Cell::array_type cells,
Node::index_type  i 
) const
virtual

Get the cell index that contains the specified component Depending on the geometry not every function may be available

void get_cells ( Cell::array_type cells,
Edge::index_type  i 
) const
virtual
void get_cells ( Cell::array_type cells,
Face::index_type  i 
) const
virtual
void get_cells ( Cell::array_type cells,
Cell::index_type  i 
) const
virtual
void get_cells ( Cell::array_type cells,
Elem::index_type  i 
) const
virtual
void get_cells ( Cell::array_type cells,
DElem::index_type  i 
) const
virtual
void get_center ( Core::Geometry::Point point,
Node::index_type  i 
) const
virtual

Get the center of a certain mesh element.

Reimplemented in VUnstructuredMesh< MESH >.

void get_center ( Core::Geometry::Point point,
ENode::index_type  i 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void get_center ( Core::Geometry::Point point,
Edge::index_type  i 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void get_center ( Core::Geometry::Point point,
Face::index_type  i 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void get_center ( Core::Geometry::Point point,
Cell::index_type  i 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void get_center ( Core::Geometry::Point point,
Elem::index_type  i 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void get_center ( Core::Geometry::Point point,
DElem::index_type  i 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void get_centers ( Core::Geometry::Point points,
Node::array_type array 
) const
virtual

Get the centers of a series of nodes.

Reimplemented in VUnstructuredMesh< MESH >.

void get_centers ( Core::Geometry::Point points,
Elem::array_type array 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void get_centers ( points_type points,
Node::array_type array 
) const
inline

Get the centers of a series of nodes, with points in an STL vector These just overload the function calls defined above.

void get_centers ( points_type points,
Elem::array_type array 
) const
inline
void get_constant_derivate_weights ( coords_type ,
std::vector< double > &  weights 
)
inline

These four are for computating gradients.

void get_constant_weights ( coords_type ,
std::vector< double > &  weights 
)
inline
Todo:
: These should go: we have get_weights and get_derivate_weights with basis_order call Direct access to get weights functions in basis functions These four are for interpolation
bool get_coords ( coords_type coords,
const Core::Geometry::Point point,
Elem::index_type  i 
) const
virtual

Find the coordinates of a point in a certain element.

Reimplemented in VUnstructuredMesh< MESH >.

void get_cubic_derivate_weights ( coords_type coords,
std::vector< double > &  weights 
)
virtual
void get_cubic_weights ( coords_type coords,
std::vector< double > &  weights 
)
virtual
bool get_delem ( DElem::index_type delem,
Node::array_type nodes 
) const
virtual
void get_delems ( DElem::array_type delems,
Node::index_type  i 
) const
virtual

Get the derived element index that contains the specified component Depending on the geometry not every function may be available

void get_delems ( DElem::array_type delems,
Edge::index_type  i 
) const
virtual
void get_delems ( DElem::array_type delems,
Face::index_type  i 
) const
virtual
void get_delems ( DElem::array_type delems,
Cell::index_type  i 
) const
virtual
void get_delems ( DElem::array_type delems,
Elem::index_type  i 
) const
virtual
void get_delems ( DElem::array_type delems,
DElem::index_type  i 
) const
virtual
void get_derivate_weights ( const coords_type coords,
std::vector< double > &  weights,
int  basis_order 
) const
virtual

Old get_derivate_weights function, which returns weights but now for computing the gradient of a field.

Reimplemented in VMeshShared< MESH >.

void get_dimensions ( dimension_type dim)
virtual

Get the dimensions of the mesh. This function will replace get_dim()

Reimplemented in VUnstructuredMesh< MESH >.

bool get_edge ( Edge::index_type edge,
Node::array_type nodes 
) const
virtual
void get_edges ( Edge::array_type edges,
Node::index_type  i 
) const
virtual

Get the edges that make up an element or get the edges that contain certain nodes Depending on the geometry not every function may be available

void get_edges ( Edge::array_type edges,
Edge::index_type  i 
) const
virtual
void get_edges ( Edge::array_type edges,
Face::index_type  i 
) const
virtual
void get_edges ( Edge::array_type edges,
Cell::index_type  i 
) const
virtual
void get_edges ( Edge::array_type edges,
Elem::index_type  i 
) const
virtual
void get_edges ( Edge::array_type edges,
DElem::index_type  i 
) const
virtual
bool get_elem ( Elem::index_type elem,
Node::array_type nodes 
) const
virtual

Get the topology index from the vertex indices.

void get_elem_dimensions ( dimension_type dim)
virtual
boost::shared_ptr< SearchGridT< SCIRun::index_type > > get_elem_search_grid ( )
virtual

NOTE NOT VALID FOR EACH MESH:

void get_element_center ( coords_type coords)
inline
void get_element_edges ( nodes_array_type edges)
inline
double get_element_size ( )
inline
void get_element_vertices ( coords_array_type coords)
inline

Get the unit vertex coordinates of the unit element.

void get_elems ( Elem::array_type elems,
Node::index_type  i 
) const
virtual

Get the element index that contains the specified component Depending on the geometry not every function may be available

void get_elems ( Elem::array_type elems,
Edge::index_type  i 
) const
virtual
void get_elems ( Elem::array_type elems,
Face::index_type  i 
) const
virtual
void get_elems ( Elem::array_type elems,
Cell::index_type  i 
) const
virtual
void get_elems ( Elem::array_type elems,
Elem::index_type  i 
) const
virtual
void get_elems ( Elem::array_type elems,
DElem::index_type  i 
) const
virtual
VMesh::index_type * get_elems_pointer ( ) const
virtual
void get_enode ( Core::Geometry::Point point,
ENode::index_type  i 
)
inline
void get_enodes ( ENode::array_type nodes,
Node::index_type  i 
) const
virtual

Get the nodes that make up an element Depending on the geometry not every function may be available

void get_enodes ( ENode::array_type nodes,
Edge::index_type  i 
) const
virtual
void get_enodes ( ENode::array_type nodes,
Face::index_type  i 
) const
virtual
void get_enodes ( ENode::array_type nodes,
Cell::index_type  i 
) const
virtual
void get_enodes ( ENode::array_type nodes,
Elem::index_type  i 
) const
virtual
void get_enodes ( ENode::array_type nodes,
DElem::index_type  i 
) const
virtual
double get_epsilon ( ) const
virtual

Get the epsilon for doing numerical computations This one is generally 1e-7*length diagonal of the bounding box

Reimplemented in VMeshShared< MESH >.

bool get_face ( Face::index_type face,
Node::array_type nodes 
) const
virtual
void get_faces ( Face::array_type faces,
Node::index_type  i 
) const
virtual

Get the faces that make up an element or get the faces that contain certain nodes or edges Depending on the geometry not every function may be available

void get_faces ( Face::array_type faces,
Edge::index_type  i 
) const
virtual
void get_faces ( Face::array_type faces,
Face::index_type  i 
) const
virtual
void get_faces ( Face::array_type faces,
Cell::index_type  i 
) const
virtual
void get_faces ( Face::array_type faces,
Elem::index_type  i 
) const
virtual
void get_faces ( Face::array_type faces,
DElem::index_type  i 
) const
virtual
void get_gaussian_scheme ( std::vector< VMesh::coords_type > &  coords,
std::vector< double > &  weights,
int  order 
) const
virtual

These two functions specify a sampling scheme for interpolation, intergration etc. Currently it supports 3 Gaussian schemes that define the gaussian quadrature points for the meshes. Specify the order between 1 and 3. The regular sampling is intended for operations other than integration and sample using a regular scheme inside the element. Currently an order between 1 and 5 are supported to indicate the number of samples along one of the edges. Hence scheme 1 only gives one point in the center and scheme 5 can generate up to 125 sampling points depending on the topology of the element.

Reimplemented in VMeshShared< MESH >.

void get_gradient_weights ( const Core::Geometry::Point p,
ElemGradient ei,
int  basis_order 
) const
virtual

Same functions but now for determining gradients.

Reimplemented in VUnstructuredMesh< MESH >.

void get_gradient_weights ( const coords_type coords,
Elem::index_type  elem,
ElemGradient ei,
int  basis_order 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void get_interpolate_weights ( const Core::Geometry::Point p,
ElemInterpolate ei,
int  basis_order 
) const
virtual

Specialized functions to get weights for the interpolation One should use these instead of get_weights These functions fill out the interpolation structure, so that one can used in the code. The interpolation structures know about basis order and hence will do the right interpolation when given to a function of VField for interpolation

Reimplemented in VUnstructuredMesh< MESH >.

void get_interpolate_weights ( const coords_type coords,
Elem::index_type  elem,
ElemInterpolate ei,
int  basis_order 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

double get_length ( Edge::index_type  i) const
inline

alternative ways to get the size values Again these are all defined inline so we do not get additional virtual calls in the interface an to reduce the overhead in the actual implementation of the virtual interface mesh classes.

double get_length ( Elem::index_type  i) const
inline
void get_linear_derivate_weights ( coords_type coords,
std::vector< double > &  weights 
)
virtual
void get_linear_weights ( coords_type coords,
std::vector< double > &  weights 
)
virtual
void get_mgradient_weights ( const std::vector< Core::Geometry::Point > &  p,
MultiElemGradient ei,
int  basis_order 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void get_mgradient_weights ( const std::vector< coords_type > &  coords,
Elem::index_type  elem,
MultiElemGradient eg,
int  basis_order 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void get_minterpolate_weights ( const std::vector< Core::Geometry::Point > &  p,
MultiElemInterpolate ei,
int  basis_order 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void get_minterpolate_weights ( const std::vector< coords_type > &  coords,
Elem::index_type  elem,
MultiElemInterpolate ei,
int  basis_order 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

bool get_neighbor ( Elem::index_type neighbor,
Elem::index_type  from,
DElem::index_type  delem 
) const
virtual

Get the neighbors of a node or an element.

Reimplemented in VUnstructuredMesh< MESH >.

bool get_neighbors ( Elem::array_type elems,
Elem::index_type  i,
DElem::index_type  delem 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void get_neighbors ( Elem::array_type elems,
Elem::index_type  i 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void get_neighbors ( Node::array_type nodes,
Node::index_type  i 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

size_type get_ni ( ) const
inline
size_type get_nj ( ) const
inline
size_type get_nk ( ) const
inline
void get_node ( Core::Geometry::Point point,
Node::index_type  i 
)
inline
boost::shared_ptr< SearchGridT< SCIRun::index_type > > get_node_search_grid ( )
virtual
void get_nodes ( Node::array_type nodes,
Node::index_type  i 
) const
virtual

Topological functions: note that currently most meshes have an incomplete set implemented. Currently each mesh has: Getting cell, face, edge indices from node indices Getting the indices of the elements that are topologically building up the the element: e.g. one can derive faces from a cell index but not YET vice versa. Get the nodes that make up an element Depending on the geometry not every function may be available

void get_nodes ( Node::array_type nodes,
Edge::index_type  i 
) const
virtual
void get_nodes ( Node::array_type nodes,
Face::index_type  i 
) const
virtual
void get_nodes ( Node::array_type nodes,
Cell::index_type  i 
) const
virtual
void get_nodes ( Node::array_type nodes,
Elem::index_type  i 
) const
virtual
void get_nodes ( Node::array_type nodes,
DElem::index_type  i 
) const
virtual
void get_normal ( Core::Geometry::Vector result,
coords_type coords,
Elem::index_type  eidx,
DElem::index_type  fidx 
) const
virtual

Get the normal to an element if this is a valid operation. This is only implemented for surface and volume meshes. As elements can be curved the coordinates specify where on the element one wants to compute the normal. This is the volumetric version where one has to specify as well which face is involved.

Reimplemented in VUnstructuredMesh< MESH >.

void get_normal ( Core::Geometry::Vector result,
coords_type coords,
Elem::index_type  eidx 
) const
inline

This is the surface version.

void get_normal ( Core::Geometry::Vector norm,
Node::index_type  i 
) const
virtual

Get node normals, needed for visualization.

Reimplemented in VUnstructuredMesh< MESH >.

void get_normals ( std::vector< Core::Geometry::Vector > &  result,
std::vector< coords_type > &  coords,
Elem::index_type  eidx 
) const
inline

Multiple normals short cut.

void get_point ( Core::Geometry::Point point,
Node::index_type  i 
) const
inline

Get the location of a point. As the old interface used both get_point and get_center, these are short cuts to the one implementation that is done under the name get_center.

void get_point ( Core::Geometry::Point point,
ENode::index_type  i 
) const
inline
Core::Geometry::Point get_point ( Node::index_type  i) const
inline
Core::Geometry::Point get_point ( ENode::index_type  i) const
inline
Point * get_points_pointer ( ) const
virtual

These should only be used to speed up code within proper wrappers and after checking the type of the underlying mesh as they allow direct access to the mesh memory

Reimplemented in VUnstructuredMesh< MESH >.

void get_quadratic_derivate_weights ( coords_type coords,
std::vector< double > &  weights 
)
virtual
void get_quadratic_weights ( coords_type coords,
std::vector< double > &  weights 
)
virtual
void get_random_point ( Core::Geometry::Point p,
Elem::index_type  i,
FieldRNG rng 
) const
virtual

Get the location of a random point inside the mesh.

Set and get a node location. Node set is only available for editable meshes

Reimplemented in VUnstructuredMesh< MESH >.

void get_regular_scheme ( std::vector< VMesh::coords_type > &  coords,
std::vector< double > &  weights,
int  order 
) const
virtual

Reimplemented in VMeshShared< MESH >.

double get_size ( Node::index_type  ) const
inline

Get the geometrical sizes of the mesh elements For nodes and enodes there is no size, hence predefine them in case some makes the call

double get_size ( ENode::index_type  ) const
inline
double get_size ( Edge::index_type  i) const
virtual

Get the geometrical size of topological mesh components.

Reimplemented in VUnstructuredMesh< MESH >.

double get_size ( Face::index_type  i) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

double get_size ( Cell::index_type  i) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

double get_size ( Elem::index_type  i) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

double get_size ( DElem::index_type  i) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

double get_size ( Node::array_type array) const
virtual

Get the size of an element. This function is intended to check for zero volume elements before adding an element to a mesh.

Transform get_transform ( ) const
virtual

Get the transform from a regular field.

double get_volume ( Cell::index_type  i) const
inline
double get_volume ( Elem::index_type  i) const
inline
void get_weights ( const coords_type coords,
std::vector< double > &  weights,
int  basis_order 
) const
virtual

Old get_weights function, in this case the user needs to know about basis order and the basis order that is needed must be given. Also this function implies a certain ordering of the weights and this function only remains in order to provide a sense of backwards compatiblity.

Reimplemented in VMeshShared< MESH >.

bool has_normals ( )
inline
double inscribed_circumscribed_radius_metric ( Elem::index_type  idx) const
virtual

Scaled inscribed to circumscribed ratio.

void insert_node_into_elem ( Elem::array_type newelems,
Node::index_type newnode,
Elem::index_type  elem,
Core::Geometry::Point point 
)
virtual

Currently only available for tetrahedra, triangles and curves.

void interpolate ( Core::Geometry::Point p,
const coords_type coords,
Elem::index_type  i 
) const
virtual

Interpolate from local coordinates to global coordinates.

Reimplemented in VUnstructuredMesh< MESH >.

double inverse_jacobian ( const coords_type coords,
Elem::index_type  idx,
double *  Ji 
) const
virtual

Get the inverse jacobian matrix. This gives as side product the determinant of the inverse matrix.

Reimplemented in VUnstructuredMesh< MESH >.

bool is_constantmesh ( )
inline

Check order of mesh.

bool is_crv_element ( )
inline
bool is_cubicmesh ( )
inline
virtual bool is_curvemesh ( )
inlinevirtual
bool is_editable ( )
inline
bool is_empty ( ) const
inline

test for special case where the mesh is empty empty meshes may need a special treatment

bool is_hex_element ( )
inline
virtual bool is_hexvolmesh ( )
inlinevirtual
virtual bool is_imagemesh ( )
inlinevirtual
bool is_irregularmesh ( )
inline
virtual bool is_latvolmesh ( )
inlinevirtual
bool is_line ( )
inline
bool is_linearmesh ( )
inline
bool is_nonlinearmesh ( )
inline
bool is_pnt_element ( )
inline

Test for the type of elements.

bool is_point ( )
inline
virtual bool is_pointcloudmesh ( )
inlinevirtual

check the type of mesh

bool is_prism_element ( )
inline
virtual bool is_prismvolmesh ( )
inlinevirtual
bool is_quad_element ( )
inline
bool is_quadraticmesh ( )
inline
virtual bool is_quadsurfmesh ( )
inlinevirtual
bool is_regularmesh ( )
inline
virtual bool is_scanlinemesh ( )
inlinevirtual
virtual bool is_structcurvemesh ( )
inlinevirtual
virtual bool is_structhexvolmesh ( )
inlinevirtual
virtual bool is_structquadsurfmesh ( )
inlinevirtual
bool is_structuredmesh ( )
inline
bool is_surface ( )
inline
bool is_tet_element ( )
inline
virtual bool is_tetvolmesh ( )
inlinevirtual
bool is_tri_element ( )
inline
virtual bool is_trisurfmesh ( )
inlinevirtual
bool is_unstructuredmesh ( )
inline
bool is_volume ( )
inline
void jacobian ( const coords_type coords,
Elem::index_type  idx,
double *  J 
) const
virtual

Get the jacobian of the local to global transformation Note J needs to be a least an array of 9 values. Coords and idx again specify the element and the position in local coordinates.

Reimplemented in VUnstructuredMesh< MESH >.

double jacobian_metric ( const Elem::index_type  idx) const
virtual

Jacobian of local to global transformation.

Reimplemented in VUnstructuredMesh< MESH >.

bool locate ( VMesh::Node::index_type i,
const Core::Geometry::Point point 
) const
virtual

Locate where a position is in the mesh The node version finds the closest node The element version find the element that contains the point

Reimplemented in VUnstructuredMesh< MESH >.

bool locate ( VMesh::Elem::index_type i,
const Core::Geometry::Point point 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

bool locate ( VMesh::Elem::index_type i,
VMesh::coords_type coords,
const Core::Geometry::Point point 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

bool locate ( VMesh::Elem::array_type a,
const Core::Geometry::BBox bbox 
) const
virtual

Find elements that are inside or close to the bounding box. This function uses the underlying search structure to find candidates that are close. This functionality is general intended to speed up searching for elements in a certain region.

Reimplemented in VUnstructuredMesh< MESH >.

void minterpolate ( std::vector< Core::Geometry::Point > &  p,
const std::vector< coords_type > &  coords,
Elem::index_type  i 
) const
virtual

Multiple interpolations from local coordinates to global coordinates.

Reimplemented in VUnstructuredMesh< MESH >.

void mlocate ( std::vector< Node::index_type > &  i,
const std::vector< Core::Geometry::Point > &  point 
) const
virtual

multi locate functions. An 'm' in front of a function tends to denote that this function is vectorized for convenience. Depending on the underlying functionality it calls the single case multiple times or adds some optimization. In this case optimization occurs by assuming the points are close together and previous node or element indices are tested first to see if that is the index for the next one in the array Hence in optimal cases the search is reduced to a few points for a cloud of points

Reimplemented in VUnstructuredMesh< MESH >.

void mlocate ( std::vector< Elem::index_type > &  i,
const std::vector< Core::Geometry::Point > &  point 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void node_reserve ( size_t  size)
virtual

Preallocate memory for better performance We have two versions for historic reasons

Reimplemented in VUnstructuredMesh< MESH >.

size_type num_cells ( ) const
inline
size_type num_delems ( ) const
inline
size_type num_edges ( ) const
inline
unsigned int num_edges_per_elem ( )
inline
unsigned int num_edges_per_face ( )
inline
size_type num_elems ( ) const
inline
size_type num_enodes ( ) const
inline
unsigned int num_enodes_per_elem ( )
inline
size_type num_faces ( ) const
inline
unsigned int num_faces_per_elem ( )
inline
unsigned int num_gradients_per_node ( )
inline
size_type num_nodes ( ) const
inline

We have been using the num_::type#() in other functions as well to determine the number of nodes, edges etc. These are just shortcuts to make programs more readable

unsigned int num_nodes_per_edge ( )
inline
unsigned int num_nodes_per_elem ( )
inline
unsigned int num_nodes_per_face ( )
inline
void pwl_approx_edge ( coords_array_type coords,
Elem::index_type  ci,
unsigned int  which_edge,
unsigned int  div_per_unit 
) const
virtual

Draw non linear elements.

Reimplemented in VUnstructuredMesh< MESH >.

void pwl_approx_face ( coords_array2_type coords,
Elem::index_type  ci,
unsigned int  which_face,
unsigned int  div_per_unit 
) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void reserve_elems ( size_t  size)
inline
void reserve_nodes ( size_t  size)
inline
void resize_elems ( size_t  size)
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void resize_nodes ( size_t  size)
virtual

Actually resize the arrays. Note: this is limited to certain meshes

Reimplemented in VUnstructuredMesh< MESH >.

void resize_points ( size_t  size)
inline
double scaled_jacobian_metric ( const Elem::index_type  idx) const
virtual

Element Quality metrics:

Scaled jacobian of local to global transformation

Reimplemented in VUnstructuredMesh< MESH >.

void set_enode ( const Core::Geometry::Point point,
ENode::index_type  i 
)
inline
void set_node ( const Core::Geometry::Point point,
Node::index_type  i 
)
inline

alternative calls

void set_nodes ( Node::array_type array,
Edge::index_type  idx 
)
virtual
void set_nodes ( Node::array_type array,
Face::index_type  idx 
)
virtual
void set_nodes ( Node::array_type array,
Cell::index_type  idx 
)
virtual
void set_nodes ( Node::array_type array,
Elem::index_type  idx 
)
virtual
void set_point ( const Core::Geometry::Point point,
Node::index_type  i 
)
virtual

Set the location of a point. Note: one must be the single user of the mesh to do this

Reimplemented in VUnstructuredMesh< MESH >.

void set_point ( const Core::Geometry::Point point,
ENode::index_type  i 
)
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void set_transform ( const Core::Geometry::Transform t)
virtual

Set the transform of a regular field.

void size ( Node::size_type size) const
virtual

Get the number of elements in the mesh of the specified type Note: that for any size other then the number of nodes or elements, one has to synchronize that part of the mesh.

Reimplemented in VUnstructuredMesh< MESH >.

void size ( ENode::size_type size) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void size ( Edge::size_type size) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void size ( Face::size_type size) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void size ( Cell::size_type size) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void size ( Elem::size_type size) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

void size ( DElem::size_type size) const
virtual

Reimplemented in VUnstructuredMesh< MESH >.

bool synchronize ( unsigned int  sync)
virtual

This call is for synchronizing tables of precomputed elements.

Reimplemented in VMeshShared< MESH >.

void to_index ( Node::index_type idx,
index_type  i,
index_type  j,
index_type  k 
)
inline

To index generates a new successive index.

void to_index ( Node::index_type idx,
index_type  i,
index_type  j 
)
inline
void to_index ( Elem::index_type idx,
index_type  i,
index_type  j,
index_type  k 
)
inline
void to_index ( Elem::index_type idx,
index_type  i,
index_type  j 
)
inline
void to_index ( Cell::index_type idx,
index_type  i,
index_type  j,
index_type  k 
)
inline
void to_index ( Face::index_type idx,
index_type  i,
index_type  j 
)
inline
void transform ( const Core::Geometry::Transform t)
virtual

Reimplemented in VMeshShared< MESH >.

bool unsynchronize ( unsigned int  sync)
virtual

Reimplemented in VMeshShared< MESH >.

double volume_metric ( const Elem::index_type  idx) const
inline

Volume of an element.

Member Data Documentation

int basis_order_
protected

Properties of meshes that do not change during the lifetime of the mesh and hence they can be stored for fast use.

int dimension_
protected
double element_size_
protected

Size in local coordinate system.

unsigned int generation_
protected

generation number of mesh

bool has_normals_
protected

Mesh properties.

bool is_editable_
protected
bool is_regular_
protected
bool is_structured_
protected
size_type ni_
protected

size of structured meshes unstructured mesh denote the number of nodes in ni_

size_type nj_
protected
size_type nk_
protected
unsigned int num_edges_per_elem_
protected
unsigned int num_edges_per_face_
protected
unsigned int num_enodes_per_elem_
protected
unsigned int num_faces_per_elem_
protected
unsigned int num_gradients_per_node_
protected
unsigned int num_nodes_per_elem_
protected

Mesh statistics.

unsigned int num_nodes_per_face_
protected
coords_type unit_center_
protected
nodes_array_type unit_edges_
protected
coords_array_type unit_vertices_
protected

Definitions of local element topology.


The documentation for this class was generated from the following files: