MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <EndoMesh.h>
Public Member Functions | |
EndoMesh () | |
double | extendedMeshEntryVolume (unsigned int fid) const |
Volume of mesh Entry including abutting diff-coupled voxels. More... | |
double | getApower (const Eref &e) const |
double | getAscale (const Eref &e) const |
vector< double > | getCoordinates (unsigned int fid) const |
Virtual function to return coords of mesh Entry. More... | |
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... | |
bool | getDoAxialDiffusion (const Eref &e) 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... | |
unsigned int | getMeshType (unsigned int fid) const |
Virtual function to return MeshType of specified entry. More... | |
vector< unsigned int > | getParentVoxel () const |
Inherited virtual, do nothing for now. More... | |
double | getRpower (const Eref &e) const |
double | getRscale (const Eref &e) const |
ObjId | getSurround (const Eref &e) const |
const vector< double > & | getVoxelArea () const |
const vector< double > & | getVoxelLength () const |
double | getVpower (const Eref &e) const |
double | getVscale (const Eref &e) const |
void | indexToSpace (unsigned int index, double &x, double &y, double &z) const |
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 |
Virtual function to return # of spatial dimensions of mesh. More... | |
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 | innerSetNumEntries (unsigned int n) |
Inherited virtual func. More... | |
void | matchMeshEntries (const ChemCompt *other, vector< VoxelJunction > &ret) const |
double | nearest (double x, double y, double z, unsigned int &index) const |
void | setApower (const Eref &e, double v) |
void | setAscale (const Eref &e, double v) |
void | setDoAxialDiffusion (const Eref &e, bool v) |
void | setRpower (const Eref &e, double v) |
void | setRscale (const Eref &e, double v) |
void | setSurround (const Eref &e, ObjId v) |
void | setVpower (const Eref &e, double v) |
void | setVscale (const Eref &e, double v) |
double | vGetEntireVolume () const |
Inherited virtual. Returns entire volume of 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) |
Inherited virtual. Resizes len and dia of each voxel. More... | |
~EndoMesh () | |
![]() | |
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 () |
Private Attributes | |
double | aPower_ |
rEndo = rScale * pow( surroundVol, rPower_) More... | |
double | aScale_ |
aEndo = aScale * pow( surroundVol, aPower_) More... | |
bool | doAxialDiffusion_ |
vEndo = vScale * pow( surroundVol, vPower_) More... | |
Id | insideMeshes_ |
const MeshCompt * | parent_ |
double | rPower_ |
EndoMeshes inside. Used to update. More... | |
double | rScale_ |
rEndo = rScale * pow( surroundVol, rPower_) More... | |
ObjId | surround_ |
double | vPower_ |
aEndo = aScale * pow( surroundVol, aPower_) More... | |
double | vScale_ |
vEndo = vScale * pow( surroundVol, vPower_) More... | |
The EndoMesh is a cellular compartment entirely contained within another compartment. It supports diffusion only with its immediate surround, of which there can only be one, and with its immediate interior, which can be one or more EndoMeshes. Each voxel in the EndoMesh is well mixed, and does not exchange with any other voxels. Typically used in modelling endosomes, ER, mitochondria, and other organelles.
Definition at line 23 of file EndoMesh.h.
EndoMesh::EndoMesh | ( | ) |
Definition at line 138 of file EndoMesh.cpp.
EndoMesh::~EndoMesh | ( | ) |
Definition at line 152 of file EndoMesh.cpp.
|
virtual |
Volume of mesh Entry including abutting diff-coupled voxels.
Virtual function to return volume of mesh Entry, including for diffusively coupled voxels from other solvers.
Implements ChemCompt.
Definition at line 307 of file EndoMesh.cpp.
References MeshCompt::extendedMeshEntryVolume(), parent_, vPower_, and vScale_.
double EndoMesh::getApower | ( | const Eref & | e | ) | const |
Definition at line 186 of file EndoMesh.cpp.
References aPower_.
Referenced by initCinfo().
double EndoMesh::getAscale | ( | const Eref & | e | ) | const |
Definition at line 196 of file EndoMesh.cpp.
References aScale_.
Referenced by initCinfo().
|
virtual |
Virtual function to return coords of mesh Entry.
Virtual function to return coords of mesh Entry. For Endo mesh, coords are just middle of parent.
Implements ChemCompt.
Definition at line 277 of file EndoMesh.cpp.
References ChemCompt::getCoordinates(), and parent_.
|
virtual |
Virtual function to return diffusion X-section area.
Virtual function to return diffusion X-section area for each neighbor This applies if we have endo mesh voxels diffusing with each other
Implements ChemCompt.
Definition at line 293 of file EndoMesh.cpp.
References ChemCompt::getNumEntries(), and parent_.
|
virtual |
Virtual function to return scale factor for diffusion. 1 here.
Virtual function to return scale factor for diffusion. 1 here. This applies if we have endo mesh voxels diffusing with each other
Implements ChemCompt.
Definition at line 300 of file EndoMesh.cpp.
References ChemCompt::getNumEntries(), and parent_.
bool EndoMesh::getDoAxialDiffusion | ( | const Eref & | e | ) | const |
Definition at line 242 of file EndoMesh.cpp.
References doAxialDiffusion_.
Referenced by initCinfo().
|
virtual |
Virtual function to return dimensions of specified entry.
Implements ChemCompt.
Definition at line 258 of file EndoMesh.cpp.
|
virtual |
Virtual function to return volume of mesh Entry.
Implements ChemCompt.
Definition at line 269 of file EndoMesh.cpp.
References ChemCompt::getMeshEntryVolume(), parent_, vPower_, and vScale_.
|
virtual |
Virtual function to return MeshType of specified entry.
Implements ChemCompt.
Definition at line 252 of file EndoMesh.cpp.
References ENDO.
|
virtual |
Inherited virtual, do nothing for now.
This means the sibling voxel immediately adjacent to it, not the voxel surrounding it. Should we wish to do diffusion we would need to use the parent voxel of the surround voxel. Otherewise use EMTPY_VOXEL == -1U.
Implements MeshCompt.
Definition at line 361 of file EndoMesh.cpp.
References doAxialDiffusion_, MeshCompt::getParentVoxel(), ChemCompt::innerGetNumEntries(), and parent_.
double EndoMesh::getRpower | ( | const Eref & | e | ) | const |
Definition at line 166 of file EndoMesh.cpp.
References rPower_.
Referenced by initCinfo().
double EndoMesh::getRscale | ( | const Eref & | e | ) | const |
Definition at line 176 of file EndoMesh.cpp.
References rScale_.
Referenced by initCinfo().
Definition at line 232 of file EndoMesh.cpp.
References surround_.
Referenced by initCinfo().
|
virtual |
Implements MeshCompt.
Definition at line 384 of file EndoMesh.cpp.
References aPower_, aScale_, parent_, and ChemCompt::vGetVoxelVolume().
Referenced by matchMeshEntries().
|
virtual |
Implements MeshCompt.
Definition at line 393 of file EndoMesh.cpp.
References parent_, ChemCompt::vGetVoxelVolume(), vPower_, and vScale_.
double EndoMesh::getVpower | ( | const Eref & | e | ) | const |
Definition at line 206 of file EndoMesh.cpp.
References vPower_.
Referenced by initCinfo().
double EndoMesh::getVscale | ( | const Eref & | e | ) | const |
Definition at line 216 of file EndoMesh.cpp.
References vScale_.
Referenced by initCinfo().
|
virtual |
Converts specified index to xyz coords of middle of voxel Values out of range return original xyz
Implements ChemCompt.
Definition at line 460 of file EndoMesh.cpp.
References ChemCompt::indexToSpace(), and parent_.
|
static |
Definition at line 26 of file EndoMesh.cpp.
References endoMeshCinfo, getApower(), getAscale(), getDoAxialDiffusion(), getRpower(), getRscale(), getSurround(), getVpower(), getVscale(), ChemCompt::initCinfo(), setApower(), setAscale(), setDoAxialDiffusion(), setRpower(), setRscale(), setSurround(), setVpower(), and setVscale().
|
virtual |
Virtual func to make a mesh with specified Volume and numEntries.
Implements ChemCompt.
Definition at line 350 of file EndoMesh.cpp.
|
virtual |
Virtual function to return # of spatial dimensions of mesh.
Implements ChemCompt.
Definition at line 264 of file EndoMesh.cpp.
|
virtual |
Inherited virtual func. Returns number of MeshEntry in array
Implements ChemCompt.
Definition at line 336 of file EndoMesh.cpp.
References ChemCompt::innerGetNumEntries(), and parent_.
|
virtual |
void EndoMesh::innerHandleRequestMeshStats | ( | const Eref & | e, |
const SrcFinfo2< unsigned int, vector< double > > * | meshStatsFinfo | ||
) |
More inherited virtual funcs: request comes in for mesh stats.
Definition at line 318 of file EndoMesh.cpp.
References ChemCompt::getNumEntries(), parent_, and vGetEntireVolume().
|
virtual |
Inherited virtual func.
Inherited virtual func. Dummy, because the EndoMesh just does what its parent does.
Implements ChemCompt.
Definition at line 345 of file EndoMesh.cpp.
|
virtual |
Returns the meshIndices (NOT spatial indices) of all adjacent mesh entry pairs on ether side of the (self, other) junction. meshIndices are the indices that look up entries in the vector of pools. spatialIndices are (iz * ny + iy) * nx + ix, that is, a linear conversion of cartesian spatial indices. So, for two touching cubes, the return vector is the paired meshIndices on either side of the plane of contact. If one mesh has a finer mesh than the other, or if there are more than one contact points from self to other (for example, at a corner), then we just have multiple pairs using the same meshIndex of the repeated voxel.
Consider concentric EndoMeshes in an outer cyl/sphere of radius r_0. Radii, from out to in, are r_0, r_1, r_2.... r_innermost. Consider that we are on EndoMesh n. The diffusion length in each case is 1/2(r_n-1 - r_n+1). For the innermost we use r_n+1 = 0 The diffusion XA is the area of the EndoMesh.
Implements ChemCompt.
Definition at line 420 of file EndoMesh.cpp.
References getVoxelArea(), MeshCompt::getVoxelLength(), PI, vGetVoxelVolume(), and ChemCompt::vGetVoxelVolume().
Referenced by CylMesh::matchMeshEntries(), CubeMesh::matchMeshEntries(), and NeuroMesh::matchMeshEntries().
|
virtual |
Returns distance and index of nearest mesh entry. Computes each mesh entry position as its geometric centre. If the current location is not inside a valid mesh entry, distance returned is negative.
Implements ChemCompt.
Definition at line 453 of file EndoMesh.cpp.
References ChemCompt::nearest(), and parent_.
void EndoMesh::setApower | ( | const Eref & | e, |
double | v | ||
) |
Definition at line 181 of file EndoMesh.cpp.
References aPower_.
Referenced by initCinfo().
void EndoMesh::setAscale | ( | const Eref & | e, |
double | v | ||
) |
Definition at line 191 of file EndoMesh.cpp.
References aScale_.
Referenced by initCinfo().
void EndoMesh::setDoAxialDiffusion | ( | const Eref & | e, |
bool | v | ||
) |
Definition at line 237 of file EndoMesh.cpp.
References doAxialDiffusion_.
Referenced by initCinfo().
void EndoMesh::setRpower | ( | const Eref & | e, |
double | v | ||
) |
Definition at line 161 of file EndoMesh.cpp.
References rPower_.
Referenced by initCinfo().
void EndoMesh::setRscale | ( | const Eref & | e, |
double | v | ||
) |
Definition at line 171 of file EndoMesh.cpp.
References rScale_.
Referenced by initCinfo().
Definition at line 221 of file EndoMesh.cpp.
References Element::cinfo(), ObjId::data(), ObjId::element(), Cinfo::isA(), Cinfo::name(), parent_, ObjId::path(), and surround_.
Referenced by initCinfo().
void EndoMesh::setVpower | ( | const Eref & | e, |
double | v | ||
) |
Definition at line 201 of file EndoMesh.cpp.
References vPower_.
Referenced by initCinfo().
void EndoMesh::setVscale | ( | const Eref & | e, |
double | v | ||
) |
Definition at line 211 of file EndoMesh.cpp.
References vScale_.
Referenced by initCinfo().
|
virtual |
Inherited virtual. Returns entire volume of compartment.
Implements ChemCompt.
Definition at line 402 of file EndoMesh.cpp.
References vGetVoxelVolume().
Referenced by innerHandleRequestMeshStats().
|
virtual |
Virtual func so that derived classes can return voxel midpoint.
Implements ChemCompt.
Definition at line 379 of file EndoMesh.cpp.
References parent_, and ChemCompt::vGetVoxelMidpoint().
|
virtual |
Virtual func so that derived classes can pass voxel volume back.
Implements ChemCompt.
Definition at line 370 of file EndoMesh.cpp.
References parent_, ChemCompt::vGetVoxelVolume(), vPower_, and vScale_.
Referenced by matchMeshEntries(), and vGetEntireVolume().
|
virtual |
Inherited virtual. Resizes len and dia of each voxel.
Implements ChemCompt.
Definition at line 411 of file EndoMesh.cpp.
|
private |
rEndo = rScale * pow( surroundVol, rPower_)
Definition at line 142 of file EndoMesh.h.
Referenced by getApower(), getVoxelArea(), and setApower().
|
private |
aEndo = aScale * pow( surroundVol, aPower_)
Definition at line 143 of file EndoMesh.h.
Referenced by getAscale(), getVoxelArea(), and setAscale().
|
private |
vEndo = vScale * pow( surroundVol, vPower_)
Definition at line 147 of file EndoMesh.h.
Referenced by getDoAxialDiffusion(), getParentVoxel(), and setDoAxialDiffusion().
|
private |
Definition at line 133 of file EndoMesh.h.
|
private |
Definition at line 131 of file EndoMesh.h.
Referenced by extendedMeshEntryVolume(), getCoordinates(), getDiffusionArea(), getDiffusionScaling(), getMeshEntryVolume(), getParentVoxel(), getVoxelArea(), getVoxelLength(), indexToSpace(), innerGetNumEntries(), innerHandleRequestMeshStats(), nearest(), setSurround(), vGetVoxelMidpoint(), and vGetVoxelVolume().
|
private |
EndoMeshes inside. Used to update.
The reason why the powers don't have to be 1/3, 1/2 and 1 is because some organelles are not a simple linear vol relationship with their surround. I want to keep flexibility.
Definition at line 140 of file EndoMesh.h.
Referenced by getRpower(), and setRpower().
|
private |
rEndo = rScale * pow( surroundVol, rPower_)
Definition at line 141 of file EndoMesh.h.
Referenced by getRscale(), and setRscale().
|
private |
Surrounding mesh. Use this for calculating all volume and diffusion terms, don't maintain any local variables.
Definition at line 130 of file EndoMesh.h.
Referenced by getSurround(), and setSurround().
|
private |
aEndo = aScale * pow( surroundVol, aPower_)
Definition at line 144 of file EndoMesh.h.
Referenced by extendedMeshEntryVolume(), getMeshEntryVolume(), getVoxelLength(), getVpower(), setVpower(), and vGetVoxelVolume().
|
private |
vEndo = vScale * pow( surroundVol, vPower_)
Definition at line 145 of file EndoMesh.h.
Referenced by extendedMeshEntryVolume(), getMeshEntryVolume(), getVoxelLength(), getVscale(), setVscale(), and vGetVoxelVolume().