SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
CurveMesh< Basis > Class Template Reference

Declarations for virtual interface. More...

#include <CurveMesh.h>

Inheritance diagram for CurveMesh< Basis >:
Mesh Datatype MeshTraits< VMesh > Persistent HasId< IdType, IdGenerator >

Classes

struct  Cell
 
struct  Edge
 
class  ElemData
 
struct  Face
 
struct  Node
 Index and Iterator types required for Mesh Concept. More...
 

Public Types

typedef SCIRun::index_type under_type
 
typedef SCIRun::index_type index_type
 
typedef SCIRun::size_type size_type
 
typedef SCIRun::mask_type mask_type
 
typedef boost::shared_ptr
< CurveMesh< Basis > > 
handle_type
 
typedef Basis basis_type
 
typedef Edge Elem
 
typedef Node DElem
 
typedef std::pair< typename
Node::index_type, typename
Node::index_type
index_pair_type
 
- Public Types inherited from Mesh
enum  {
  UNKNOWN = 0, STRUCTURED = 1 << 1, UNSTRUCTURED = 1 << 2, REGULAR = 1 << 3,
  IRREGULAR = 1 << 4
}
 These will become obsolete at some point. More...
 
enum  {
  NONE_E = 0, NODES_E = 1 << 0, EDGES_E = 1 << 1, FACES_E = 1 << 2,
  CELLS_E = 1 << 3, ELEMS_E = 1 << 4, DELEMS_E = 1 << 5, ENODES_E = 1 << 6,
  ALL_ELEMENTS_E = NODES_E | EDGES_E | FACES_E | CELLS_E | ENODES_E | ELEMS_E | DELEMS_E, NORMALS_E = 1 << 7, NODE_NEIGHBORS_E = 1 << 8, ELEM_NEIGHBORS_E = 1 << 9,
  NEIGHBORS_E = NODE_NEIGHBORS_E | ELEM_NEIGHBORS_E, NODE_LOCATE_E = 1 << 10, ELEM_LOCATE_E = 1 << 11, LOCATE_E = NODE_LOCATE_E | ELEM_LOCATE_E,
  EPSILON_E = 1 << 12, BOUNDING_BOX_E = 1 << 12, FIND_CLOSEST_NODE_E = 1 << 13, FIND_CLOSEST_ELEM_E = 1 << 14,
  FIND_CLOSEST_E = FIND_CLOSEST_NODE_E | FIND_CLOSEST_ELEM_E
}
 Synchronize system. More...
 
- Public Types inherited from Datatype
typedef HasIntegerId::id_type id_type
 
- Public Types inherited from HasId< IdType, IdGenerator >
typedef IdType id_type
 
- Public Types inherited from MeshTraits< VMesh >
typedef SCIRun::mask_type mask_type
 
typedef SCIRun::index_type under_type
 
typedef SCIRun::index_type index_type
 
typedef SCIRun::index_type size_type
 
typedef std::vector< index_typearray_type
 
typedef std::vector< size_typedimension_type
 
typedef boost::shared_ptr
< MeshFacade< VMesh > > 
MeshFacadeHandle
 

Public Member Functions

 CurveMesh ()
 
 CurveMesh (const CurveMesh &copy)
 Copy a mesh, needed for detaching the mesh from a field. More...
 
virtual CurveMeshclone () const
 
MeshFacadeHandle getFacade () const
 
virtual ~CurveMesh ()
 
virtual VMeshvmesh ()
 Obtain the virtual interface pointer. More...
 
virtual int basis_order ()
 
virtual int dimensionality () const
 Topological dimension. More...
 
virtual int topology_geometry () const
 
virtual Core::Geometry::BBox get_bounding_box () const
 Get the bounding box of the field. More...
 
virtual void get_canonical_transform (Core::Geometry::Transform &t) const
 
virtual void compute_bounding_box ()
 
virtual void transform (const Core::Geometry::Transform &t)
 Transform a field. More...
 
virtual bool is_editable () const
 Check whether mesh can be altered by adding nodes or elements. More...
 
virtual bool has_normals () const
 Has this mesh normals. More...
 
virtual bool synchronize (mask_type sync)
 
virtual bool unsynchronize (mask_type sync)
 
bool clear_synchronization ()
 
Basis & get_basis ()
 Get the basis class. More...
 
void begin (typename Node::iterator &) const
 begin/end iterators More...
 
void begin (typename Edge::iterator &) const
 
void begin (typename Face::iterator &) const
 
void begin (typename Cell::iterator &) const
 
void end (typename Node::iterator &) const
 
void end (typename Edge::iterator &) const
 
void end (typename Face::iterator &) const
 
void end (typename Cell::iterator &) const
 
