FineCoarseMeshPair< DIM > Class Template Reference

#include <FineCoarseMeshPair.hpp>

Collaboration diagram for FineCoarseMeshPair< DIM >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FineCoarseMeshPair (TetrahedralMesh< DIM, DIM > &rFineMesh, TetrahedralMesh< DIM, DIM > &rCoarseMesh)
 ~FineCoarseMeshPair ()
void SetUpBoxesOnFineMesh (double boxWidth=-1)
void SetUpBoxesOnCoarseMesh (double boxWidth=-1)
void ComputeFineElementsAndWeightsForCoarseQuadPoints (GaussianQuadratureRule< DIM > &rQuadRule, bool safeMode)
void ComputeFineElementsAndWeightsForCoarseNodes (bool safeMode)
void PrintStatistics ()
void ComputeCoarseElementsForFineNodes (bool safeMode)
void ComputeCoarseElementsForFineElementCentroids (bool safeMode)
std::vector< ElementAndWeights
< DIM > > & 
rGetElementsAndWeights ()
std::vector< unsigned > & rGetCoarseElementsForFineNodes ()
std::vector< unsigned > & rGetCoarseElementsForFineElementCentroids ()
void DeleteFineBoxCollection ()
void DeleteCoarseBoxCollection ()

Private Member Functions

void ComputeFineElementAndWeightForGivenPoint (ChastePoint< DIM > &rPoint, bool safeMode, unsigned boxForThisPoint, unsigned index)
unsigned ComputeCoarseElementForGivenPoint (ChastePoint< DIM > &rPoint, bool safeMode, unsigned boxForThisPoint)
void SetUpBoxes (TetrahedralMesh< DIM, DIM > &rMesh, double boxWidth, BoxCollection< DIM > *&rpBoxCollection)
void CollectElementsInContainingBox (BoxCollection< DIM > *&rpBoxCollection, unsigned boxIndex, std::set< unsigned > &rElementIndices)
void CollectElementsInLocalBoxes (BoxCollection< DIM > *&rpBoxCollection, unsigned boxIndex, std::set< unsigned > &rElementIndices)
void ResetStatisticsVariables ()

Private Attributes

TetrahedralMesh< DIM, DIM > & mrFineMesh
TetrahedralMesh< DIM, DIM > & mrCoarseMesh
BoxCollection< DIM > * mpFineMeshBoxCollection
BoxCollection< DIM > * mpCoarseMeshBoxCollection
std::vector< ElementAndWeights
< DIM > > 
mFineMeshElementsAndWeights
std::vector< unsignedmNotInMesh
std::vector< c_vector< double,
DIM+1 > > 
mNotInMeshNearestElementWeights
std::vector< unsignedmStatisticsCounters
std::vector< unsignedmCoarseElementsForFineNodes
std::vector< unsignedmCoarseElementsForFineElementCentroids

Friends

class TestFineCoarseMeshPair

Detailed Description

template<unsigned DIM>
class FineCoarseMeshPair< DIM >

Class for a pair of meshes, one fine, one coarse, which should cover the same domain (or very nearly match). This class is used to set up interpolation information from one mesh to the other.

At the moment the functionality is very much based on the four information-transfers required in cardiac electromechanics problems

(i) Calcium (or voltage) to induce deformation: FINE(electrics) MESH NODEs ---> COARSE(mechanics) MESH QUADRATURE POINTS (ii) Deformation gradient (assume constant in any coarse element) for altering conductivities: COARSE ELEMENTS ---> FINE ELEMENTS (iii) Deformation gradient/fibre-stretch (assume constant in any coarse element) for cell-model stretch activated channels COARSE ELEMENTS ---> FINE NODES (iv) Voltage visualisation on coarse mesh FINE NODES ---> COARSE NODES

The usage of this class for each of these tasks is:

