MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <MixedDimensionMesh.hpp>

Inherits DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Collaboration diagram for MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::vector< Element
< 1, SPACE_DIM >
* >::const_iterator 
CableElementIterator

Public Member Functions

 MixedDimensionMesh (DistributedTetrahedralMeshPartitionType::type partitioningMethod=DistributedTetrahedralMeshPartitionType::METIS_LIBRARY)
 ~MixedDimensionMesh ()
void ConstructFromMeshReader (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader)
void RegisterCableElement (unsigned index)
unsigned GetNumCableElements () const
unsigned GetNumLocalCableElements () const
Element< 1u, SPACE_DIM > * GetCableElement (unsigned globalElementIndex) const
bool CalculateDesignatedOwnershipOfCableElement (unsigned globalElementIndex)
CableElementIterator GetCableElementIteratorBegin () const
CableElementIterator GetCableElementIteratorEnd () const

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)

Private Attributes

std::vector< Element< 1u, SPACE_DIM > * > mCableElements
unsigned mNumCableElements
std::map< unsigned, unsignedmCableElementsMapping

Friends

class boost::serialization::access

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >

A tetrahedral mesh that also supports embedded 1D cable elements.

Could be used for Purkinje or blood vessels, etc.

Definition at line 44 of file MixedDimensionMesh.hpp.


Member Typedef Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
typedef std::vector<Element<1, SPACE_DIM> *>::const_iterator MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::CableElementIterator

Definition of cable element Iterator type.

Definition at line 131 of file MixedDimensionMesh.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::MixedDimensionMesh ( DistributedTetrahedralMeshPartitionType::type  partitioningMethod = DistributedTetrahedralMeshPartitionType::METIS_LIBRARY  )  [inline]

Constructor.

Parameters:
partitioningMethod defaults to METIS_LIBRARY, but in 1-D is always overridden in this constructor to be the DUMB partition

Definition at line 33 of file MixedDimensionMesh.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::~MixedDimensionMesh (  )  [inline]

Destructor - cleans up the cables

Definition at line 39 of file MixedDimensionMesh.cpp.

References MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::mCableElements.


Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::CalculateDesignatedOwnershipOfCableElement ( unsigned  globalElementIndex  )  [inline]

Determine whether or not the current process owns node 0 of this cable element (tie breaker to determine which process writes to file for when two or more share ownership of a cable element).

Parameters:
globalElementIndex is the global index of the cable element

Definition at line 154 of file MixedDimensionMesh.cpp.

References MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::GetCableElement(), and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetDistributedVectorFactory().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader ( AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &  rMeshReader  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
Element< 1u, SPACE_DIM > * MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::GetCableElement ( unsigned  globalElementIndex  )  const [inline]

Get the cable element with a given index in the mesh.

Parameters:
globalElementIndex the global index of the cable element
Returns:
a pointer to the cable element.

Definition at line 139 of file MixedDimensionMesh.cpp.

References EXCEPTION, PetscTools::GetMyRank(), MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::mCableElements, and MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::mCableElementsMapping.

Referenced by MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::CalculateDesignatedOwnershipOfCableElement().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::CableElementIterator MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::GetCableElementIteratorBegin (  )  const [inline]

Return a pointer to the first boundary element in the mesh.

Definition at line 181 of file MixedDimensionMesh.cpp.

References MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::mCableElements.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::CableElementIterator MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::GetCableElementIteratorEnd (  )  const [inline]

Return a pointer to *one past* the last boundary element in the mesh (for consistency with STL iterators).

Definition at line 187 of file MixedDimensionMesh.cpp.

References MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::mCableElements.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::GetNumCableElements (  )  const [inline, virtual]

Get the number of cable elements.

Reimplemented from AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 128 of file MixedDimensionMesh.cpp.

References MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::mNumCableElements.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::GetNumLocalCableElements (  )  const [inline]

Get the number of cable elements on this process.

Definition at line 133 of file MixedDimensionMesh.cpp.

References MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::mCableElements.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::RegisterCableElement ( unsigned  index  )  [inline]

Add the most recently constructed cable element to the global->local cable element mapping

Parameters:
index is the global index of cable element to be registered

Definition at line 122 of file MixedDimensionMesh.cpp.

References MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::mCableElements, and MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::mCableElementsMapping.

Referenced by MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class Archive >
void MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Serialize the mesh.

Parameters:
archive the archive
version the current version of this class

Reimplemented from DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 119 of file MixedDimensionMesh.hpp.


Friends And Related Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
friend class boost::serialization::access [friend]

Needed for serialization.

Reimplemented from DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >.

Definition at line 111 of file MixedDimensionMesh.hpp.


Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<Element<1u, SPACE_DIM>*> MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::mCableElements [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::map<unsigned, unsigned> MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::mCableElementsMapping [private]

A map from global cable index to local index used by this process.

Definition at line 108 of file MixedDimensionMesh.hpp.

Referenced by MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::GetCableElement(), and MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::RegisterCableElement().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::mNumCableElements [private]

The documentation for this class was generated from the following files:
Generated on Thu Dec 22 13:06:09 2011 for Chaste by  doxygen 1.6.3