MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <CubeMesh.h>
Public Member Functions | |
void | addStoich (Id stoich) |
void | assignVoxels (vector< pair< unsigned int, unsigned int > > &intersect, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) const |
void | buildMesh (Id geom, double x, double y, double z) |
void | buildStencil () |
int | compareMeshSpacing (const CubeMesh *other) const |
Return 0 if spacing same, -1 if self smaller, +1 if self bigger. More... | |
CubeMesh () | |
void | defineIntersection (const CubeMesh *other, double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax) const |
Defines a cuboid volume of intersection between self and other. More... | |
void | deriveM2sFromS2m () |
void | deriveS2mFromM2s () |
double | extendedMeshEntryVolume (unsigned int fid) const |
Virtual function to return volume of mesh Entry, including. More... | |
void | fillSpaceToMeshLookup () |
void | fillThreeDimSurface () |
void | fillTwoDimSurface () |
Fills surface_ vector with spatial meshIndices for a rectangle. More... | |
bool | getAlwaysDiffuse () const |
vector< double > | getCoordinates (unsigned int fid) const |
Virtual function to return coords of mesh Entry. More... | |
vector< double > | getCoords (const Eref &e) const |
vector< double > | getDiffusionArea (unsigned int fid) const |
Virtual function to return diffusion X-section area. More... | |
vector< double > | getDiffusionScaling (unsigned int fid) const |
Virtual function to return scale factor for diffusion. 1 here. More... | |
double | getDx () const |
double | getDy () const |
double | getDz () const |
bool | getIsToroid () const |
unsigned int | getMeshDimensions (unsigned int fid) const |
Virtual function to return dimensions of specified entry. More... | |
double | getMeshEntryVolume (unsigned int fid) const |
Virtual function to return volume of mesh Entry. More... | |
vector< unsigned int > | getMeshToSpace () const |
unsigned int | getMeshType (unsigned int fid) const |
Virtual function to return MeshType of specified entry. More... | |
unsigned int | getNx () const |
unsigned int | getNy () const |
unsigned int | getNz () const |
vector< unsigned int > | getParentVoxel () const |
Inherited virtual, do nothing for now. More... | |
bool | getPreserveNumEntries () const |
vector< unsigned int > | getSpaceToMesh () const |
vector< unsigned int > | getSurface () const |
const vector< double > & | getVoxelArea () const |
const vector< double > & | getVoxelLength () const |
double | getX0 () const |
double | getX1 () const |
double | getY0 () const |
double | getY1 () const |
double | getZ0 () const |
double | getZ1 () const |
void | indexToSpace (unsigned int index, double &x, double &y, double &z) const |
Converts the integer meshIndex to spatial coords. More... | |
void | innerBuildDefaultMesh (const Eref &e, double volume, unsigned int numEntries) |
Virtual func to make a mesh with specified Volume and numEntries. More... | |
unsigned int | innerGetDimensions () const |
unsigned int | innerGetNumEntries () const |
void | innerHandleNodeInfo (const Eref &e, unsigned int numNodes, unsigned int numThreads) |
void | innerHandleRequestMeshStats (const Eref &e, const SrcFinfo2< unsigned int, vector< double > > *meshStatsFinfo) |
More inherited virtual funcs: request comes in for mesh stats. More... | |
void | innerSetCoords (const vector< double > &v) |
void | innerSetNumEntries (unsigned int n) |
Inherited virtual func. More... | |
bool | isInsideCuboid (double x, double y, double z) const |
bool | isInsideSpheroid (double x, double y, double z) const |
void | matchAllEntries (const CubeMesh *other, vector< VoxelJunction > &ret) const |
void | matchCubeMeshEntries (const CubeMesh *other, vector< VoxelJunction > &ret) const |
void | matchCylMeshEntries (const ChemCompt *other, vector< VoxelJunction > &ret) const |
void | matchMeshEntries (const ChemCompt *other, vector< VoxelJunction > &ret) const |
double | nearest (double x, double y, double z, unsigned int &index) const |
unsigned int | neighbor (unsigned int spaceIndex, int dx, int dy, int dz) const |
unsigned int | numDims () const |
Utility function for returning # of dimensions in mesh. More... | |
void | setAlwaysDiffuse (bool v) |
void | setCoords (const Eref &e, vector< double > v) |
void | setDiffScale (const CubeMesh *other, vector< VoxelJunction > &ret) const |
Assigns diffusion scaling info for the voxel junctions. More... | |
void | setDx (double v) |
void | setDy (double v) |
void | setDz (double v) |
void | setIsToroid (bool v) |
void | setJunctionVol (const CubeMesh *other, vector< VoxelJunction > &ret) const |
Assigns volume info for the voxel junctions. More... | |
void | setMeshToSpace (vector< unsigned int > v) |
void | setNx (unsigned int v) |
void | setNy (unsigned int v) |
void | setNz (unsigned int v) |
void | setPreserveNumEntries (bool v) |
void | setSpaceToMesh (vector< unsigned int > v) |
void | setSurface (vector< unsigned int > v) |
void | setX0 (double v) |
void | setX1 (double v) |
void | setY0 (double v) |
void | setY1 (double v) |
void | setZ0 (double v) |
void | setZ1 (double v) |
unsigned int | spaceToIndex (double x, double y, double z) const |
Converts the 3-D coords to an index. EMPTY if out of range. More... | |
const vector< unsigned int > & | surface () const |
Utility and test function to read surface. More... | |
void | transmitChange (const Eref &e, double oldvol) |
void | updateCoords () |
void | updateM2s () |
void | updateS2m () |
double | vGetEntireVolume () const |
Virtual func to get volume of entire compartment. More... | |
const vector< double > & | vGetVoxelMidpoint () const |
Virtual func so that derived classes can return voxel midpoint. More... | |
const vector< double > & | vGetVoxelVolume () const |
Virtual func so that derived classes can pass voxel volume back. More... | |
bool | vSetVolumeNotRates (double volume) |
Virtual func, assigns volume, usually to single voxel. More... | |
~CubeMesh () | |
![]() | |
void | addRow (unsigned int index, const vector< double > &entry, const vector< unsigned int > &colIndex) |
void | clearExtendedMeshEntryVolume () |
Inherited virtual function to clear the vector of MeshEntryVolume. More... | |
double | extendedMeshEntryVolume (unsigned int fid) const |
Virtual function to return volume of mesh Entry, including. More... | |
void | extendStencil (const ChemCompt *other, const vector< VoxelJunction > &vj) |
Add boundary voxels to stencil for cross-solver junctions. More... | |
vector< unsigned int > | getNeighbors (unsigned int fid) const |
Looks up stencil to return vector of indices of coupled voxels. More... | |
const SparseMatrix< double > & | getStencil () const |
Returns entire sparse matrix of mesh. Used by diffusion solver. More... | |
unsigned int | getStencilRow (unsigned int meshIndex, const double **entry, const unsigned int **colIndex) const |
vector< double > | innerGetStencilRate (unsigned int row) const |
void | innerResetStencil () |
virtual func implemented here. More... | |
MeshCompt () | |
void | setStencilSize (unsigned int numRows, unsigned int numCols) |
~MeshCompt () | |
![]() | |
void | buildDefaultMesh (const Eref &e, double volume, unsigned int numEntries) |
void | buildJunction (ChemCompt *other, vector< VoxelJunction > &ret) |
ChemCompt () | |
void | flipRet (vector< VoxelJunction > &ret) const |
Utility function for swapping first and second in VoxelJunctions. More... | |
void | getChildConcs (const Eref &e, vector< double > &childConcs) const |
unsigned int | getDimensions () const |
double | getEntireVolume (const Eref &e) const |
bool | getIsMembraneBound () const |
string | getMethod () const |
unsigned int | getNumEntries () const |
double | getOneVoxelVolume (const Eref &e, unsigned int voxel) const |
vector< unsigned int > | getStencilIndex (unsigned int row) const |
vector< double > | getStencilRate (unsigned int row) const |
vector< double > | getVoxelMidpoint () const |
Returns vector of all voxel midpoints in compartment. More... | |
vector< double > | getVoxelVolume () const |
Returns vector of all voxel volumes in compartment. More... | |
void | handleNodeInfo (const Eref &e, unsigned int numNodes, unsigned int numThreads) |
MeshEntry * | lookupEntry (unsigned int index) |
void | resetStencil () |
unsigned int | setChildConcs (const Eref &e, const vector< double > &childConcs, unsigned int start) const |
void | setEntireVolume (const Eref &e, double volume) |
void | setIsMembraneBound (bool v) |
virtual void | setMeshEntryVolume (unsigned int fid, double volume) |
void | setMethod (string method) |
void | setNumEntries (unsigned int num) |
void | setOneVoxelVolume (const Eref &e, unsigned int voxel, double volume) |
void | setVolumeNotRates (double volume) |
virtual | ~ChemCompt () |
Static Public Member Functions | |
static const Cinfo * | initCinfo () |
![]() | |
static double | distance (double x, double y, double z) |
static const Cinfo * | initCinfo () |
static SrcFinfo1< vector < double > > * | voxelVolOut () |
Static Public Attributes | |
static const unsigned int | ABUTX = ~2 |
static const unsigned int | ABUTY = ~3 |
static const unsigned int | ABUTZ = ~4 |
static const unsigned int | EMPTY = ~0 |
static const unsigned int | MULTI = ~5 |
static const unsigned int | SURFACE = ~1 |
Private Attributes | |
bool | alwaysDiffuse_ |
Flag: Should dx change or nx, with vol? More... | |
double | dx_ |
coords More... | |
double | dy_ |
Cuboid edge. More... | |
double | dz_ |
Cuboid edge. More... | |
bool | isToroid_ |
vector< unsigned int > | m2s_ |
of entries in z in surround volumeMore... | |
unsigned int | nx_ |
Cuboid edge. More... | |
unsigned int | ny_ |
of entries in x in surround volumeMore... | |
unsigned int | nz_ |
of entries in y in surround volumeMore... | |
bool | preserveNumEntries_ |
Flag: Should the ends loop around mathemagically? More... | |
vector< unsigned int > | s2m_ |
vector< unsigned int > | surface_ |
double | x0_ |
Flag: should all voxels diffuse to any tgt? More... | |
double | x1_ |
coords More... | |
double | y0_ |
coords More... | |
double | y1_ |
coords More... | |
double | z0_ |
coords More... | |
double | z1_ |
coords More... | |
The CubeMesh represents a chemically identified compartment shaped like a cuboid. This is not really an effective geometry for most neurons because it would have to be rather finely subdivided to fit a typical dendrite or soma volume, but it is general.
Definition at line 19 of file CubeMesh.h.
CubeMesh::CubeMesh | ( | ) |
Definition at line 261 of file CubeMesh.cpp.
References updateCoords().
CubeMesh::~CubeMesh | ( | ) |
Definition at line 284 of file CubeMesh.cpp.
void CubeMesh::addStoich | ( | Id | stoich | ) |
void CubeMesh::assignVoxels | ( | vector< pair< unsigned int, unsigned int > > & | intersect, |
double | xmin, | ||
double | xmax, | ||
double | ymin, | ||
double | ymax, | ||
double | zmin, | ||
double | zmax | ||
) | const |
Definition at line 1410 of file CubeMesh.cpp.
References dx_, dy_, dz_, indexToSpace(), nx_, ny_, nz_, s2m_, setIntersectVoxel(), surface_, x0_, y0_, and z0_.
Referenced by matchCubeMeshEntries().
void CubeMesh::buildMesh | ( | Id | geom, |
double | x, | ||
double | y, | ||
double | z | ||
) |
Definition at line 697 of file CubeMesh.cpp.
Referenced by initCinfo().
void CubeMesh::buildStencil | ( | ) |
Sets up the stencil that defines how to combine neighboring mesh elements to set up the diffusion du/dt term, using the method of lines. This is a very general function. It uses the information in the m2s_ and s2m_ vectors to work out the adjacency matrix. So we could use an arbitrary 3-D image to define the diffusive volume and boundaries using m2s_ and s2m_. We could also use geometric shapes through the fillSpaceToMeshLookup() function, which is currently a dummy and just does a cuboid.
Definition at line 1060 of file CubeMesh.cpp.
References MeshCompt::addRow(), dx_, dy_, dz_, EMPTY, MeshCompt::innerResetStencil(), m2s_, nx_, ny_, nz_, s2m_, and MeshCompt::setStencilSize().
Referenced by deriveM2sFromS2m(), deriveS2mFromM2s(), and updateCoords().
int CubeMesh::compareMeshSpacing | ( | const CubeMesh * | other | ) | const |
Return 0 if spacing same, -1 if self smaller, +1 if self bigger.
Definition at line 1222 of file CubeMesh.cpp.
References doubleApprox(), dx_, dy_, and dz_.
Referenced by matchCubeMeshEntries().
void CubeMesh::defineIntersection | ( | const CubeMesh * | other, |
double & | xmin, | ||
double & | xmax, | ||
double & | ymin, | ||
double & | ymax, | ||
double & | zmin, | ||
double & | zmax | ||
) | const |
Defines a cuboid volume of intersection between self and other.
Definition at line 1244 of file CubeMesh.cpp.
References dx_, dy_, dz_, swapIfBackward(), x0_, x1_, y0_, y1_, z0_, and z1_.
Referenced by matchCubeMeshEntries().
void CubeMesh::deriveM2sFromS2m | ( | ) |
Updates the m2s_ vector after s2m_ has been changed, and rebuilds the Stencil too. Any earlier junction information is lost.
Definition at line 1033 of file CubeMesh.cpp.
References buildStencil(), EMPTY, m2s_, nx_, ny_, nz_, and s2m_.
Referenced by setSpaceToMesh().
void CubeMesh::deriveS2mFromM2s | ( | ) |
Updates the s2m_ vector after m2s_ has been changed, and rebuilds the Stencil too. Any earlier junction information is lost.
Definition at line 1046 of file CubeMesh.cpp.
References buildStencil(), EMPTY, m2s_, nx_, ny_, nz_, and s2m_.
Referenced by setMeshToSpace().
|
virtual |
Virtual function to return volume of mesh Entry, including.
Utility function to return volume of any voxel including those diffusively coupled and aubtting the present volume.
Implements ChemCompt.
Definition at line 791 of file CubeMesh.cpp.
References dx_, dy_, dz_, MeshCompt::extendedMeshEntryVolume(), and m2s_.
void CubeMesh::fillSpaceToMeshLookup | ( | ) |
Definition at line 1005 of file CubeMesh.cpp.
References dx_, dy_, dz_, EMPTY, isInsideCuboid(), m2s_, nx_, ny_, nz_, s2m_, x0_, y0_, and z0_.
void CubeMesh::fillThreeDimSurface | ( | ) |
Fills surface_ vector with spatial meshIndices for a cuboid, that is, puts the surfaces of the cuboid in the vector.
Definition at line 340 of file CubeMesh.cpp.
References nx_, ny_, nz_, and surface_.
Referenced by updateCoords().
void CubeMesh::fillTwoDimSurface | ( | ) |
bool CubeMesh::getAlwaysDiffuse | ( | ) | const |
Definition at line 596 of file CubeMesh.cpp.
References alwaysDiffuse_.
Referenced by initCinfo().
|
virtual |
Virtual function to return coords of mesh Entry.
Virtual function to return coords of mesh Entry. For Cuboid mesh, coords are x1y1z1 x2y2z2
Implements ChemCompt.
Definition at line 801 of file CubeMesh.cpp.
References dx_, dy_, dz_, m2s_, nx_, ny_, nz_, x0_, y0_, and z0_.
vector< double > CubeMesh::getCoords | ( | const Eref & | e | ) | const |
Definition at line 636 of file CubeMesh.cpp.
References dx_, dy_, dz_, x0_, x1_, y0_, y1_, z0_, and z1_.
Referenced by initCinfo(), and testCubeMesh().
|
virtual |
Virtual function to return diffusion X-section area.
Virtual function to return diffusion X-section area for each neighbor.
Implements ChemCompt.
Definition at line 846 of file CubeMesh.cpp.
References dx_, dy_, dz_, EMPTY, m2s_, and neighbor().
|
virtual |
Virtual function to return scale factor for diffusion. 1 here.
Implements ChemCompt.
Definition at line 881 of file CubeMesh.cpp.
double CubeMesh::getDx | ( | ) | const |
Definition at line 507 of file CubeMesh.cpp.
References dx_.
Referenced by initCinfo(), CylBase::matchCubeMeshEntries(), CylMesh::matchCubeMeshEntries(), and testCubeMesh().
double CubeMesh::getDy | ( | ) | const |
Definition at line 519 of file CubeMesh.cpp.
References dy_.
Referenced by initCinfo(), and testCubeMesh().
double CubeMesh::getDz | ( | ) | const |
Definition at line 531 of file CubeMesh.cpp.
References dz_.
Referenced by initCinfo(), and testCubeMesh().
bool CubeMesh::getIsToroid | ( | ) | const |
Definition at line 576 of file CubeMesh.cpp.
References isToroid_.
Referenced by initCinfo().
|
virtual |
Virtual function to return dimensions of specified entry.
Implements ChemCompt.
Definition at line 778 of file CubeMesh.cpp.
Referenced by testCubeMesh(), and testCubeMeshExtendStencil().
|
virtual |
Virtual function to return volume of mesh Entry.
Implements ChemCompt.
Definition at line 784 of file CubeMesh.cpp.
vector< unsigned int > CubeMesh::getMeshToSpace | ( | ) | const |
Definition at line 661 of file CubeMesh.cpp.
References m2s_.
Referenced by initCinfo(), and testCubeMeshJunctionTwoDimSurface().
|
virtual |
Virtual function to return MeshType of specified entry.
Implements ChemCompt.
Definition at line 772 of file CubeMesh.cpp.
References CUBOID.
Referenced by testCubeMesh(), and testCubeMeshExtendStencil().
unsigned int CubeMesh::getNx | ( | ) | const |
Definition at line 542 of file CubeMesh.cpp.
References nx_.
Referenced by initCinfo(), and testCubeMesh().
unsigned int CubeMesh::getNy | ( | ) | const |
Definition at line 554 of file CubeMesh.cpp.
References ny_.
Referenced by initCinfo(), and testCubeMesh().
unsigned int CubeMesh::getNz | ( | ) | const |
Definition at line 565 of file CubeMesh.cpp.
References nz_.
Referenced by initCinfo(), and testCubeMesh().
|
virtual |
Inherited virtual, do nothing for now.
Implements MeshCompt.
Definition at line 905 of file CubeMesh.cpp.
References innerGetNumEntries(), and numEntries.
bool CubeMesh::getPreserveNumEntries | ( | ) | const |
Definition at line 586 of file CubeMesh.cpp.
References preserveNumEntries_.
Referenced by initCinfo().
vector< unsigned int > CubeMesh::getSpaceToMesh | ( | ) | const |
Definition at line 672 of file CubeMesh.cpp.
References s2m_.
Referenced by initCinfo(), and testCubeMeshJunctionTwoDimSurface().
vector< unsigned int > CubeMesh::getSurface | ( | ) | const |
Definition at line 682 of file CubeMesh.cpp.
References surface_.
Referenced by initCinfo().
|
virtual |
|
virtual |
Implements MeshCompt.
Definition at line 957 of file CubeMesh.cpp.
References dx_, dy_, dz_, and innerGetNumEntries().
double CubeMesh::getX0 | ( | ) | const |
Definition at line 441 of file CubeMesh.cpp.
References x0_.
Referenced by initCinfo(), and testCubeMesh().
double CubeMesh::getX1 | ( | ) | const |
Definition at line 474 of file CubeMesh.cpp.
References x1_.
Referenced by initCinfo(), and testCubeMesh().
double CubeMesh::getY0 | ( | ) | const |
Definition at line 452 of file CubeMesh.cpp.
References y0_.
Referenced by initCinfo(), and testCubeMesh().
double CubeMesh::getY1 | ( | ) | const |
Definition at line 485 of file CubeMesh.cpp.
References y1_.
Referenced by initCinfo(), and testCubeMesh().
double CubeMesh::getZ0 | ( | ) | const |
Definition at line 463 of file CubeMesh.cpp.
References z0_.
Referenced by initCinfo(), and testCubeMesh().
double CubeMesh::getZ1 | ( | ) | const |
Definition at line 496 of file CubeMesh.cpp.
References z1_.
Referenced by initCinfo(), and testCubeMesh().
|
virtual |
Converts the integer meshIndex to spatial coords.
Implements ChemCompt.
Definition at line 1154 of file CubeMesh.cpp.
References dx_, dy_, dz_, nx_, ny_, nz_, x0_, y0_, and z0_.
Referenced by assignVoxels(), matchCubeMeshEntries(), and nearest().
|
static |
Definition at line 31 of file CubeMesh.cpp.
References buildMesh(), cubeMeshCinfo, getAlwaysDiffuse(), getCoords(), getDx(), getDy(), getDz(), getIsToroid(), getMeshToSpace(), getNx(), getNy(), getNz(), getPreserveNumEntries(), getSpaceToMesh(), getSurface(), getX0(), getX1(), getY0(), getY1(), getZ0(), getZ1(), ChemCompt::initCinfo(), setAlwaysDiffuse(), setCoords(), setDx(), setDy(), setDz(), setIsToroid(), setMeshToSpace(), setNx(), setNy(), setNz(), setPreserveNumEntries(), setSpaceToMesh(), setSurface(), setX0(), setX1(), setY0(), setY1(), setZ0(), setZ1(), and surface().
|
virtual |
Virtual func to make a mesh with specified Volume and numEntries.
Builds something as close to a cube as can get. This needs a smarter boundary handling code than I have here. For now, goes for the nearest cube
Implements ChemCompt.
Definition at line 707 of file CubeMesh.cpp.
References numEntries, nx_, ny_, nz_, and setCoords().
|
virtual |
|
virtual |
Inherited virtual func. Returns number of MeshEntry in array
Implements ChemCompt.
Definition at line 891 of file CubeMesh.cpp.
References m2s_.
Referenced by getParentVoxel(), getVoxelLength(), and testCubeMesh().
|
virtual |
Generate node decomposition of mesh, send it out along meshSplitFinfo msg
Implements ChemCompt.
Definition at line 743 of file CubeMesh.cpp.
void CubeMesh::innerHandleRequestMeshStats | ( | const Eref & | e, |
const SrcFinfo2< unsigned int, vector< double > > * | meshStatsFinfo | ||
) |
More inherited virtual funcs: request comes in for mesh stats.
Definition at line 734 of file CubeMesh.cpp.
References dx_, dy_, dz_, nx_, ny_, and nz_.
void CubeMesh::innerSetCoords | ( | const vector< double > & | v | ) |
Definition at line 602 of file CubeMesh.cpp.
References dx_, dy_, dz_, preserveNumEntries_, updateCoords(), x0_, x1_, y0_, y1_, z0_, and z1_.
Referenced by setCoords(), testCubeMesh(), testCubeMeshExtendStencil(), testCubeMeshFillTwoDimSurface(), testCubeMeshJunctionDiffSizeMesh(), testCubeMeshJunctionTwoDimSurface(), and testCubeMeshMultiJunctionTwoD().
|
virtual |
Inherited virtual func.
Inherited virtual func. Assigns number of MeshEntries.
Implements ChemCompt.
Definition at line 899 of file CubeMesh.cpp.
bool CubeMesh::isInsideCuboid | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
Definition at line 986 of file CubeMesh.cpp.
References x0_, y0_, y1_, z0_, and z1_.
Referenced by fillSpaceToMeshLookup().
bool CubeMesh::isInsideSpheroid | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
void CubeMesh::matchAllEntries | ( | const CubeMesh * | other, |
vector< VoxelJunction > & | ret | ||
) | const |
Dumbed-down version that does mesh matching based only on index. Useful for non-spatial matching and single-voxel systems.
Version that assumes all voxels are in contact and able to diffuse with matching voxels on other mesh
Definition at line 1503 of file CubeMesh.cpp.
References m2s_.
Referenced by matchMeshEntries().
void CubeMesh::matchCubeMeshEntries | ( | const CubeMesh * | other, |
vector< VoxelJunction > & | ret | ||
) | const |
Specialization for cube-to-cube mesh matching. Return vector is of pairs of meshIndices (not spatialIndices).
Definition at line 1453 of file CubeMesh.cpp.
References assignVoxels(), checkAbut(), compareMeshSpacing(), defineIntersection(), dx_, dy_, dz_, EMPTY, ChemCompt::flipRet(), indexToSpace(), matchMeshEntries(), s2m_, setDiffScale(), setJunctionVol(), and surface_.
Referenced by matchMeshEntries(), testCubeMeshJunctionDiffSizeMesh(), and testCubeMeshJunctionTwoDimSurface().
void CubeMesh::matchCylMeshEntries | ( | const ChemCompt * | other, |
vector< VoxelJunction > & | ret | ||
) | const |
Definition at line 1516 of file CubeMesh.cpp.
References ChemCompt::flipRet(), and ChemCompt::matchMeshEntries().
|
virtual |
Key virtual function for generating a map between facing surfaces on a CubeMesh and another ChemCompt
Implements ChemCompt.
Definition at line 1118 of file CubeMesh.cpp.
References alwaysDiffuse_, ChemCompt::flipRet(), matchAllEntries(), matchCubeMeshEntries(), and EndoMesh::matchMeshEntries().
Referenced by matchCubeMeshEntries().
|
virtual |
Virtual function to return the distance and index of nearest meshEntry. Places entry at centre of voxel.
Implements ChemCompt.
Definition at line 1185 of file CubeMesh.cpp.
References ChemCompt::distance(), dx_, dy_, dz_, EMPTY, indexToSpace(), nx_, ny_, s2m_, surface_, x0_, y0_, z0_, and z1_.
unsigned int CubeMesh::neighbor | ( | unsigned int | spaceIndex, |
int | dx, | ||
int | dy, | ||
int | dz | ||
) | const |
Definition at line 822 of file CubeMesh.cpp.
References EMPTY, nx_, ny_, nz_, and s2m_.
Referenced by getDiffusionArea().
unsigned int CubeMesh::numDims | ( | ) | const |
Utility function for returning # of dimensions in mesh.
Definition at line 1148 of file CubeMesh.cpp.
Referenced by testCubeMeshFillTwoDimSurface().
void CubeMesh::setAlwaysDiffuse | ( | bool | v | ) |
Definition at line 591 of file CubeMesh.cpp.
References alwaysDiffuse_.
Referenced by initCinfo().
void CubeMesh::setCoords | ( | const Eref & | e, |
vector< double > | v | ||
) |
Definition at line 629 of file CubeMesh.cpp.
References innerSetCoords(), vGetVoxelVolume(), and ChemCompt::voxelVolOut().
Referenced by initCinfo(), and innerBuildDefaultMesh().
void CubeMesh::setDiffScale | ( | const CubeMesh * | other, |
vector< VoxelJunction > & | ret | ||
) | const |
Assigns diffusion scaling info for the voxel junctions.
Definition at line 1523 of file CubeMesh.cpp.
References doubleEq(), dx_, dy_, and dz_.
Referenced by matchCubeMeshEntries().
void CubeMesh::setDx | ( | double | v | ) |
Definition at line 501 of file CubeMesh.cpp.
References dx_, and updateCoords().
Referenced by initCinfo().
void CubeMesh::setDy | ( | double | v | ) |
Definition at line 513 of file CubeMesh.cpp.
References dy_, and updateCoords().
Referenced by initCinfo().
void CubeMesh::setDz | ( | double | v | ) |
Definition at line 525 of file CubeMesh.cpp.
References dz_, and updateCoords().
Referenced by initCinfo().
void CubeMesh::setIsToroid | ( | bool | v | ) |
Definition at line 571 of file CubeMesh.cpp.
References isToroid_.
Referenced by initCinfo().
void CubeMesh::setJunctionVol | ( | const CubeMesh * | other, |
vector< VoxelJunction > & | ret | ||
) | const |
Assigns volume info for the voxel junctions.
Definition at line 1557 of file CubeMesh.cpp.
Referenced by matchCubeMeshEntries().
void CubeMesh::setMeshToSpace | ( | vector< unsigned int > | v | ) |
Definition at line 655 of file CubeMesh.cpp.
References deriveS2mFromM2s(), and m2s_.
Referenced by initCinfo(), and testCubeMeshJunctionTwoDimSurface().
void CubeMesh::setNx | ( | unsigned int | v | ) |
Definition at line 536 of file CubeMesh.cpp.
References nx_, and updateCoords().
Referenced by initCinfo().
void CubeMesh::setNy | ( | unsigned int | v | ) |
Definition at line 548 of file CubeMesh.cpp.
References ny_, and updateCoords().
Referenced by initCinfo().
void CubeMesh::setNz | ( | unsigned int | v | ) |
Definition at line 559 of file CubeMesh.cpp.
References nz_, and updateCoords().
Referenced by initCinfo().
void CubeMesh::setPreserveNumEntries | ( | bool | v | ) |
Definition at line 581 of file CubeMesh.cpp.
References preserveNumEntries_.
Referenced by initCinfo(), testCubeMesh(), testCubeMeshExtendStencil(), testCubeMeshFillTwoDimSurface(), testCubeMeshJunctionDiffSizeMesh(), testCubeMeshJunctionTwoDimSurface(), and testCubeMeshMultiJunctionTwoD().
void CubeMesh::setSpaceToMesh | ( | vector< unsigned int > | v | ) |
Definition at line 666 of file CubeMesh.cpp.
References deriveM2sFromS2m(), and s2m_.
Referenced by initCinfo(), and testCubeMeshJunctionTwoDimSurface().
void CubeMesh::setSurface | ( | vector< unsigned int > | v | ) |
Definition at line 677 of file CubeMesh.cpp.
References surface_.
Referenced by initCinfo(), and testCubeMeshJunctionTwoDimSurface().
void CubeMesh::setX0 | ( | double | v | ) |
Definition at line 435 of file CubeMesh.cpp.
References updateCoords(), and x0_.
Referenced by initCinfo(), and testCubeMesh().
void CubeMesh::setX1 | ( | double | v | ) |
Definition at line 468 of file CubeMesh.cpp.
References updateCoords(), and x1_.
Referenced by initCinfo(), and testCubeMesh().
void CubeMesh::setY0 | ( | double | v | ) |
Definition at line 446 of file CubeMesh.cpp.
References updateCoords(), and y0_.
Referenced by initCinfo(), and testCubeMesh().
void CubeMesh::setY1 | ( | double | v | ) |
Definition at line 479 of file CubeMesh.cpp.
References updateCoords(), and y1_.
Referenced by initCinfo(), and testCubeMesh().
void CubeMesh::setZ0 | ( | double | v | ) |
Definition at line 457 of file CubeMesh.cpp.
References updateCoords(), and z0_.
Referenced by initCinfo(), and testCubeMesh().
void CubeMesh::setZ1 | ( | double | v | ) |
Definition at line 490 of file CubeMesh.cpp.
References updateCoords(), and z1_.
Referenced by initCinfo(), and testCubeMesh().
unsigned int CubeMesh::spaceToIndex | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
Converts the 3-D coords to an index. EMPTY if out of range.
Definition at line 1171 of file CubeMesh.cpp.
References dx_, dy_, dz_, EMPTY, nx_, ny_, s2m_, x0_, y0_, z0_, and z1_.
Referenced by fillPointsOnCircle(), and fillPointsOnDisc().
const vector< unsigned int > & CubeMesh::surface | ( | ) | const |
Utility and test function to read surface.
Definition at line 1111 of file CubeMesh.cpp.
References surface_.
Referenced by initCinfo(), testCubeMeshFillTwoDimSurface(), testCubeMeshJunctionDiffSizeMesh(), testCubeMeshJunctionTwoDimSurface(), and testCubeMeshMultiJunctionTwoD().
void CubeMesh::transmitChange | ( | const Eref & | e, |
double | oldvol | ||
) |
void CubeMesh::updateCoords | ( | ) |
Recomputes all local coordinate and meshing data following a change in any of the coord parameters
This assumes that dx, dy, dz are the quantities to preserve, over numEntries. So when the compartment changes volume, so does numEntries. dx, dy, dz do not change, some of the sub-cuboids will partially be outside.
Temporarily fill out the whole cube for m2s and s2m. These
Definition at line 384 of file CubeMesh.cpp.
References buildStencil(), dx_, dy_, dz_, fillThreeDimSurface(), m2s_, nx_, ny_, nz_, preserveNumEntries_, s2m_, surface_, swapIfBackward(), x0_, x1_, y0_, y1_, z0_, and z1_.
Referenced by CubeMesh(), innerSetCoords(), setDx(), setDy(), setDz(), setNx(), setNy(), setNz(), setX0(), setX1(), setY0(), setY1(), setZ0(), and setZ1().
void CubeMesh::updateM2s | ( | ) |
void CubeMesh::updateS2m | ( | ) |
|
virtual |
Virtual func to get volume of entire compartment.
Implements ChemCompt.
Definition at line 761 of file CubeMesh.cpp.
References x0_, x1_, y0_, y1_, z0_, and z1_.
Referenced by vSetVolumeNotRates().
|
virtual |
|
virtual |
Virtual func so that derived classes can pass voxel volume back.
Implements ChemCompt.
Definition at line 917 of file CubeMesh.cpp.
References dx_, dy_, dz_, nx_, ny_, and nz_.
Referenced by setCoords().
|
virtual |
Virtual func, assigns volume, usually to single voxel.
Implements ChemCompt.
Definition at line 969 of file CubeMesh.cpp.
References dx_, dy_, dz_, vGetEntireVolume(), x0_, x1_, y0_, y1_, z0_, and z1_.
|
static |
Definition at line 287 of file CubeMesh.h.
Referenced by checkAbut(), setIntersectVoxel(), and testIntersectVoxel().
|
static |
Definition at line 288 of file CubeMesh.h.
Referenced by checkAbut(), and setIntersectVoxel().
|
static |
Definition at line 289 of file CubeMesh.h.
Referenced by checkAbut(), and setIntersectVoxel().
|
private |
Flag: Should dx change or nx, with vol?
Definition at line 297 of file CubeMesh.h.
Referenced by getAlwaysDiffuse(), matchMeshEntries(), and setAlwaysDiffuse().
|
private |
coords
Definition at line 307 of file CubeMesh.h.
Referenced by assignVoxels(), buildStencil(), compareMeshSpacing(), defineIntersection(), extendedMeshEntryVolume(), fillSpaceToMeshLookup(), getCoordinates(), getCoords(), getDiffusionArea(), getDx(), getMeshEntryVolume(), getVoxelArea(), getVoxelLength(), indexToSpace(), innerHandleRequestMeshStats(), innerSetCoords(), matchCubeMeshEntries(), nearest(), setDiffScale(), setDx(), setJunctionVol(), spaceToIndex(), updateCoords(), vGetVoxelMidpoint(), vGetVoxelVolume(), and vSetVolumeNotRates().
|
private |
Cuboid edge.
Definition at line 308 of file CubeMesh.h.
Referenced by assignVoxels(), buildStencil(), compareMeshSpacing(), defineIntersection(), extendedMeshEntryVolume(), fillSpaceToMeshLookup(), getCoordinates(), getCoords(), getDiffusionArea(), getDy(), getMeshEntryVolume(), getVoxelArea(), getVoxelLength(), indexToSpace(), innerHandleRequestMeshStats(), innerSetCoords(), matchCubeMeshEntries(), nearest(), setDiffScale(), setDy(), setJunctionVol(), spaceToIndex(), updateCoords(), vGetVoxelMidpoint(), vGetVoxelVolume(), and vSetVolumeNotRates().
|
private |
Cuboid edge.
Definition at line 309 of file CubeMesh.h.
Referenced by assignVoxels(), buildStencil(), compareMeshSpacing(), defineIntersection(), extendedMeshEntryVolume(), fillSpaceToMeshLookup(), getCoordinates(), getCoords(), getDiffusionArea(), getDz(), getMeshEntryVolume(), getVoxelArea(), getVoxelLength(), indexToSpace(), innerHandleRequestMeshStats(), innerSetCoords(), matchCubeMeshEntries(), nearest(), setDiffScale(), setDz(), setJunctionVol(), spaceToIndex(), updateCoords(), vGetVoxelMidpoint(), vGetVoxelVolume(), and vSetVolumeNotRates().
|
static |
Definition at line 285 of file CubeMesh.h.
Referenced by buildStencil(), checkAbut(), deriveM2sFromS2m(), deriveS2mFromM2s(), fillPointsOnCircle(), fillPointsOnDisc(), fillSpaceToMeshLookup(), getDiffusionArea(), matchCubeMeshEntries(), nearest(), neighbor(), setAbut(), spaceToIndex(), and testIntersectVoxel().
|
private |
Definition at line 295 of file CubeMesh.h.
Referenced by getIsToroid(), and setIsToroid().
|
private |
For spherical mesh, coords are xyz r0 r1 theta0 theta1 phi0 phi1 For Cylindrical mesh, coords are x1y1z1 x2y2z2 r0 r1 phi0 phi1 For cuboid mesh, coords are x1y1z1 x2y2z2 For tetrahedral mesh, coords are x1y1z1 x2y2z2 x3y3z3 x4y4z4 Later worry about planar meshes. Those would be surfaces Mesh to Space lookup. Indexed by linear mesh index, from 0 to number of actual mesh entries (occupied cuboids). Returns spatial index, from 0 to nx * ny * nz - 1. Needed whenever the cuboid mesh is not filling the entire volume of the cube, that is, in most cases.
Definition at line 330 of file CubeMesh.h.
Referenced by buildStencil(), deriveM2sFromS2m(), deriveS2mFromM2s(), extendedMeshEntryVolume(), fillSpaceToMeshLookup(), getCoordinates(), getDiffusionArea(), getMeshToSpace(), innerGetNumEntries(), matchAllEntries(), setMeshToSpace(), updateCoords(), and vGetVoxelMidpoint().
|
static |
Definition at line 290 of file CubeMesh.h.
Referenced by checkAbut(), setAbut(), and testIntersectVoxel().
|
private |
Cuboid edge.
Definition at line 311 of file CubeMesh.h.
Referenced by assignVoxels(), buildStencil(), deriveM2sFromS2m(), deriveS2mFromM2s(), fillSpaceToMeshLookup(), fillThreeDimSurface(), fillTwoDimSurface(), getCoordinates(), getNx(), getVoxelArea(), indexToSpace(), innerBuildDefaultMesh(), innerHandleRequestMeshStats(), nearest(), neighbor(), numDims(), setNx(), spaceToIndex(), updateCoords(), vGetVoxelMidpoint(), and vGetVoxelVolume().
|
private |
Definition at line 312 of file CubeMesh.h.
Referenced by assignVoxels(), buildStencil(), deriveM2sFromS2m(), deriveS2mFromM2s(), fillSpaceToMeshLookup(), fillThreeDimSurface(), fillTwoDimSurface(), getCoordinates(), getNy(), getVoxelArea(), indexToSpace(), innerBuildDefaultMesh(), innerHandleRequestMeshStats(), nearest(), neighbor(), numDims(), setNy(), spaceToIndex(), updateCoords(), vGetVoxelMidpoint(), and vGetVoxelVolume().
|
private |
Definition at line 313 of file CubeMesh.h.
Referenced by assignVoxels(), buildStencil(), deriveM2sFromS2m(), deriveS2mFromM2s(), fillSpaceToMeshLookup(), fillThreeDimSurface(), fillTwoDimSurface(), getCoordinates(), getNz(), getVoxelArea(), indexToSpace(), innerBuildDefaultMesh(), innerHandleRequestMeshStats(), neighbor(), numDims(), setNz(), updateCoords(), and vGetVoxelVolume().
|
private |
Flag: Should the ends loop around mathemagically?
Definition at line 296 of file CubeMesh.h.
Referenced by getPreserveNumEntries(), innerSetCoords(), setPreserveNumEntries(), and updateCoords().
|
private |
Space to Mesh lookup. Indexed by spatial index, from 0 to nx * ny * nz - 1. Specifically, point x y z is indexed as ( z * ny + y ) * nx + x. Returns mesh index to look up molecules etc in the specific volume. In case the spatial location is outside the included volume of the mesh, returns ~0.
Definition at line 339 of file CubeMesh.h.
Referenced by assignVoxels(), buildStencil(), deriveM2sFromS2m(), deriveS2mFromM2s(), fillSpaceToMeshLookup(), getSpaceToMesh(), matchCubeMeshEntries(), nearest(), neighbor(), setSpaceToMesh(), spaceToIndex(), and updateCoords().
|
static |
Definition at line 286 of file CubeMesh.h.
Referenced by checkAbut(), setAbut(), setIntersectVoxel(), and testIntersectVoxel().
|
private |
Vector of spatial meshIndices comprising surface of volume in CubeMesh.
Definition at line 345 of file CubeMesh.h.
Referenced by assignVoxels(), fillThreeDimSurface(), fillTwoDimSurface(), getSurface(), matchCubeMeshEntries(), nearest(), setSurface(), surface(), and updateCoords().
|
private |
Flag: should all voxels diffuse to any tgt?
Definition at line 299 of file CubeMesh.h.
Referenced by assignVoxels(), defineIntersection(), fillSpaceToMeshLookup(), getCoordinates(), getCoords(), getX0(), indexToSpace(), innerSetCoords(), isInsideCuboid(), isInsideSpheroid(), nearest(), setX0(), spaceToIndex(), updateCoords(), vGetEntireVolume(), vGetVoxelMidpoint(), and vSetVolumeNotRates().
|
private |
coords
Definition at line 303 of file CubeMesh.h.
Referenced by defineIntersection(), getCoords(), getX1(), innerSetCoords(), isInsideSpheroid(), setX1(), updateCoords(), vGetEntireVolume(), and vSetVolumeNotRates().
|
private |
coords
Definition at line 300 of file CubeMesh.h.
Referenced by assignVoxels(), defineIntersection(), fillSpaceToMeshLookup(), getCoordinates(), getCoords(), getY0(), indexToSpace(), innerSetCoords(), isInsideCuboid(), isInsideSpheroid(), nearest(), setY0(), spaceToIndex(), updateCoords(), vGetEntireVolume(), vGetVoxelMidpoint(), and vSetVolumeNotRates().
|
private |
coords
Definition at line 304 of file CubeMesh.h.
Referenced by defineIntersection(), getCoords(), getY1(), innerSetCoords(), isInsideCuboid(), isInsideSpheroid(), setY1(), updateCoords(), vGetEntireVolume(), and vSetVolumeNotRates().
|
private |
coords
Definition at line 301 of file CubeMesh.h.
Referenced by assignVoxels(), defineIntersection(), fillSpaceToMeshLookup(), getCoordinates(), getCoords(), getZ0(), indexToSpace(), innerSetCoords(), isInsideCuboid(), isInsideSpheroid(), nearest(), setZ0(), spaceToIndex(), updateCoords(), vGetEntireVolume(), vGetVoxelMidpoint(), and vSetVolumeNotRates().
|
private |
coords
Definition at line 305 of file CubeMesh.h.
Referenced by defineIntersection(), getCoords(), getZ1(), innerSetCoords(), isInsideCuboid(), isInsideSpheroid(), nearest(), setZ1(), spaceToIndex(), updateCoords(), vGetEntireVolume(), and vSetVolumeNotRates().