void size (typename Node::size_type &) const
 Get the iteration sizes. More...
 
void size (typename Edge::size_type &) const
 
void size (typename Face::size_type &) const
 
void size (typename Cell::size_type &) const
 
void to_index (typename Node::index_type &index, index_type i) const
 
void to_index (typename Edge::index_type &index, index_type i) const
 
void to_index (typename Face::index_type &, index_type) const
 
void to_index (typename Cell::index_type &, index_type) const
 
void get_nodes (typename Node::array_type &array, typename Node::index_type idx) const
 Get the child elements of the given index. More...
 
void get_nodes (typename Node::array_type &array, typename Edge::index_type idx) const
 
void get_nodes (typename Node::array_type &, typename Face::index_type) const
 
void get_nodes (typename Node::array_type &, typename Cell::index_type) const
 
void get_edges (typename Edge::array_type &array, typename Node::index_type idx) const
 
void get_edges (typename Edge::array_type &array, typename Edge::index_type idx) const
 
void get_edges (typename Edge::array_type &, typename Face::index_type) const
 
void get_edges (typename Edge::array_type &, typename Cell::index_type) const
 
void get_faces (typename Face::array_type &, typename Node::index_type) const
 
void get_faces (typename Face::array_type &, typename Edge::index_type) const
 
void get_faces (typename Face::array_type &, typename Face::index_type) const
 
void get_faces (typename Face::array_type &, typename Cell::index_type) const
 
void get_cells (typename Cell::array_type &, typename Node::index_type) const
 
void get_cells (typename Cell::array_type &, typename Edge::index_type) const
 
void get_cells (typename Cell::array_type &, typename Face::index_type) const
 
void get_cells (typename Cell::array_type &, typename Cell::index_type) const
 
void get_elems (typename Elem::array_type &array, typename Node::index_type idx) const
 
void get_elems (typename Elem::array_type &array, typename Edge::index_type idx) const
 
void get_elems (typename Elem::array_type &, typename Face::index_type) const
 
void get_elems (typename Face::array_type &, typename Cell::index_type) const
 
void get_delems (typename DElem::array_type &array, typename Node::index_type idx) const
 
void get_delems (typename DElem::array_type &array, typename Edge::index_type idx) const
 
void get_delems (typename DElem::array_type &, typename Face::index_type) const
 
void get_delems (typename DElem::array_type &, typename Cell::index_type) const
 
template<class VECTOR >
void pwl_approx_edge (VECTOR &coords, typename Elem::index_type, unsigned int which_edge, unsigned int div_per_unit) const
 
template<class VECTOR >
void pwl_approx_face (VECTOR &, typename Elem::index_type, typename Face::index_type, unsigned int) const
 
void get_center (Core::Geometry::Point &result, typename Node::index_type idx) const
 get the center point (in object space) of an element More...
 
void get_center (Core::Geometry::Point &, typename Edge::index_type) const
 
void get_center (Core::Geometry::Point &, typename Face::index_type) const
 
void get_center (Core::Geometry::Point &, typename Cell::index_type) const
 
const Core::Geometry::Pointpoint (typename Node::index_type i) const
 
double get_size (typename Node::index_type) const
 Get the size of an element (length, area, volume) More...
 
double get_size (typename Edge::index_type idx) const
 
double get_size (typename Face::index_type) const
 
double get_size (typename Cell::index_type) const
 
double get_length (typename Edge::index_type idx) const
 More specific names for get_size. More...
 
double get_area (typename Face::index_type) const
 
double get_volume (typename Cell::index_type) const
 
bool get_neighbor (typename Elem::index_type &neighbor, typename Elem::index_type edge, typename DElem::index_type node) const
 
void get_neighbors (std::vector< typename Node::index_type > &array, typename Node::index_type idx) const
 These are more general neighbor functions. More...
 
bool get_neighbors (std::vector< typename Elem::index_type > &array, typename Elem::index_type edge, typename DElem::index_type idx) const
 
void get_neighbors (std::vector< typename Elem::index_type > &array, typename Elem::index_type idx) const
 
bool locate (typename Node::index_type &i, const Core::Geometry::Point &p) const
 Locate a point in a mesh, find which is the closest node. More...
 
bool locate (typename Edge::index_type &i, const Core::Geometry::Point &p) const
 
bool locate (typename Face::index_type &, const Core::Geometry::Point &) const
 
bool locate (typename Cell::index_type &, const Core::Geometry::Point &) const
 
int get_weights (const Core::Geometry::Point &p, typename Node::array_type &l, double *w)
 
int get_weights (const Core::Geometry::Point &p, typename Edge::array_type &l, double *w)
 