(i) FINE NODEs ---> COARSE QUADRATURE POINTS FineCoarseMeshPair<2> mesh_pair(fine_mesh,coarse_mesh); mesh_pair.SetUpBoxesOnFineMesh(); mesh_pair.ComputeFineElementsAndWeightsForCoarseQuadPoints(quad_rule, false); mesh_pair.rGetElementsAndWeights(); (ii) COARSE ELEMENTS ---> FINE ELEMENTS FineCoarseMeshPair<2> mesh_pair(fine_mesh,coarse_mesh); mesh_pair.SetUpBoxesOnCoarseMesh(); mesh_pair.ComputeCoarseElementsForFineElementCentroids(); mesh_pair.rGetCoarseElementsForFineElementCentroids(); (iii) COARSE ELEMENTS ---> FINE NODES FineCoarseMeshPair<2> mesh_pair(fine_mesh,coarse_mesh); mesh_pair.SetUpBoxesOnCoarseMesh(); mesh_pair.ComputeCoarseElementsForFineNodes(); mesh_pair.rGetCoarseElementsForFineNodes();

Note the following should not be done at the same time as (i), as the results are stored in the same place (iv) FINE NODES ---> COARSE NODES FineCoarseMeshPair<2> mesh_pair(fine_mesh,coarse_mesh); mesh_pair.SetUpBoxesOnFineMesh(); mesh_pair.ComputeFineElementsAndWeightsForCoarseNodes(false); mesh_pair.rGetElementsAndWeights();

Definition at line 97 of file FineCoarseMeshPair.hpp.


Constructor & Destructor Documentation

template<unsigned DIM>
FineCoarseMeshPair< DIM >::FineCoarseMeshPair ( TetrahedralMesh< DIM, DIM > &  rFineMesh,
TetrahedralMesh< DIM, DIM > &  rCoarseMesh 
) [inline]

Constructor sets up domain size.

Parameters:
rFineMesh Fine mesh (reference)
rCoarseMesh Coarse mesh (reference)

Definition at line 32 of file FineCoarseMeshPair.cpp.

References FineCoarseMeshPair< DIM >::mpCoarseMeshBoxCollection, FineCoarseMeshPair< DIM >::mpFineMeshBoxCollection, and FineCoarseMeshPair< DIM >::ResetStatisticsVariables().

template<unsigned DIM>
FineCoarseMeshPair< DIM >::~FineCoarseMeshPair (  )  [inline]

Destructor just deletes the box collection.

Definition at line 42 of file FineCoarseMeshPair.cpp.

References FineCoarseMeshPair< DIM >::DeleteCoarseBoxCollection(), and FineCoarseMeshPair< DIM >::DeleteFineBoxCollection().


Member Function Documentation

template<unsigned DIM>
void FineCoarseMeshPair< DIM >::CollectElementsInContainingBox ( BoxCollection< DIM > *&  rpBoxCollection,
unsigned  boxIndex,
std::set< unsigned > &  rElementIndices 
) [inline, private]

Helper method. Gets all the elements in the given box, in the given box collection and puts them in the returned std::vector.

Parameters:
rpBoxCollection Reference to the box collection to use (either mpFineBoxCollection or mpCoarseBoxCollection)
boxIndex box index
rElementIndices The returned vector of element indices in that box of the box collection. Not cleared before use.

Definition at line 495 of file FineCoarseMeshPair.cpp.

References BoxCollection< DIM >::rGetBox().

Referenced by FineCoarseMeshPair< DIM >::ComputeCoarseElementForGivenPoint(), and FineCoarseMeshPair< DIM >::ComputeFineElementAndWeightForGivenPoint().

template<unsigned DIM>
void FineCoarseMeshPair< DIM >::CollectElementsInLocalBoxes ( BoxCollection< DIM > *&  rpBoxCollection,
unsigned  boxIndex,
std::set< unsigned > &  rElementIndices 
) [inline, private]

Helper method. Gets all the elements in the given box, or in a box local to the given box, in the given box collection, and puts them in the returned std::vector.

Parameters:
rpBoxCollection Reference to the box collection to use (either mpFineBoxCollection or mpCoarseBoxCollection)
boxIndex box index
rElementIndices The returned vector of element indices in that box or a local box. Not cleared before use.

Definition at line 508 of file FineCoarseMeshPair.cpp.

References BoxCollection< DIM >::GetLocalBoxes(), and BoxCollection< DIM >::rGetBox().

Referenced by FineCoarseMeshPair< DIM >::ComputeCoarseElementForGivenPoint(), and FineCoarseMeshPair< DIM >::ComputeFineElementAndWeightForGivenPoint().

