#include <SpineMesh.h>
Public Member Functions | |
SpineMesh () | |
SpineMesh (const SpineMesh &other) | |
~SpineMesh () | |
void | updateCoords () |
vector< unsigned int > | getParentVoxel () const |
vector< unsigned int > | getNeuronVoxel () const |
vector< Id > | getElecComptMap () const |
vector< unsigned int > | getStartVoxelInCompt () const |
Returns index of first voxel mapping to elec compt. | |
vector< unsigned int > | getEndVoxelInCompt () const |
Returns index of end voxel mapping to elec compt, just first+1. | |
unsigned int | getMeshType (unsigned int fid) const |
Virtual function to return MeshType of specified entry. | |
unsigned int | getMeshDimensions (unsigned int fid) const |
Virtual function to return dimensions of specified entry. | |
double | getMeshEntryVolume (unsigned int fid) const |
Virtual function to return volume of mesh Entry. | |
void | setMeshEntryVolume (unsigned int fid, double volume) |
Virtual function to assign volume of mesh Entry. | |
vector< double > | getCoordinates (unsigned int fid) const |
Virtual function to return coords of mesh Entry. | |
vector< double > | getDiffusionArea (unsigned int fid) const |
Virtual function to return diffusion X-section area. | |
vector< double > | getDiffusionScaling (unsigned int fid) const |
Virtual function to return scale factor for diffusion. 1 here. | |
double | extendedMeshEntryVolume (unsigned int fid) const |
Vol of all mesh Entries including abutting diff-coupled voxels. | |
unsigned int | innerGetNumEntries () const |
void | innerSetNumEntries (unsigned int n) |
Inherited virtual func. | |
unsigned int | innerGetDimensions () const |
Returns # of dimensions, always 3 here. Inherited pure virt func. | |
double | vGetEntireVolume () const |
Inherited virtual func. | |
bool | vSetVolumeNotRates (double volume) |
Inherited virtual func. | |
void | innerBuildDefaultMesh (const Eref &e, double volume, unsigned int numEntries) |
Virtual func to make a mesh with specified Volume and numEntries. | |
void | innerHandleNodeInfo (const Eref &e, unsigned int numNodes, unsigned int numThreads) |
void | handleSpineList (const Eref &e, vector< Id > shaft, vector< Id > head, vector< unsigned int > parentVoxel) |
void | transmitChange (const Eref &e) |
void | buildStencil () |
void | matchMeshEntries (const ChemCompt *other, vector< VoxelJunction > &ret) const |
void | matchNeuroMeshEntries (const ChemCompt *other, vector< VoxelJunction > &ret) const |
void | matchCubeMeshEntries (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 | indexToSpace (unsigned int index, double &x, double &y, double &z) const |
const vector< double > & | vGetVoxelVolume () const |
Virtual func so that derived classes can pass voxel volume back. | |
const vector< double > & | vGetVoxelMidpoint () const |
Virtual func so that derived classes can return voxel midpoint. | |
const vector< double > & | getVoxelArea () const |
const vector< double > & | getVoxelLength () const |
const vector< SpineEntry > & | spines () const |
Static Public Member Functions | |
static const Cinfo * | initCinfo () |
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.
SpineMesh::SpineMesh | ( | ) |
SpineMesh::SpineMesh | ( | const SpineMesh & | other | ) |
SpineMesh::~SpineMesh | ( | ) |
void SpineMesh::buildStencil | ( | ) |
References MeshCompt::innerResetStencil(), and MeshCompt::setStencilSize().
Referenced by updateCoords().
double SpineMesh::extendedMeshEntryVolume | ( | unsigned int | fid | ) | const [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.
References getMeshEntryVolume().
vector< double > SpineMesh::getCoordinates | ( | unsigned int | fid | ) | const [virtual] |
vector< double > SpineMesh::getDiffusionArea | ( | unsigned int | fid | ) | const [virtual] |
Virtual function to return diffusion X-section area.
Virtual function to return diffusion X-section area for each neighbor.
Implements ChemCompt.
vector< double > SpineMesh::getDiffusionScaling | ( | unsigned int | fid | ) | const [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.
vector< Id > SpineMesh::getElecComptMap | ( | ) | const |
Returns vector of Ids of electrical compts that map to respective voxels in SpineMesh
Referenced by initCinfo().
vector< unsigned int > SpineMesh::getEndVoxelInCompt | ( | ) | const |
Returns index of end voxel mapping to elec compt, just first+1.
Referenced by initCinfo().
unsigned int SpineMesh::getMeshDimensions | ( | unsigned int | fid | ) | const [virtual] |
Virtual function to return dimensions of specified entry.
Implements ChemCompt.
double SpineMesh::getMeshEntryVolume | ( | unsigned int | fid | ) | const [virtual] |
Virtual function to return volume of mesh Entry.
Implements ChemCompt.
Referenced by extendedMeshEntryVolume().
unsigned int SpineMesh::getMeshType | ( | unsigned int | fid | ) | const [virtual] |
vector< unsigned int > SpineMesh::getNeuronVoxel | ( | ) | const |
Returns index of voxel on NeuroMesh to which this spine is connected.
Referenced by initCinfo().
vector< unsigned int > SpineMesh::getParentVoxel | ( | ) | const [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.
Referenced by initCinfo().
vector< unsigned int > SpineMesh::getStartVoxelInCompt | ( | ) | const |
Returns index of first voxel mapping to elec compt.
Referenced by initCinfo().
const vector< double > & SpineMesh::getVoxelArea | ( | ) | const [virtual] |
Implements MeshCompt.
const vector< double > & SpineMesh::getVoxelLength | ( | ) | const [virtual] |
Implements MeshCompt.
void SpineMesh::handleSpineList | ( | const Eref & | e, | |
vector< Id > | shaft, | |||
vector< Id > | head, | |||
vector< unsigned int > | parentVoxel | |||
) |
Referenced by initCinfo().
void SpineMesh::indexToSpace | ( | unsigned int | index, | |
double & | x, | |||
double & | y, | |||
double & | z | |||
) | const [virtual] |
Converts specified index to xyz coords of middle of voxel Values out of range return original xyz
Implements ChemCompt.
References innerGetNumEntries().
const Cinfo * SpineMesh::initCinfo | ( | ) | [static] |
Reimplemented from ChemCompt.
References getElecComptMap(), getEndVoxelInCompt(), getNeuronVoxel(), getParentVoxel(), getStartVoxelInCompt(), handleSpineList(), and ChemCompt::initCinfo().
void SpineMesh::innerBuildDefaultMesh | ( | const Eref & | e, | |
double | volume, | |||
unsigned int | numEntries | |||
) | [virtual] |
Virtual func to make a mesh with specified Volume and numEntries.
Not allowed.
Implements ChemCompt.
unsigned int SpineMesh::innerGetDimensions | ( | ) | const [virtual] |
Returns # of dimensions, always 3 here. Inherited pure virt func.
Implements ChemCompt.
unsigned int SpineMesh::innerGetNumEntries | ( | ) | const [virtual] |
Inherited virtual func. Returns number of MeshEntry in array
Implements ChemCompt.
Referenced by indexToSpace().
void SpineMesh::innerHandleNodeInfo | ( | const Eref & | e, | |
unsigned int | numNodes, | |||
unsigned int | numThreads | |||
) | [virtual] |
Implements ChemCompt.
void SpineMesh::innerSetNumEntries | ( | unsigned int | n | ) | [virtual] |
Inherited virtual func.
Inherited virtual func. Assigns number of MeshEntries. Doesn't do anything, we have to set spine # from geometry.
Implements ChemCompt.
void SpineMesh::matchCubeMeshEntries | ( | const ChemCompt * | other, | |
vector< VoxelJunction > & | ret | |||
) | const |
void SpineMesh::matchMeshEntries | ( | const ChemCompt * | other, | |
vector< VoxelJunction > & | ret | |||
) | const |
void SpineMesh::matchNeuroMeshEntries | ( | const ChemCompt * | other, | |
vector< VoxelJunction > & | ret | |||
) | const |
void SpineMesh::matchSpineMeshEntries | ( | const ChemCompt * | other, | |
vector< VoxelJunction > & | ret | |||
) | const |
double SpineMesh::nearest | ( | double | x, | |
double | y, | |||
double | z, | |||
unsigned int & | index | |||
) | const [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.
References a, d, Vec::distance(), and SpineEntry::mid().
void SpineMesh::setMeshEntryVolume | ( | unsigned int | fid, | |
double | volume | |||
) | [virtual] |
Virtual function to assign volume of mesh Entry.
Reimplemented from ChemCompt.
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.
References buildStencil().
double SpineMesh::vGetEntireVolume | ( | ) | const [virtual] |
const vector< double > & SpineMesh::vGetVoxelMidpoint | ( | ) | const [virtual] |
Virtual func so that derived classes can return voxel midpoint.
Implements ChemCompt.
const vector< double > & SpineMesh::vGetVoxelVolume | ( | ) | const [virtual] |
Virtual func so that derived classes can pass voxel volume back.
Implements ChemCompt.
bool SpineMesh::vSetVolumeNotRates | ( | double | volume | ) | [virtual] |
Inherited virtual func.
Implements ChemCompt.
References vGetEntireVolume().