int get_weights (const Core::Geometry::Point &, typename Face::array_type &, double *)
 
int get_weights (const Core::Geometry::Point &, typename Cell::array_type &, double *)
 
void get_point (Core::Geometry::Point &result, typename Node::index_type idx) const
 Access the nodes of the mesh. More...
 
void set_point (const Core::Geometry::Point &point, typename Node::index_type index)
 
void get_random_point (Core::Geometry::Point &p, typename Elem::index_type i, FieldRNG &r) const
 
void get_normal (Core::Geometry::Vector &, typename Node::index_type) const
 Normals for visualizations. More...
 
template<class VECTOR , class INDEX1 , class INDEX2 >
void get_normal (Core::Geometry::Vector &, VECTOR &, INDEX1, INDEX2) const
 
Node::index_type add_node (const Core::Geometry::Point &p)
 use these to build up a new contour mesh More...
 
Node::index_type add_point (const Core::Geometry::Point &point)
 
Edge::index_type add_edge (typename Node::index_type i1, typename Node::index_type i2)
 
template<class ARRAY >
Elem::index_type add_elem (ARRAY a)
 
void node_reserve (size_type s)
 
void elem_reserve (size_type s)
 
void resize_nodes (size_type s)
 
void resize_elems (size_type s)
 
template<class VECTOR , class INDEX >
bool get_coords (VECTOR &coords, const Core::Geometry::Point &p, INDEX idx) const
 
template<class VECTOR , class INDEX >
void interpolate (Core::Geometry::Point &pt, const VECTOR &coords, INDEX idx) const
 
template<class VECTOR1 , class INDEX , class VECTOR2 >
void derivate (const VECTOR1 &coords, INDEX idx, VECTOR2 &J) const
 
template<class VECTOR , class INDEX >
double det_jacobian (const VECTOR &coords, INDEX idx) const
 
template<class VECTOR , class INDEX >
void jacobian (const VECTOR &coords, INDEX idx, double *J) const
 
template<class VECTOR , class INDEX >
double inverse_jacobian (const VECTOR &coords, INDEX idx, double *Ji) const
 
template<class INDEX >
double scaled_jacobian_metric (INDEX idx) const
 
template<class INDEX >
double jacobian_metric (INDEX idx) const
 
template<class INDEX >
bool locate_node (INDEX &idx, const Core::Geometry::Point &p) const
 
template<class INDEX >
bool locate_elem (INDEX &idx, const Core::Geometry::Point &p) const
 
template<class ARRAY >
bool locate_elems (ARRAY &array, const Core::Geometry::BBox &b) const
 
template<class INDEX , class ARRAY >
bool locate_elem (INDEX &idx, ARRAY &coords, const Core::Geometry::Point &p) const
 
template<class INDEX >
bool find_closest_node (double &pdist, Core::Geometry::Point &result, INDEX &idx, const Core::Geometry::Point &point) const
 Find the closest element to a point. More...
 
template<class INDEX >
bool find_closest_node (double &pdist, Core::Geometry::Point &result, INDEX &idx, const Core::Geometry::Point &point, double maxdist) const
 Find the closest element to a point. More...
 
template<class ARRAY >
bool find_closest_nodes (ARRAY &nodes, const Core::Geometry::Point &point, double maxdist) const
 
template<class ARRAY1 , class ARRAY2 >
bool find_closest_nodes (ARRAY1 &distances, ARRAY2 &nodes, const Core::Geometry::Point &point, double maxdist) const
 
template<class INDEX , class ARRAY >
bool find_closest_elem (double &pdist, Core::Geometry::Point &result, ARRAY &coords, INDEX &idx, const Core::Geometry::Point &p) const
 Find the closest element to a point. More...
 
template<class INDEX , class ARRAY >
bool find_closest_elem (double &pdist, Core::Geometry::Point &result, ARRAY &coords, INDEX &idx, const Core::Geometry::Point &p, double maxdist) const
 Find the closest element to a point. More...
 
template<class INDEX >
bool find_closest_elem (double &pdist, Core::Geometry::Point &result, INDEX &elem, const Core::Geometry::Point &p) const
 
template<class ARRAY >
bool find_closest_elems (double &pdist, Core::Geometry::Point &result, ARRAY &elems, const Core::Geometry::Point &p) const
 Find the closest elements to a point. More...
 
double get_epsilon () const
 
virtual void io (Piostream &)
 Export this class using the old Pio system. More...
 
virtual std::string dynamic_type_name () const
 
virtual const TypeDescriptionget_type_description () const
 
Node::index_type delete_node (typename Node::index_type i1)
 
Node::index_type delete_nodes (typename Node::index_type i1, typename Node::index_type i2)
 