template<unsigned DIM>
unsigned FineCoarseMeshPair< DIM >::ComputeCoarseElementForGivenPoint ( ChastePoint< DIM > &  rPoint,
bool  safeMode,
unsigned  boxForThisPoint 
) [inline, private]

For a given point, compute the containing element in the coarse mesh (returned).

Parameters:
rPoint The point
safeMode See documentation in ComputeCoarseElementsForFineNodes
boxForThisPoint The box in coarse box collection containing this point
Todo:
: could possibly merge with ComputeFineElementAndWeightForGivenPoint(). Differences between the methods are: the other method uses fine mesh and fine mesh box, computes weights as well (and sets the element and weight in the vec), rather than returning the element, and that method saves information in mStatisticsCounters.

Definition at line 425 of file FineCoarseMeshPair.cpp.

References FineCoarseMeshPair< DIM >::CollectElementsInContainingBox(), FineCoarseMeshPair< DIM >::CollectElementsInLocalBoxes(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndex(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNearestElementIndexFromTestElements(), FineCoarseMeshPair< DIM >::mpCoarseMeshBoxCollection, FineCoarseMeshPair< DIM >::mrCoarseMesh, and FineCoarseMeshPair< DIM >::mStatisticsCounters.

Referenced by FineCoarseMeshPair< DIM >::ComputeCoarseElementsForFineElementCentroids(), and FineCoarseMeshPair< DIM >::ComputeCoarseElementsForFineNodes().

template<unsigned DIM>
void FineCoarseMeshPair< DIM >::ComputeCoarseElementsForFineElementCentroids ( bool  safeMode  )  [inline]

Compute the element in the coarse mesh that each fine element centroid is contained in (or nearest to). Call SetUpBoxesOnCoarseMesh() before, and rGetCoarseElementsForFineElementCentroids() afterwards.

Parameters:
safeMode This method uses the elements in the boxes to guess which element a point is in. If a point is in none of these elements, then if safeMode==true, it will then search the whole mesh. If safeMode==false it will assume immediately the point isn't in the coarse mesh at all. safeMode=false is will far more efficient with big meshes. It should be fine to use safeMode=false if SetUpBoxesOnFineMesh() is called with default values.

Definition at line 388 of file FineCoarseMeshPair.cpp.

References FineCoarseMeshPair< DIM >::ComputeCoarseElementForGivenPoint(), EXCEPTION, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), FineCoarseMeshPair< DIM >::mCoarseElementsForFineElementCentroids, FineCoarseMeshPair< DIM >::mpCoarseMeshBoxCollection, FineCoarseMeshPair< DIM >::mrFineMesh, and FineCoarseMeshPair< DIM >::ResetStatisticsVariables().

template<unsigned DIM>
void FineCoarseMeshPair< DIM >::ComputeCoarseElementsForFineNodes ( bool  safeMode  )  [inline]

Compute the element in the coarse mesh that each fine mesh node is contained in (or nearest to). Call SetUpBoxesOnCoarseMesh() before, and rGetCoarseElementsForFineNodes() afterwards.

Parameters:
safeMode This method uses the elements in the boxes to guess which element a point is in. If a point is in none of these elements, then if safeMode==true, it will then search the whole mesh. If safeMode==false it will assume immediately the point isn't in the coarse mesh at all. safeMode=false is will far more efficient with big meshes. It should be fine to use safeMode=false if SetUpBoxesOnFineMesh() is called with default values.

Definition at line 358 of file FineCoarseMeshPair.cpp.

References FineCoarseMeshPair< DIM >::ComputeCoarseElementForGivenPoint(), EXCEPTION, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), FineCoarseMeshPair< DIM >::mCoarseElementsForFineNodes, FineCoarseMeshPair< DIM >::mpCoarseMeshBoxCollection, FineCoarseMeshPair< DIM >::mrFineMesh, and FineCoarseMeshPair< DIM >::ResetStatisticsVariables().

template<unsigned DIM>
void FineCoarseMeshPair< DIM >::ComputeFineElementAndWeightForGivenPoint ( ChastePoint< DIM > &  rPoint,
bool  safeMode,
unsigned  boxForThisPoint,
unsigned  index 
) [inline, private]

