MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <MeshCompt.h>
Public Member Functions | |
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... | |
virtual vector< unsigned int > | getParentVoxel () const =0 |
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 |
virtual const vector< double > & | getVoxelArea () const =0 |
virtual const vector< double > & | getVoxelLength () const =0 |
vector< double > | innerGetStencilRate (unsigned int row) const |
void | innerResetStencil () |
virtual func implemented here. More... | |
MeshCompt () | |
void | setStencilSize (unsigned int numRows, unsigned int numCols) |
~MeshCompt () | |
Public Member Functions inherited from ChemCompt | |
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 |
virtual vector< double > | getCoordinates (unsigned int fid) const =0 |
Virtual function to return coords of mesh Entry. More... | |
virtual vector< double > | getDiffusionArea (unsigned int fid) const =0 |
Virtual function to return diffusion X-section area per neighbor. More... | |
virtual vector< double > | getDiffusionScaling (unsigned int fid) const =0 |
Virtual function to return scale factor for diffusion. 1 here. More... | |
unsigned int | getDimensions () const |
double | getEntireVolume (const Eref &e) const |
bool | getIsMembraneBound () const |
virtual unsigned int | getMeshDimensions (unsigned int fid) const =0 |
Virtual function to return dimensions of specified entry. More... | |
virtual double | getMeshEntryVolume (unsigned int fid) const =0 |
Virtual function to return volume of mesh Entry. More... | |
virtual unsigned int | getMeshType (unsigned int fid) const =0 |
Virtual function to return MeshType of specified entry. More... | |
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) |
virtual void | indexToSpace (unsigned int index, double &x, double &y, double &z) const =0 |
virtual void | innerBuildDefaultMesh (const Eref &e, double volume, unsigned int numEntries)=0 |
virtual unsigned int | innerGetDimensions () const =0 |
virtual unsigned int | innerGetNumEntries () const =0 |
virtual void | innerHandleNodeInfo (const Eref &e, unsigned int numNodes, unsigned int numThreads)=0 |
virtual void | innerSetNumEntries (unsigned int n)=0 |
MeshEntry * | lookupEntry (unsigned int index) |
virtual void | matchMeshEntries (const ChemCompt *other, vector< VoxelJunction > &ret) const =0 |
virtual double | nearest (double x, double y, double z, unsigned int &index) const =0 |
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 double | vGetEntireVolume () const =0 |
virtual const vector< double > & | vGetVoxelMidpoint () const =0 |
Virtual func so that derived classes can return voxel midpoint. More... | |
virtual const vector< double > & | vGetVoxelVolume () const =0 |
Virtual func so that derived classes can pass voxel volume back. More... | |
virtual bool | vSetVolumeNotRates (double volume)=0 |
Virtual function for actually doing this. More... | |
virtual | ~ChemCompt () |
Private Attributes | |
SparseMatrix< double > | coreStencil_ |
Handles the core stencil for own vol. More... | |
vector< double > | extendedMeshEntryVolume_ |
SparseMatrix< double > | m_ |
Handles stencil for core + abutting voxels. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from ChemCompt | |
static double | distance (double x, double y, double z) |
static const Cinfo * | initCinfo () |
static SrcFinfo1< vector < double > > * | voxelVolOut () |
The MeshCompt represents the base class for all compartments which are set up as a meshes. These include CubeMesh, CylMesh and NeuroMesh. The MeshCompt handles the stencil that is the core of all the meshes. The stencil specifies which compartments diffuse into each other, and by how much.
Definition at line 20 of file MeshCompt.h.
MeshCompt::MeshCompt | ( | ) |
Definition at line 24 of file MeshCompt.cpp.
MeshCompt::~MeshCompt | ( | ) |
Definition at line 29 of file MeshCompt.cpp.
void MeshCompt::addRow | ( | unsigned int | index, |
const vector< double > & | entry, | ||
const vector< unsigned int > & | colIndex | ||
) |
Definition at line 98 of file MeshCompt.cpp.
References SparseMatrix< T >::addRow(), and coreStencil_.
Referenced by CylMesh::buildStencil(), NeuroMesh::buildStencil(), and CubeMesh::buildStencil().
|
virtual |
Inherited virtual function to clear the vector of MeshEntryVolume.
Implements ChemCompt.
Definition at line 43 of file MeshCompt.cpp.
References extendedMeshEntryVolume_.
|
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.
Reimplemented in NeuroMesh, SpineMesh, and PsdMesh.
Definition at line 36 of file MeshCompt.cpp.
References extendedMeshEntryVolume_.
Referenced by EndoMesh::extendedMeshEntryVolume(), CylMesh::extendedMeshEntryVolume(), PsdMesh::extendedMeshEntryVolume(), SpineMesh::extendedMeshEntryVolume(), CubeMesh::extendedMeshEntryVolume(), and NeuroMesh::extendedMeshEntryVolume().
|
virtual |
Add boundary voxels to stencil for cross-solver junctions.
extendStencil adds voxels to the current stencil m_, to build up a monolithic stencil that also handles the entries just past all the boundaries. This function may be called many times to deal with the addition of multiple junctions. Before the first of these calls, the m_ matrix should be set to the coreStencil_.
Organizes vj by voxel, that is, by row.
Implements ChemCompt.
Definition at line 121 of file MeshCompt.cpp.
References SparseMatrix< T >::addRow(), SparseMatrix< T >::clear(), coreStencil_, EMPTY, extendedMeshEntryVolume_, ChemCompt::getMeshEntryVolume(), SparseMatrix< T >::getRow(), m_, SparseMatrix< T >::nRows(), and SparseMatrix< T >::setSize().
Referenced by testCubeMeshExtendStencil().
|
virtual |
Looks up stencil to return vector of indices of coupled voxels.
Virtual function to return info on Entries connected to this one.
Implements ChemCompt.
Definition at line 69 of file MeshCompt.cpp.
References SparseMatrix< T >::getRow(), and m_.
Referenced by NeuroMesh::getDiffusionArea(), and testCubeMesh().
|
pure virtual |
Implemented in CubeMesh, NeuroMesh, PsdMesh, CylMesh, EndoMesh, and SpineMesh.
Referenced by Dsolve::build(), and EndoMesh::getParentVoxel().
const SparseMatrix< double > & MeshCompt::getStencil | ( | ) | const |
Returns entire sparse matrix of mesh. Used by diffusion solver.
Definition at line 60 of file MeshCompt.cpp.
References coreStencil_.
|
virtual |
Derived function to return SparseMatrix-style row info for specified mesh entry.
Implements ChemCompt.
Definition at line 54 of file MeshCompt.cpp.
References SparseMatrix< T >::getRow(), and m_.
Referenced by testCubeMeshExtendStencil().
|
pure virtual |
|
pure virtual |
Implemented in CubeMesh, SpineMesh, NeuroMesh, PsdMesh, CylMesh, and EndoMesh.
Referenced by Dsolve::build(), and EndoMesh::matchMeshEntries().
|
virtual |
Looks up stencil to return vector of diffusion coupling to neighbor voxels.
Implements ChemCompt.
Definition at line 85 of file MeshCompt.cpp.
References SparseMatrix< T >::getRow(), and m_.
|
virtual |
virtual func implemented here.
Implements ChemCompt.
Definition at line 49 of file MeshCompt.cpp.
References coreStencil_, and m_.
Referenced by CylMesh::buildStencil(), PsdMesh::buildStencil(), SpineMesh::buildStencil(), NeuroMesh::buildStencil(), and CubeMesh::buildStencil().
void MeshCompt::setStencilSize | ( | unsigned int | numRows, |
unsigned int | numCols | ||
) |
Definition at line 106 of file MeshCompt.cpp.
References SparseMatrix< T >::clear(), coreStencil_, and SparseMatrix< T >::setSize().
Referenced by CylMesh::buildStencil(), PsdMesh::buildStencil(), SpineMesh::buildStencil(), NeuroMesh::buildStencil(), and CubeMesh::buildStencil().
|
private |
Handles the core stencil for own vol.
Definition at line 74 of file MeshCompt.h.
Referenced by addRow(), extendStencil(), getStencil(), innerResetStencil(), and setStencilSize().
|
private |
vector of meshEntryVolumes for abutting surfaces, needed to compute diffusion rates across junctions. Indexed from zero.
Definition at line 85 of file MeshCompt.h.
Referenced by clearExtendedMeshEntryVolume(), extendedMeshEntryVolume(), and extendStencil().
|
private |
Handles stencil for core + abutting voxels.
Definition at line 77 of file MeshCompt.h.
Referenced by extendStencil(), getNeighbors(), getStencilRow(), innerGetStencilRate(), and innerResetStencil().