Edge::index_type delete_edge (typename Edge::index_type i1)
 
Edge::index_type delete_edges (typename Edge::index_type i1, typename Edge::index_type i2)
 
- Public Member Functions inherited from Mesh
 Mesh ()
 
 Mesh (const Mesh &copy)
 
virtual ~Mesh ()
 
void io (Piostream &stream)
 Persistent I/O. More...
 
- Public Member Functions inherited from Datatype
 Datatype ()
 
virtual ~Datatype ()
 
 Datatype (const Datatype &other)
 
Datatypeoperator= (const Datatype &rhs)
 
template<typename T >
const T * as () const
 
- Public Member Functions inherited from Persistent
virtual ~Persistent ()
 
- Public Member Functions inherited from HasId< IdType, IdGenerator >
 HasId ()
 
IdType id () const
 

Static Public Member Functions

static const std::string type_name (int n=-1)
 Core functionality for getting the name of a templated mesh class. More...
 
static const TypeDescriptionnode_type_description ()
 
static const TypeDescriptionedge_type_description ()
 
static const TypeDescriptionface_type_description ()
 
static const TypeDescriptioncell_type_description ()
 
static const TypeDescriptionelem_type_description ()
 
static Persistentmaker ()
 This function returns a maker for Pio. More...
 
static MeshHandle mesh_maker ()
 This function returns a handle for the virtual interface. More...
 
- Static Public Member Functions inherited from Mesh
static const std::string type_name (int n=-1)
 
- Static Public Member Functions inherited from Persistent
static PersistentTypeIDPtr find_derived (const std::string &classname, const std::string &basename)
 
static bool is_base_of (const std::string &parent, const std::string &type)
 
static void add_class (const std::string &type, const std::string &parent, Persistent *(*maker)(), Persistent *(*bc_maker1)()=0, Persistent *(*bc_maker2)()=0)
 
static void add_mesh_class (const std::string &type, Persistent *(*maker)(), Persistent *(*bc_maker1)()=0, Persistent *(*bc_maker2)()=0)
 
static void add_field_class (const std::string &type, Persistent *(*maker)(), Persistent *(*bc_maker1)()=0, Persistent *(*bc_maker2)()=0)
 

Static Public Attributes

static PersistentTypeID curvemesh_typeid
 Add an entry into the database for Pio. More...
 
- Static Public Attributes inherited from Mesh
static PersistentTypeID type_id
 

Protected Types

typedef std::vector
< std::vector< typename
Edge::index_type > > 
NodeNeighborMap
 

Protected Member Functions

template<class ARRAY , class INDEX >
void get_nodes_from_edge (ARRAY &array, INDEX idx) const
 
template<class ARRAY , class INDEX >
void get_edges_from_node (ARRAY &array, INDEX idx) const
 
template<class ARRAY , class INDEX >
void get_nodes_from_elem (ARRAY &array, INDEX idx) const
 
template<class ARRAY , class INDEX >
void get_edges_from_elem (ARRAY &array, INDEX idx) const
 
template<class ARRAY , class INDEX >
void set_nodes_by_elem (ARRAY &array, INDEX idx)
 
template<class INDEX1 , class INDEX2 >
bool get_elem_neighbor (INDEX1 &neighbor, INDEX1 edge, INDEX2 node) const
 
template<class ARRAY , class INDEX >
void get_node_neighbors (ARRAY &array, INDEX idx) const
 
template<class ARRAY , class INDEX1 , class INDEX2 >
bool get_elem_neighbors (ARRAY &array, INDEX1, INDEX2 idx) const
 
template<class ARRAY , class INDEX >
void get_elem_neighbors (ARRAY &array, INDEX idx) const
 
bool inside2_p (index_type idx, const Core::Geometry::Point &p, double &coord) const
 
double distance2_p (index_type idx, const Core::Geometry::Point &p, Core::Geometry::Point &projection, double &coord) const
 
void compute_node_neighbors ()
 Compute the inverse route of connectivity: from node to edge. More...
 

Protected Attributes

std::vector
< Core::Geometry::Point
points_
 Vector with the node locations. More...
 
std::vector< index_typeedges_
 Vector with connectivity data. More...
 
Basis basis_
 The basis function, contains additional information on elements. More...
 
mask_type synchronized_
 Record which parts of the mesh are synchronized. More...
 
Core::Thread::Mutex synchronize_lock_
 Lock to synchronize between threads. More...
 
NodeNeighborMap node_neighbors_
 
Core::Geometry::BBox bbox_
 
double epsilon_
 
double epsilon2_
 
double epsilon3_
 
boost::shared_ptr< VMeshvmesh_
 

Friends