For a given point, compute the containing element and corresponding weight in the fine mesh.

Parameters:
rPoint The point
safeMode See documentation for ComputeFineElementsAndWeightsForCoarseQuadPoints()
boxForThisPoint The box in the fine box collection containing this point
index The index into the mFineMeshElementsAndWeights std::vector
Todo:
: could possibly merge with ComputeCoarseElementForGivenPoint(). Difference between the methods are: this uses fine mesh and fine mesh box, computes weights as well (and sets the element and weight in the vec), rather than returning the element, and this method saves information in mStatisticsCounters.

Definition at line 260 of file FineCoarseMeshPair.cpp.

References FineCoarseMeshPair< DIM >::CollectElementsInContainingBox(), FineCoarseMeshPair< DIM >::CollectElementsInLocalBoxes(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndex(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNearestElementIndexFromTestElements(), FineCoarseMeshPair< DIM >::mFineMeshElementsAndWeights, FineCoarseMeshPair< DIM >::mNotInMesh, FineCoarseMeshPair< DIM >::mNotInMeshNearestElementWeights, FineCoarseMeshPair< DIM >::mpFineMeshBoxCollection, FineCoarseMeshPair< DIM >::mrFineMesh, and FineCoarseMeshPair< DIM >::mStatisticsCounters.

Referenced by FineCoarseMeshPair< DIM >::ComputeFineElementsAndWeightsForCoarseNodes(), and FineCoarseMeshPair< DIM >::ComputeFineElementsAndWeightsForCoarseQuadPoints().

template<unsigned DIM>
void FineCoarseMeshPair< DIM >::ComputeFineElementsAndWeightsForCoarseNodes ( bool  safeMode  )  [inline]

Set up the containing (fine) elements and corresponding weights for all the nodes in the coarse mesh. Call GetElementsAndWeights() after calling this with the index of the nodes.

If calling this DO NOT call ComputeFineElementsAndWeightsForCoarseQuadPoints until you do done with this data.

Parameters:
safeMode This method uses the elements in the boxes to guess which element a point is in. If a point is in none of these elements, then if safeMode==true, it will then search the whole mesh. If safeMode==false it will assume immediately the point isn't in the coarse mesh at all. safeMode=false is will far more efficient with big meshes. It should be fine to use safeMode=false if SetUpBoxesOnFineMesh() is called with default values.

Definition at line 220 of file FineCoarseMeshPair.cpp.

References FineCoarseMeshPair< DIM >::ComputeFineElementAndWeightForGivenPoint(), EXCEPTION, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), FineCoarseMeshPair< DIM >::mFineMeshElementsAndWeights, FineCoarseMeshPair< DIM >::mpFineMeshBoxCollection, FineCoarseMeshPair< DIM >::mrCoarseMesh, FineCoarseMeshPair< DIM >::ResetStatisticsVariables(), Node< SPACE_DIM >::rGetLocation(), and Node< SPACE_DIM >::rGetModifiableLocation().

Referenced by VoltageInterpolaterOntoMechanicsMesh< DIM >::VoltageInterpolaterOntoMechanicsMesh().

template<unsigned DIM>
void FineCoarseMeshPair< DIM >::ComputeFineElementsAndWeightsForCoarseQuadPoints ( GaussianQuadratureRule< DIM > &  rQuadRule,
bool  safeMode 
) [inline]

Set up the containing (fine) elements and corresponding weights for all the quadrature points in the coarse mesh. Call GetElementsAndWeights() after calling this with the index of the quad point (=the index of the quad point in a QuadraturePointsGroup= the index if the quad points were listed by looping over all the element and then looping over all the quad points).

If calling this DO NOT call ComputeFineElementsAndWeightsForCoarseNodes until you do done with this data

Parameters:
rQuadRule The quadrature rule, used to determine the number of quadrature points per element.
safeMode This method uses the elements in the boxes to guess which element a quad point is in. If a quad point is in none of these elements, then if safeMode==true, it will then search the whole mesh. If safeMode==false it will assume immediately the quad point isn't in the mesh at all. safeMode=false is will far more efficient with big meshes. It should be fine to use safeMode=false if SetUpBoxesOnFineMesh() is called with default values.

Definition at line 179 of file FineCoarseMeshPair.cpp.

References FineCoarseMeshPair< DIM >::ComputeFineElementAndWeightForGivenPoint(), EXCEPTION, QuadraturePointsGroup< DIM >::Get(), FineCoarseMeshPair< DIM >::mFineMeshElementsAndWeights, FineCoarseMeshPair< DIM >::mpFineMeshBoxCollection, FineCoarseMeshPair< DIM >::mrCoarseMesh, FineCoarseMeshPair< DIM >::mStatisticsCounters, FineCoarseMeshPair< DIM >::ResetStatisticsVariables(), and QuadraturePointsGroup< DIM >::Size().

template<unsigned DIM>
void FineCoarseMeshPair< DIM >::DeleteCoarseBoxCollection (  )  [inline]

Destroy the box collection for the coarse mesh - can be used to free memory once ComputeCoarseElementsForFineNodes (etc) has been called.

Definition at line 59 of file FineCoarseMeshPair.cpp.

References FineCoarseMeshPair< DIM >::mpCoarseMeshBoxCollection.

Referenced by FineCoarseMeshPair< DIM >::~FineCoarseMeshPair().

template<unsigned DIM>
void FineCoarseMeshPair< DIM >::DeleteFineBoxCollection (  )  [inline]

Destroy the box collection for the fine mesh - can be used to free memory once ComputeFineElementsAndWeightsForCoarseQuadPoints (etc) has been called.

Definition at line 49 of file FineCoarseMeshPair.cpp.

References FineCoarseMeshPair< DIM >::mpFineMeshBoxCollection.

Referenced by FineCoarseMeshPair< DIM >::~FineCoarseMeshPair().

template<unsigned DIM>
void FineCoarseMeshPair< DIM >::PrintStatistics (  )  [inline]

Print information about the number of points found in the searched mesh. What the points are and which mesh was searched depends on whichever of the main Compute methods was last called.

If ComputeFineElementsAndWeightsForCoarseQuadPoints() or ComputeFineElementsAndWeightsForCoarseNodes() were last called, the indices of the points that were not found to be contained in the searched mesh are also printed, along with the weights for that point in the nearest element (which indicates how far from the mesh the points are).

Definition at line 539 of file FineCoarseMeshPair.cpp.

References FineCoarseMeshPair< DIM >::mNotInMesh, FineCoarseMeshPair< DIM >::mNotInMeshNearestElementWeights, and FineCoarseMeshPair< DIM >::mStatisticsCounters.

template<unsigned DIM>
void FineCoarseMeshPair< DIM >::ResetStatisticsVariables (  )  [inline, private]
template<unsigned DIM>
std::vector<unsigned>& FineCoarseMeshPair< DIM >::rGetCoarseElementsForFineElementCentroids (  )  [inline]

Get the elements in the coarse mesh that each fine mesh element centroid is contained in (or nearest to). ComputeCoarseElementsForFineElementCentroids() needs to be called before calling this.

Definition at line 385 of file FineCoarseMeshPair.hpp.

References FineCoarseMeshPair< DIM >::mCoarseElementsForFineElementCentroids.

template<unsigned DIM>
std::vector<unsigned>& FineCoarseMeshPair< DIM >::rGetCoarseElementsForFineNodes (  )  [inline]

Get the elements in the coarse mesh that each fine mesh node is contained in (or nearest to). ComputeCoarseElementsForFineNodes() needs to be called before calling this.

Definition at line 375 of file FineCoarseMeshPair.hpp.

References FineCoarseMeshPair< DIM >::mCoarseElementsForFineNodes.

template<unsigned DIM>
std::vector<ElementAndWeights<DIM> >& FineCoarseMeshPair< DIM >::rGetElementsAndWeights (  )  [inline]
Returns:
A reference to the elements/weights information

Definition at line 366 of file FineCoarseMeshPair.hpp.

References FineCoarseMeshPair< DIM >::mFineMeshElementsAndWeights.

Referenced by VoltageInterpolaterOntoMechanicsMesh< DIM >::VoltageInterpolaterOntoMechanicsMesh().

template<unsigned DIM>
void FineCoarseMeshPair< DIM >::SetUpBoxes ( TetrahedralMesh< DIM, DIM > &  rMesh,
double  boxWidth,
BoxCollection< DIM > *&  rpBoxCollection 
) [inline, private]

Set up a box collection on the given mesh. Should only be called using either SetUpBoxes(*mpFineMesh, boxWidth, mpFineBoxCollection) (from SetUpBoxesOnFineMesh) or SetUpBoxes(*mpCoarseMesh, boxWidth, mpCoarseBoxCollection) (from SetUpBoxesOnCoarseMesh)

Parameters:
rMesh The mesh, either *mpFineMesh or *mpCoarseMesh)
boxWidth box width (see SetUpBoxesOnCoarseMesh() dox)
rpBoxCollection reference to either mpFineBoxCollection or mpCoarseBoxCollection

