MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <SpineMesh.h>
Public Member Functions | |
void | buildStencil () |
double | extendedMeshEntryVolume (unsigned int fid) const |
Vol of all mesh Entries including abutting diff-coupled voxels. More... | |
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... | |
vector< Id > | getElecComptMap () const |
vector< unsigned int > | getEndVoxelInCompt () const |
Returns index of end voxel mapping to elec compt, just first+1. More... | |
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 > | getNeuronVoxel () const |
vector< unsigned int > | getParentVoxel () const |
vector< unsigned int > | getStartVoxelInCompt () const |
Returns index of first voxel mapping to elec compt. More... | |
const vector< double > & | getVoxelArea () const |
const vector< double > & | getVoxelLength () const |
void | handleSpineList (const Eref &e, vector< Id > shaft, vector< Id > head, vector< unsigned int > parentVoxel) |
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 |
Returns # of dimensions, always 3 here. Inherited pure virt func. More... | |
unsigned int | innerGetNumEntries () const |
void | innerHandleNodeInfo (const Eref &e, unsigned int numNodes, unsigned int numThreads) |
void | innerSetNumEntries (unsigned int n) |
Inherited virtual func. More... | |
void | matchCubeMeshEntries (const ChemCompt *other, vector< VoxelJunction > &ret) const |
void | matchMeshEntries (const ChemCompt *other, vector< VoxelJunction > &ret) const |
void | matchNeuroMeshEntries (const ChemCompt *other, vector< VoxelJunction > &ret) const |
void | matchSpineMeshEntries (const ChemCompt *other, vector< VoxelJunction > &ret) const |
double | nearest (double x, double y, double z, unsigned int &index) const |
void | setMeshEntryVolume (unsigned int fid, double volume) |
Virtual function to assign volume of mesh Entry. More... | |
SpineMesh () | |
SpineMesh (const SpineMesh &other) | |
const vector< SpineEntry > & | spines () const |
void | transmitChange (const Eref &e) |
void | updateCoords () |
double | vGetEntireVolume () const |
Inherited virtual func. 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 func. More... | |
~SpineMesh () | |
![]() | |
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... | |
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) |
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 | |
vector< double > | area_ |
vector< double > | length_ |
Pre-calculation of length of each MeshEntry. More... | |
vector< SpineEntry > | spines_ |
double | surfaceGranularity_ |
vector< double > | vs_ |
The SpineMesh sets up the diffusion geometries for dendritic spines. It is filled by a message from a NeuroMesh that contains information about the matching voxel on the NeuroMesh, and the compartment Ids for the spine shaft and head. The SpineMesh can further generate a PSD mesh with the info for the PSD geometries. This assumes that the each spine is a single voxel: single diffusive compartment, well-stirred. The shaft is treated as zero volume diffusion barrier to the dendrite. The PSD is a separate compt with its own diffusion coupling to the spine head.
Definition at line 26 of file SpineMesh.h.
SpineMesh::SpineMesh | ( | ) |
Definition at line 154 of file SpineMesh.cpp.
SpineMesh::SpineMesh | ( | const SpineMesh & | other | ) |
Definition at line 163 of file SpineMesh.cpp.
SpineMesh::~SpineMesh | ( | ) |
Definition at line 169 of file SpineMesh.cpp.
void SpineMesh::buildStencil | ( | ) |
Definition at line 475 of file SpineMesh.cpp.
References MeshCompt::innerResetStencil(), MeshCompt::setStencilSize(), and spines_.
Referenced by updateCoords().
|
virtual |
Vol of all mesh Entries including abutting diff-coupled voxels.
Virtual function to return volume of mesh Entry, including for diffusively coupled voxels from other solvers.
Reimplemented from MeshCompt.
Definition at line 348 of file SpineMesh.cpp.
References MeshCompt::extendedMeshEntryVolume(), getMeshEntryVolume(), and spines_.
|
virtual |
Virtual function to return coords of mesh Entry.
Virtual function to return coords of mesh Entry. For SpineMesh, coords are x1y1z1 x2y2z2 x3y3z3 r0 r1
Implements ChemCompt.
Definition at line 325 of file SpineMesh.cpp.
|
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 332 of file SpineMesh.cpp.
|
virtual |
Virtual function to return scale factor for diffusion. 1 here.
Virtual function to return scale factor for diffusion. I think all dendite tips need to return just one entry of 1.
Implements ChemCompt.
Definition at line 341 of file SpineMesh.cpp.
vector< Id > SpineMesh::getElecComptMap | ( | ) | const |
Returns vector of Ids of electrical compts that map to respective voxels in SpineMesh
Definition at line 204 of file SpineMesh.cpp.
References spines_.
Referenced by initCinfo().
vector< unsigned int > SpineMesh::getEndVoxelInCompt | ( | ) | const |
Returns index of end voxel mapping to elec compt, just first+1.
Definition at line 220 of file SpineMesh.cpp.
References spines_.
Referenced by initCinfo().
|
virtual |
Virtual function to return dimensions of specified entry.
Implements ChemCompt.
Definition at line 301 of file SpineMesh.cpp.
|
virtual |
Virtual function to return volume of mesh Entry.
Implements ChemCompt.
Definition at line 307 of file SpineMesh.cpp.
References spines_.
Referenced by extendedMeshEntryVolume(), handleSpineList(), and PsdMesh::matchSpineMeshEntries().
|
virtual |
Virtual function to return MeshType of specified entry.
Implements ChemCompt.
Definition at line 294 of file SpineMesh.cpp.
vector< unsigned int > SpineMesh::getNeuronVoxel | ( | ) | const |
Returns index of voxel on NeuroMesh to which this spine is connected.
Definition at line 196 of file SpineMesh.cpp.
References spines_.
Referenced by initCinfo().
|
virtual |
This function returns the diffusively connected parent voxel within the current (spine) mesh. Since each spine is treated as an independed voxel, there is no such voxel, so we return -1U for each spine. Note that there is a separate function that returns the parentVoxel referred to the NeuroMesh that this spine sits on.
Implements MeshCompt.
Definition at line 185 of file SpineMesh.cpp.
References spines_.
Referenced by initCinfo().
vector< unsigned int > SpineMesh::getStartVoxelInCompt | ( | ) | const |
Returns index of first voxel mapping to elec compt.
Definition at line 212 of file SpineMesh.cpp.
References spines_.
Referenced by initCinfo().
|
virtual |
|
virtual |
Implements MeshCompt.
Definition at line 408 of file SpineMesh.cpp.
References length_.
void SpineMesh::handleSpineList | ( | const Eref & | e, |
vector< Id > | shaft, | ||
vector< Id > | head, | ||
vector< unsigned int > | parentVoxel | ||
) |
Definition at line 246 of file SpineMesh.cpp.
References area_, getMeshEntryVolume(), Eref::id(), length_, ChemCompt::lookupEntry(), spines_, MeshEntry::triggerRemesh(), updateCoords(), Id::value(), and vs_.
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 508 of file SpineMesh.cpp.
References innerGetNumEntries(), and spines_.
|
static |
Definition at line 48 of file SpineMesh.cpp.
References getElecComptMap(), getEndVoxelInCompt(), getNeuronVoxel(), getParentVoxel(), getStartVoxelInCompt(), handleSpineList(), ChemCompt::initCinfo(), and spineMeshCinfo.
|
virtual |
Virtual func to make a mesh with specified Volume and numEntries.
Not allowed.
Implements ChemCompt.
Definition at line 460 of file SpineMesh.cpp.
|
virtual |
Returns # of dimensions, always 3 here. Inherited pure virt func.
Implements ChemCompt.
Definition at line 240 of file SpineMesh.cpp.
|
virtual |
Inherited virtual func. Returns number of MeshEntry in array
Implements ChemCompt.
Definition at line 443 of file SpineMesh.cpp.
References spines_.
Referenced by indexToSpace().
|
virtual |
|
virtual |
Inherited virtual func.
Inherited virtual func. Assigns number of MeshEntries. Doesn't do anything, we have to set spine # from geometry.
Implements ChemCompt.
Definition at line 452 of file SpineMesh.cpp.
void SpineMesh::matchCubeMeshEntries | ( | const ChemCompt * | other, |
vector< VoxelJunction > & | ret | ||
) | const |
Definition at line 557 of file SpineMesh.cpp.
References SpineEntry::matchCubeMeshEntriesToHead(), spines_, and surfaceGranularity_.
Referenced by matchMeshEntries().
|
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.
Implements ChemCompt.
Definition at line 486 of file SpineMesh.cpp.
References ChemCompt::flipRet(), matchCubeMeshEntries(), matchNeuroMeshEntries(), and PsdMesh::matchSpineMeshEntries().
void SpineMesh::matchNeuroMeshEntries | ( | const ChemCompt * | other, |
vector< VoxelJunction > & | ret | ||
) | const |
Definition at line 543 of file SpineMesh.cpp.
References NeuroMesh::getMeshEntryVolume(), and spines_.
Referenced by matchMeshEntries(), and NeuroMesh::matchMeshEntries().
void SpineMesh::matchSpineMeshEntries | ( | const ChemCompt * | other, |
vector< VoxelJunction > & | ret | ||
) | const |
Definition at line 538 of file SpineMesh.cpp.
|
virtual |
This works a little different from other subclass versions of the function. It finds the index of the mesh entry whose centre is closest to the specified coords, and returns the distance to the centre. Doesn't worry about whether this distance is inside or outside cell.
Implements ChemCompt.
Definition at line 516 of file SpineMesh.cpp.
References Vec::distance(), SpineEntry::mid(), and spines_.
|
virtual |
Virtual function to assign volume of mesh Entry.
Reimplemented from ChemCompt.
Definition at line 315 of file SpineMesh.cpp.
References spines_.
const vector< SpineEntry > & SpineMesh::spines | ( | ) | const |
void SpineMesh::transmitChange | ( | const Eref & | e | ) |
void SpineMesh::updateCoords | ( | ) |
Recomputes all local coordinate and meshing data following a change in any of the coord parameters
This assumes that lambda is the quantity to preserve, over numEntries. So when the compartment changes volume, numEntries changes too. Assumes that the soma node is at index 0.
Definition at line 235 of file SpineMesh.cpp.
References buildStencil().
Referenced by handleSpineList().
|
virtual |
Inherited virtual func.
Implements ChemCompt.
Definition at line 413 of file SpineMesh.cpp.
References vs_.
Referenced by vSetVolumeNotRates().
|
virtual |
Virtual func so that derived classes can return voxel midpoint.
Implements ChemCompt.
Definition at line 390 of file SpineMesh.cpp.
References spines_.
|
virtual |
Virtual func so that derived classes can pass voxel volume back.
Implements ChemCompt.
Definition at line 385 of file SpineMesh.cpp.
References vs_.
|
virtual |
Inherited virtual func.
Implements ChemCompt.
Definition at line 422 of file SpineMesh.cpp.
References area_, length_, spines_, vGetEntireVolume(), and vs_.
|
private |
Mesh junction area pre-calculations for each MeshEntry. This is the cross-section area of the middle of each voxel.
Definition at line 203 of file SpineMesh.h.
Referenced by getVoxelArea(), handleSpineList(), and vSetVolumeNotRates().
|
private |
Pre-calculation of length of each MeshEntry.
Definition at line 206 of file SpineMesh.h.
Referenced by getVoxelLength(), handleSpineList(), and vSetVolumeNotRates().
|
private |
These do the actual work.
Definition at line 183 of file SpineMesh.h.
Referenced by buildStencil(), extendedMeshEntryVolume(), getElecComptMap(), getEndVoxelInCompt(), getMeshEntryVolume(), getMeshType(), getNeuronVoxel(), getParentVoxel(), getStartVoxelInCompt(), handleSpineList(), indexToSpace(), innerGetNumEntries(), matchCubeMeshEntries(), matchNeuroMeshEntries(), nearest(), setMeshEntryVolume(), spines(), vGetVoxelMidpoint(), and vSetVolumeNotRates().
|
private |
Decides how finely to subdivide diffLength_ or radius or cubic mesh side when computing surfacearea of intersections with CubeMesh. Defaults to 0.1.
Definition at line 190 of file SpineMesh.h.
Referenced by matchCubeMeshEntries().
|
private |
Volscale pre-calculations for each MeshEntry. vs = #molecules / vol where vol is expressed in m^3.
Definition at line 197 of file SpineMesh.h.
Referenced by handleSpineList(), vGetEntireVolume(), vGetVoxelVolume(), and vSetVolumeNotRates().