template<class MESH >
class VCurveMesh
 Make sure the virtual interface has access. More...
 
template<class MESH >
class VMeshShared
 
template<class MESH >
class VUnstructuredMesh
 
class ElemData
 

Detailed Description

template<class Basis>
class SCIRun::CurveMesh< Basis >

Declarations for virtual interface.

Declarations for CurveMesh class.

Member Typedef Documentation

typedef Basis basis_type
typedef Node DElem
typedef Edge Elem

Elem refers to the most complex topological object DElem refers to object just below Elem in the topological hierarchy

typedef boost::shared_ptr<CurveMesh<Basis> > handle_type
typedef std::pair<typename Node::index_type, typename Node::index_type> index_pair_type

Definition specific to this class (should at some point jsut remove this and make it similar to the other classes)

typedef std::vector<std::vector<typename Edge::index_type> > NodeNeighborMap
protected

Vector indicating which edges are conected to which node. This is the reverse of the connectivity data stored in the edges_ array.

Constructor & Destructor Documentation

CurveMesh ( )

Initialize the virtual interface when the mesh is created

CurveMesh ( const CurveMesh< Basis > &  copy)

Copy a mesh, needed for detaching the mesh from a field.

We need to lock before we can copy these as these structures are generate dynamically when they are needed.

Create a new virtual interface for this copy all pointers have changed hence create a new virtual interface class

~CurveMesh ( )
virtual

Member Function Documentation

Edge::index_type add_edge ( typename Node::index_type  i1,
typename Node::index_type  i2 
)
inline
Elem::index_type add_elem ( ARRAY  a)
inline
Node::index_type add_node ( const Core::Geometry::Point p)
inline

use these to build up a new contour mesh

Node::index_type add_point ( const Core::Geometry::Point point)
inline
virtual int basis_order ( )
inlinevirtual

This one should go at some point, should be reroute through the virtual interface

Reimplemented from Mesh.

void begin ( typename Node::iterator ) const

begin/end iterators

void begin ( typename Edge::iterator ) const
void begin ( typename Face::iterator ) const
void begin ( typename Cell::iterator ) const
const TypeDescription * cell_type_description ( )
static
bool clear_synchronization ( )
virtual CurveMesh* clone ( ) const
inlinevirtual

Clone function for detaching the mesh and automatically generating a new version if needed.

Implements Mesh.

void compute_bounding_box ( )
virtual
void compute_node_neighbors ( )
protected

Compute the inverse route of connectivity: from node to edge.

Edge::index_type delete_edge ( typename Edge::index_type  i1)
inline
Edge::index_type delete_edges ( typename Edge::index_type  i1,
typename Edge::index_type  i2 
)
inline
Node::index_type delete_node ( typename Node::index_type  i1)
inline

Functions local to CurveMesh, the latter are not thread safe THESE ARE NOT WELL INTEGRATED YET

Node::index_type delete_nodes ( typename Node::index_type  i1,
typename Node::index_type  i2 
)
inline
void derivate ( const VECTOR1 &  coords,
INDEX  idx,
VECTOR2 &  J 
) const
inline

Interpolate the derivate of the function, This infact will return the jacobian of the local to global coordinate transformation. This function is mainly intended for the non linear elements

double det_jacobian ( const VECTOR &  coords,
INDEX  idx 
) const
inline

Get the determinant of the jacobian, which is the local volume of an element and is intended to help with the integration of functions over an element.

virtual int dimensionality ( ) const
inlinevirtual

Topological dimension.

double distance2_p ( index_type  idx,
const Core::Geometry::Point p,
Core::Geometry::Point projection,
double &  coord 
) const
protected
virtual std::string dynamic_type_name ( ) const
inlinevirtual
const TypeDescription * edge_type_description ( )
static
void elem_reserve ( size_type  s)
inline
static const TypeDescription* elem_type_description ( )
inlinestatic
void end ( typename Node::iterator ) const
void end ( typename Edge::iterator ) const
void end ( typename Face::iterator ) const
void end ( typename Cell::iterator ) const
const TypeDescription * face_type_description ( )
static
bool find_closest_elem ( double &  pdist,
Core::Geometry::Point result,
ARRAY &  coords,
INDEX &  idx,
const Core::Geometry::Point p 
) const
inline

Find the closest element to a point.

bool find_closest_elem ( double &  pdist,
Core::Geometry::Point result,
ARRAY &  coords,
INDEX &  idx,
const Core::Geometry::Point p,
double  maxdist 
) const
inline

Find the closest element to a point.

If there are no nodes we cannot find the closest one

Test the one in idx