Definition at line 85 of file FineCoarseMeshPair.cpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::CalculateBoundingBox(), BoxCollection< DIM >::CalculateContainingBox(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::EdgesBegin(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::EdgesEnd(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), ChasteCuboid< SPACE_DIM >::GetWidth(), BoxCollection< DIM >::rGetBox(), ChasteCuboid< SPACE_DIM >::rGetLowerCorner(), ChasteCuboid< SPACE_DIM >::rGetUpperCorner(), and BoxCollection< DIM >::SetupAllLocalBoxes().

Referenced by FineCoarseMeshPair< DIM >::SetUpBoxesOnCoarseMesh(), and FineCoarseMeshPair< DIM >::SetUpBoxesOnFineMesh().

template<unsigned DIM>
void FineCoarseMeshPair< DIM >::SetUpBoxesOnCoarseMesh ( double  boxWidth = -1  )  [inline]

Set up boxes on coarse mesh. The elements contained in each box is stored, which makes finding the containing element for a given point much faster. This should be called before ComputeCoarseElementsForFineNodes() or ComputeCoarseElementsForFineElementCentroids()

Parameters:
boxWidth width to use for the boxes (which will be cubes). Note that a domain which is a touch larger than the smallest containing cuboid of the fine mesh is used. boxWidth defaults to a negative value, in which case a box width such that there are approximately 20 boxes in the x-direction, unless this width is less than maximum (fine mesh edge length), in which case it is chosen accordingly.

Definition at line 79 of file FineCoarseMeshPair.cpp.

References FineCoarseMeshPair< DIM >::mpCoarseMeshBoxCollection, FineCoarseMeshPair< DIM >::mrCoarseMesh, and FineCoarseMeshPair< DIM >::SetUpBoxes().

template<unsigned DIM>
void FineCoarseMeshPair< DIM >::SetUpBoxesOnFineMesh ( double  boxWidth = -1  )  [inline]

Set up boxes on fine mesh. The elements contained in each box is stored, which makes finding the containing element for a given point much faster. This should be called before ComputeFineElementsAndWeightsForCoarseQuadPoints() or ComputeFineElementsAndWeightsForCoarseNodes().

Parameters:
boxWidth width to use for the boxes (which will be cubes). Note that a domain which is a touch larger than the smallest containing cuboid of the fine mesh is used. boxWidth defaults to a negative value, in which case a box width such that there are approximately 20 boxes in the x-direction, unless this width is less than maximum (fine mesh edge length), in which case it is chosen accordingly.

Definition at line 73 of file FineCoarseMeshPair.cpp.

References FineCoarseMeshPair< DIM >::mpFineMeshBoxCollection, FineCoarseMeshPair< DIM >::mrFineMesh, and FineCoarseMeshPair< DIM >::SetUpBoxes().

Referenced by VoltageInterpolaterOntoMechanicsMesh< DIM >::VoltageInterpolaterOntoMechanicsMesh().


Member Data Documentation

template<unsigned DIM>
std::vector<unsigned> FineCoarseMeshPair< DIM >::mCoarseElementsForFineElementCentroids [private]

The element in the coarse mesh that each fine element centroid is contained in (or nearest to). ComputeCoarseElementsForFineElementCentroids() needs to be called for this to be set up.

Definition at line 171 of file FineCoarseMeshPair.hpp.

Referenced by FineCoarseMeshPair< DIM >::ComputeCoarseElementsForFineElementCentroids(), and FineCoarseMeshPair< DIM >::rGetCoarseElementsForFineElementCentroids().

template<unsigned DIM>
std::vector<unsigned> FineCoarseMeshPair< DIM >::mCoarseElementsForFineNodes [private]

The element in the coarse mesh that each fine mesh node is contained in (or nearest to). ComputeCoarseElementsForFineNodes() needs to be called for this to be set up.

Definition at line 164 of file FineCoarseMeshPair.hpp.

Referenced by FineCoarseMeshPair< DIM >::ComputeCoarseElementsForFineNodes(), and FineCoarseMeshPair< DIM >::rGetCoarseElementsForFineNodes().

template<unsigned DIM>
std::vector<ElementAndWeights<DIM> > FineCoarseMeshPair< DIM >::mFineMeshElementsAndWeights [private]

The containing elements and corresponding weights in the fine mesh for the set of points given. The points may have been quadrature points in the coarse mesh, or nodes in coarse mesh, etc.

Definition at line 125 of file FineCoarseMeshPair.hpp.

Referenced by FineCoarseMeshPair< DIM >::ComputeFineElementAndWeightForGivenPoint(), FineCoarseMeshPair< DIM >::ComputeFineElementsAndWeightsForCoarseNodes(), FineCoarseMeshPair< DIM >::ComputeFineElementsAndWeightsForCoarseQuadPoints(), and FineCoarseMeshPair< DIM >::rGetElementsAndWeights().

template<unsigned DIM>
std::vector<unsigned> FineCoarseMeshPair< DIM >::mNotInMesh [private]
template<unsigned DIM>
std::vector<c_vector<double,DIM+1> > FineCoarseMeshPair< DIM >::mNotInMeshNearestElementWeights [private]

The corresponding weights, for the nearest elements, of the points which were found to be outside the fine mesh.

Definition at line 134 of file FineCoarseMeshPair.hpp.

Referenced by FineCoarseMeshPair< DIM >::ComputeFineElementAndWeightForGivenPoint(), FineCoarseMeshPair< DIM >::PrintStatistics(), and FineCoarseMeshPair< DIM >::ResetStatisticsVariables().

template<unsigned DIM>
BoxCollection<DIM>* FineCoarseMeshPair< DIM >::mpCoarseMeshBoxCollection [private]
template<unsigned DIM>
BoxCollection<DIM>* FineCoarseMeshPair< DIM >::mpFineMeshBoxCollection [private]
template<unsigned DIM>
TetrahedralMesh<DIM,DIM>& FineCoarseMeshPair< DIM >::mrCoarseMesh [private]
template<unsigned DIM>
TetrahedralMesh<DIM,DIM>& FineCoarseMeshPair< DIM >::mrFineMesh [private]
template<unsigned DIM>
std::vector<unsigned> FineCoarseMeshPair< DIM >::mStatisticsCounters [private]

4 values, [0] number of points for which the containing element was found quickly (the element was in the same box as the point, [1] number of points for which the containing element was found more slowly (the element was not the same box as the point, but one of the neighbouring boxes), [2] num points found very slowly (the elemment was not in a neighbouring box, but somewhere else) [3] num points not in the searched mesh at all

Note mCounters[3] = mNotInMesh.size() = mNotInMeshNearestElementWeights.size(); 2 values, [0] number of points for which the containing element was found [1] num points not in the searched mesh at all

Note, after ComputeFineElementsAndWeightsForCoarseQuadPoints() or ComputeFineElementsAndWeightsForCoarseNodes(), then mCounters[1] = mNotInMesh.size() = mNotInMeshNearestElementWeights.size();

Definition at line 157 of file FineCoarseMeshPair.hpp.

Referenced by FineCoarseMeshPair< DIM >::ComputeCoarseElementForGivenPoint(), FineCoarseMeshPair< DIM >::ComputeFineElementAndWeightForGivenPoint(), FineCoarseMeshPair< DIM >::ComputeFineElementsAndWeightsForCoarseQuadPoints(), FineCoarseMeshPair< DIM >::PrintStatistics(), and FineCoarseMeshPair< DIM >::ResetStatisticsVariables().


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