bool find_closest_elem ( double &  pdist,
Core::Geometry::Point result,
INDEX &  elem,
const Core::Geometry::Point p 
) const
inline
bool find_closest_elems ( double &  pdist,
Core::Geometry::Point result,
ARRAY &  elems,
const Core::Geometry::Point p 
) const
inline

Find the closest elements to a point.

If there are no nodes we cannot find the closest one

bool find_closest_node ( double &  pdist,
Core::Geometry::Point result,
INDEX &  idx,
const Core::Geometry::Point point 
) const
inline

Find the closest element to a point.

bool find_closest_node ( double &  pdist,
Core::Geometry::Point result,
INDEX &  idx,
const Core::Geometry::Point point,
double  maxdist 
) const
inline

Find the closest element to a point.

If there are no nodes we cannot find the closest one

bool find_closest_nodes ( ARRAY &  nodes,
const Core::Geometry::Point point,
double  maxdist 
) const
inline
bool find_closest_nodes ( ARRAY1 &  distances,
ARRAY2 &  nodes,
const Core::Geometry::Point point,
double  maxdist 
) const
inline
double get_area ( typename Face::index_type  ) const
inline
Basis& get_basis ( )
inline

Get the basis class.

Core::Geometry::BBox get_bounding_box ( ) const
virtual

Get the bounding box of the field.

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

Return the transformation that takes a 0-1 space bounding box to the current bounding box of this mesh.

void get_cells ( typename Cell::array_type ,
typename Node::index_type   
) const
inline
void get_cells ( typename Cell::array_type ,
typename Edge::index_type   
) const
inline
void get_cells ( typename Cell::array_type ,
typename Face::index_type   
) const
inline
void get_cells ( typename Cell::array_type ,
typename Cell::index_type   
) const
inline
void get_center ( Core::Geometry::Point result,
typename Node::index_type  idx 
) const
inline

get the center point (in object space) of an element

void get_center ( Core::Geometry::Point result,
typename Edge::index_type  idx 
) const
void get_center ( Core::Geometry::Point ,
typename Face::index_type   
) const
inline
void get_center ( Core::Geometry::Point ,
typename Cell::index_type   
) const
inline
bool get_coords ( VECTOR &  coords,
const Core::Geometry::Point p,
INDEX  idx 
) const
inline

Get the local coordinates for a certain point within an element This function uses a couple of newton iterations to find the local coordinate of a point

void get_delems ( typename DElem::array_type array,
typename Node::index_type  idx 
) const
inline
void get_delems ( typename DElem::array_type array,
typename Edge::index_type  idx 
) const
inline
void get_delems ( typename DElem::array_type ,
typename Face::index_type   
) const
inline
void get_delems ( typename DElem::array_type ,
typename Cell::index_type   
) const
inline
void get_edges ( typename Edge::array_type array,
typename Node::index_type  idx 
) const
inline
void get_edges ( typename Edge::array_type array,
typename Edge::index_type  idx 
) const
inline
void get_edges ( typename Edge::array_type ,
typename Face::index_type   
) const
inline
void get_edges ( typename Edge::array_type ,
typename Cell::index_type   
) const
inline
void get_edges_from_elem ( ARRAY &  array,
INDEX  idx 
) const
inlineprotected
void get_edges_from_node ( ARRAY &  array,
INDEX  idx 
) const
inlineprotected
bool get_elem_neighbor ( INDEX1 &  neighbor,
INDEX1  edge,
INDEX2  node 
) const
inlineprotected
bool get_elem_neighbors ( ARRAY &  array,
INDEX1  ,
INDEX2  idx 
) const
inlineprotected
void get_elem_neighbors ( ARRAY &  array,
INDEX  idx 
) const
inlineprotected
void get_elems ( typename Elem::array_type array,
typename Node::index_type  idx 
) const
inline
void get_elems ( typename Elem::array_type array,
typename Edge::index_type  idx 
) const
inline
void get_elems ( typename Elem::array_type ,
typename Face::index_type   
) const
inline
void get_elems ( typename Face::array_type ,
typename Cell::index_type   
) const
inline
double get_epsilon ( ) const
inline
void get_faces ( typename Face::array_type ,
typename Node::index_type   
) const
inline
void get_faces ( typename Face::array_type ,
typename Edge::index_type   
) const
inline
void get_faces ( typename Face::array_type ,
typename Face::index_type   
) const
inline
void get_faces ( typename Face::array_type ,
typename Cell::index_type   
) const
inline
double get_length ( typename Edge::index_type  idx) const
inline

More specific names for get_size.

bool get_neighbor ( typename Elem::index_type neighbor,
typename Elem::index_type  edge,
typename DElem::index_type  node 
) const
inline

Get neighbors of an element or a node THIS ONE IS FLAWED AS IN 3D SPACE A NODE CAN BE CONNECTED TO MANY ELEMENTS

void get_neighbors ( std::vector< typename Node::index_type > &  array,
typename Node::index_type  idx 
) const
inline

These are more general neighbor functions.

bool get_neighbors ( std::vector< typename Elem::index_type > &  array,
typename Elem::index_type  edge,
typename DElem::index_type  idx 
) const
inline
void get_neighbors ( std::vector< typename Elem::index_type > &  array,
typename Elem::index_type  idx 
) const
inline
void get_node_neighbors ( ARRAY &  array,
INDEX  idx 
) const
inlineprotected
void get_nodes ( typename Node::array_type array,
typename Node::index_type  idx 
) const
inline

Get the child elements of the given index.

void get_nodes ( typename Node::array_type array,
typename Edge::index_type  idx 
) const
inline
void get_nodes ( typename Node::array_type ,
typename Face::index_type   
) const
inline
void get_nodes ( typename Node::array_type ,
typename Cell::index_type   
) const
inline
void get_nodes_from_edge ( ARRAY &  array,
INDEX  idx 
) const
inlineprotected
void get_nodes_from_elem ( ARRAY &  array,
INDEX  idx 
) const
inlineprotected
void get_normal ( Core::Geometry::Vector ,
typename Node::index_type   
) const
inline

Normals for visualizations.

void get_normal ( Core::Geometry::Vector ,
VECTOR &  ,
INDEX1  ,
INDEX2   
) const
inline
void get_point ( Core::Geometry::Point result,
typename Node::index_type  idx 
) const
inline

Access the nodes of the mesh.

void get_random_point ( Core::Geometry::Point p,
typename Elem::index_type  i,
FieldRNG r 
) const
double get_size ( typename Node::index_type  ) const
inline

Get the size of an element (length, area, volume)

double get_size ( typename Edge::index_type  idx) const
double get_size ( typename Face::index_type  ) const
inline
double get_size ( typename Cell::index_type  ) const
inline
const TypeDescription * get_type_description ( ) const
virtual

Type description, used for finding names of the mesh class for dynamic compilation purposes. Some of this should be obsolete

Implements Mesh.

double get_volume ( typename Cell::index_type  ) const
inline
int get_weights ( const Core::Geometry::Point p,
typename Node::array_type l,
double *  w 
)

These should become obsolete soon, they do not follow the concept of the basis functions....

int get_weights ( const Core::Geometry::Point p,
typename Edge::array_type l,
double *  w 
)
int get_weights ( const Core::Geometry::Point ,
typename Face::array_type ,
double *   
)
inline
int get_weights ( const Core::Geometry::Point ,
typename Cell::array_type ,
double *   
)
inline
MeshFacadeHandle getFacade ( ) const
inlinevirtual

Implements Mesh.

virtual bool has_normals ( ) const
inlinevirtual

Has this mesh normals.

bool inside2_p ( index_type  idx,
const Core::Geometry::Point p,
double &  coord 
) const
protected
void interpolate ( Core::Geometry::Point pt,
const VECTOR &  coords,
INDEX  idx 
) const
inline

Find the location in the global coordinate system for a local coordinate This function is the opposite of get_coords.

double inverse_jacobian ( const VECTOR &  coords,
INDEX  idx,
double *  Ji 
) const
inline

Get the inverse jacobian of the transformation. This one is needed to translate local gradients into global gradients. Hence it is crucial for calculating gradients of fields, or constructing finite elements.

void io ( Piostream stream)
virtual

Export this class using the old Pio system.

Reimplemented from Persistent.

virtual bool is_editable ( ) const
inlinevirtual

Check whether mesh can be altered by adding nodes or elements.

void jacobian ( const VECTOR &  coords,
INDEX  idx,
double *  J 
) const
inline

Get the jacobian of the transformation. In case one wants the non inverted version of this matrix. This is currentl here for completeness of the interface

double jacobian_metric ( INDEX  idx) const
inline
bool locate ( typename Node::index_type i,
const Core::Geometry::Point p 
) const
inline

Locate a point in a mesh, find which is the closest node.

bool locate ( typename Edge::index_type i,
const Core::Geometry::Point p 
) const
inline
bool locate ( typename Face::index_type ,
const Core::Geometry::Point  
) const
inline
bool locate ( typename Cell::index_type ,
const Core::Geometry::Point  
) const
inline
bool locate_elem ( INDEX &  idx,
const Core::Geometry::Point p 
) const
inline

If there are no nodes we cannot find a closest point

Check whether the estimate given in idx is the point we are looking for

Loop over all nodes to find one that is located inside

bool locate_elem ( INDEX &  idx,
ARRAY &  coords,
const Core::Geometry::Point p 
) const
inline

If there are no nodes we cannot find a closest point

Check whether the estimate given in idx is the point we are looking for

Loop over all nodes to find one that finds

bool locate_elems ( ARRAY &  array,
const Core::Geometry::BBox b 
) const
inline

Loop over all nodes to find one

bool locate_node ( INDEX &  idx,
const Core::Geometry::Point p 
) const
inline

If there are no nodes we cannot find a closest point

Check first guess

Exit if we cannot find one that is closer

static Persistent* maker ( )
inlinestatic

This function returns a maker for Pio.

static MeshHandle mesh_maker ( )
inlinestatic

This function returns a handle for the virtual interface.

void node_reserve ( size_type  s)
inline

Functions to improve memory management. Often one knows how many nodes/elements one needs, prereserving memory is often possible.

const TypeDescription * node_type_description ( )
static
const Core::Geometry::Point& point ( typename Node::index_type  i) const
inline
void pwl_approx_edge ( VECTOR &  coords,
typename Elem::index_type  ,
unsigned int  which_edge,
unsigned int  div_per_unit 
) const
inline

Generate the list of points that make up a sufficiently accurate piecewise linear approximation of an edge.

void pwl_approx_face ( VECTOR &  ,
typename Elem::index_type  ,
typename Face::index_type  ,
unsigned  int 
) const
inline

Generate the list of points that make up a sufficiently accurate piecewise linear approximation of an face.

void resize_elems ( size_type  s)
inline
void resize_nodes ( size_type  s)
inline
double scaled_jacobian_metric ( INDEX  idx) const
inline
void set_nodes_by_elem ( ARRAY &  array,
INDEX  idx 
)
inlineprotected
void set_point ( const Core::Geometry::Point point,
typename Node::index_type  index 
)
inline
void size ( typename Node::size_type ) const

Get the iteration sizes.

void size ( typename Edge::size_type ) const
void size ( typename Face::size_type ) const
void size ( typename Cell::size_type ) const
bool synchronize ( mask_type  sync)
virtual

Compute tables for doing topology, these need to be synchronized before doing a lot of operations.

Test whether we need to synchronize for any of the neighor function calls. If so compute the node_neighbor_ array, which we can use for the element neighbors as well.

Reimplemented from Mesh.

void to_index ( typename Node::index_type index,
index_type  i 
) const
inline

These are here to convert indices to unsigned int counters. Some how the decision was made to use multi dimensional indices in some fields, these functions should deal with different pointer types. Use the virtual interface to avoid all this non sense.

void to_index ( typename Edge::index_type index,
index_type  i 
) const
inline
void to_index ( typename Face::index_type ,
index_type   
) const
inline
void to_index ( typename Cell::index_type ,
index_type   
) const
inline
virtual int topology_geometry ( ) const
inlinevirtual

What kind of mesh is this structured = no connectivity data regular = no node location data

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

Transform a field.

If we have nodes on the edges they should be transformed in the same way

Projecting derivates is more difficult

const std::string type_name ( int  n = -1)
static

Core functionality for getting the name of a templated mesh class.

bool unsynchronize ( mask_type  sync)
virtual

Reimplemented from Mesh.

virtual VMesh* vmesh ( )
inlinevirtual

Obtain the virtual interface pointer.

Reimplemented from Mesh.

Friends And Related Function Documentation

friend class ElemData
friend

Somehow the information of how to interpolate inside an element ended up in a separate class, as they need to share information this construction was created to transfer data. Hopefully in the future this class will disappear again.

friend class VCurveMesh
friend

Make sure the virtual interface has access.

friend class VMeshShared
friend
friend class VUnstructuredMesh
friend

Member Data Documentation

Basis basis_
protected

The basis function, contains additional information on elements.

Core::Geometry::BBox bbox_
protected
PersistentTypeID curvemesh_typeid
static

Add an entry into the database for Pio.

These IDs are created as soon as this class will be instantiated The first one is for Pio and the second for the virtual interface These are currently different as they serve different needs.

std::vector<index_type> edges_
protected

Vector with connectivity data.

double epsilon2_
protected
double epsilon3_
protected
double epsilon_
protected
NodeNeighborMap node_neighbors_
protected
std::vector<Core::Geometry::Point> points_
protected

Vector with the node locations.

Core::Thread::Mutex synchronize_lock_
mutableprotected

Lock to synchronize between threads.

mask_type synchronized_
protected

Record which parts of the mesh are synchronized.

boost::shared_ptr<VMesh> vmesh_
protected

Pointer to virtual interface This one is created as soon as the mesh is generated Put this one in a handle as we have a virtual destructor


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