MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <CylBase.h>
Public Member Functions | |
CylBase (double x, double y, double z, double dia, double length, unsigned int numDivs) | |
CylBase () | |
vector< double > | getCoordinates (const CylBase &parent, unsigned int entry) const |
double | getDia () const |
double | getDiffusionArea (const CylBase &parent, unsigned int index) const |
bool | getIsCylinder () const |
double | getLength () const |
double | getMiddleArea (const CylBase &parent, unsigned int index) const |
Return cross-section area of middle of specified voxel. More... | |
unsigned int | getNumDivs () const |
double | getVoxelLength () const |
Return length of voxel. All are equal. More... | |
double | getX () const |
double | getY () const |
double | getZ () const |
void | matchCubeMeshEntries (const ChemCompt *other, const CylBase &parent, unsigned int startIndex, double granularity, vector< VoxelJunction > &ret, bool useCylinderCurve, bool useCylinderCap) const |
double | nearest (double x, double y, double z, const CylBase &parent, double &linePos, double &r) const |
double | nearest (double x, double y, double z, const CylBase &parent, unsigned int &index) const |
double | selectGridSize (double h, double dia1, double granularity) const |
void | setDia (double v) |
void | setIsCylinder (bool v) |
void | setLength (double v) |
void | setNumDivs (unsigned int v) |
void | setX (double v) |
void | setY (double v) |
void | setZ (double v) |
double | volume (const CylBase &parent) const |
Returns vol of current node. Usually needs to refer to parent. More... | |
double | voxelVolume (const CylBase &parent, unsigned int fid) const |
Private Attributes | |
double | dia_ |
bool | isCylinder_ |
Number of subdivisions of cylinder. More... | |
double | length_ |
Diameter of node end. More... | |
unsigned int | numDivs_ |
Length of compartment. More... | |
double | x_ |
end of the node. The start is given by parent coords. More... | |
double | y_ |
double | z_ |
CylBase::CylBase | ( | double | x, |
double | y, | ||
double | z, | ||
double | dia, | ||
double | length, | ||
unsigned int | numDivs | ||
) |
Definition at line 26 of file CylBase.cpp.
CylBase::CylBase | ( | ) |
Definition at line 40 of file CylBase.cpp.
vector< double > CylBase::getCoordinates | ( | const CylBase & | parent, |
unsigned int | fid | ||
) | const |
Returns a vector with the coordinates of the specified MeshEntry. The MeshEntry (entry argument) is a voxel within this CylBase, 'entry' is indexed from 0 to numDivs. The parent is the parent CylBase with its own set of coords. The function does interpolation from the ends of the Node. These are detailed coordinates representative of the shape of the MeshEntry. For cylinders it is x1y1z1 x2y2z2 r0 r1 phi0 phi1 For spheres it is xyzdia.
Virtual function to return coords of mesh Entry. For Cylindrical mesh, coords are x1y1z1 x2y2z2 r0 r1 phi0 phi1
Definition at line 172 of file CylBase.cpp.
References dia_, numDivs_, x_, y_, and z_.
Referenced by NeuroMesh::vGetVoxelMidpoint().
double CylBase::getDia | ( | ) | const |
Definition at line 88 of file CylBase.cpp.
References dia_.
Referenced by NeuroNode::findStartNode(), SpineEntry::psdCoords(), SpineEntry::rootArea(), SpineEntry::setVolume(), and NeuroMesh::vSetVolumeNotRates().
double CylBase::getDiffusionArea | ( | const CylBase & | parent, |
unsigned int | fid | ||
) | const |
Returns diffusion cross-section from specified index to next. For index 0, this is cross-section to parent. For index numDivs-1, it is the cross-section from the second-last to the last voxel in this CylBase. Thus there is no valid value for (index == numDivs - 1), it has to be computed external to the CylBase, typically by calling the getDiffusionArea for the child CylBase.
Returns diffusion cross-section from specified index to previous. For index 0, this is cross-section area of parent. For index numDivs-1, it is the cross-section from the second-last to the last voxel in this CylBase. For index numDivs it is the area of this CylBase. Thus there is no valid value for (index > numDivs), it has to be computed external to the CylBase, typically by calling the getDiffusionArea for the child CylBase.
Definition at line 210 of file CylBase.cpp.
References dia_, isCylinder_, numDivs_, and PI.
Referenced by NeuroMesh::getAdx().
bool CylBase::getIsCylinder | ( | ) | const |
double CylBase::getLength | ( | ) | const |
Definition at line 98 of file CylBase.cpp.
References length_.
Referenced by NeuroNode::calculateLength(), SpineEntry::diffusionLength(), NeuroMesh::getAdx(), SpineEntry::setVolume(), and NeuroMesh::vSetVolumeNotRates().
double CylBase::getMiddleArea | ( | const CylBase & | parent, |
unsigned int | index | ||
) | const |
Return cross-section area of middle of specified voxel.
Return the cross section area of the middle of the specified voxel.
Definition at line 223 of file CylBase.cpp.
References dia_, isCylinder_, numDivs_, and PI.
Referenced by NeuroMesh::updateCoords().
unsigned int CylBase::getNumDivs | ( | ) | const |
Definition at line 108 of file CylBase.cpp.
References numDivs_.
Referenced by NeuroMesh::getAdx(), NeuroMesh::indexToSpace(), NeuroNode::isDummyNode(), NeuroMesh::nearest(), NeuroMesh::updateCoords(), and NeuroMesh::vGetVoxelMidpoint().
double CylBase::getVoxelLength | ( | ) | const |
Return length of voxel. All are equal.
Definition at line 235 of file CylBase.cpp.
References length_, and numDivs_.
Referenced by NeuroMesh::updateCoords().
double CylBase::getX | ( | ) | const |
Definition at line 58 of file CylBase.cpp.
References x_.
Referenced by NeuroNode::calculateLength(), NeuroMesh::indexToSpace(), SpineEntry::mid(), SpineEntry::positionShaftBase(), SpineEntry::psdCoords(), SpineEntry::setVolume(), and NeuroMesh::updateShaftParents().
double CylBase::getY | ( | ) | const |
Definition at line 68 of file CylBase.cpp.
References y_.
Referenced by NeuroNode::calculateLength(), NeuroMesh::indexToSpace(), SpineEntry::mid(), SpineEntry::positionShaftBase(), SpineEntry::psdCoords(), SpineEntry::setVolume(), and NeuroMesh::updateShaftParents().
double CylBase::getZ | ( | ) | const |
Definition at line 78 of file CylBase.cpp.
References z_.
Referenced by NeuroNode::calculateLength(), NeuroMesh::indexToSpace(), SpineEntry::mid(), SpineEntry::positionShaftBase(), SpineEntry::psdCoords(), SpineEntry::setVolume(), and NeuroMesh::updateShaftParents().
void CylBase::matchCubeMeshEntries | ( | const ChemCompt * | other, |
const CylBase & | parent, | ||
unsigned int | startIndex, | ||
double | granularity, | ||
vector< VoxelJunction > & | ret, | ||
bool | useCylinderCurve, | ||
bool | useCylinderCap | ||
) | const |
Definition at line 320 of file CylBase.cpp.
References Vec::a0(), Vec::a1(), Vec::a2(), dia_, EPSILON, fillPointsOnCircle(), fillPointsOnDisc(), CubeMesh::getDx(), ChemCompt::getNumEntries(), isCylinder_, length_, numDivs_, Vec::orthogonalAxes(), selectGridSize(), x_, y_, and z_.
Referenced by SpineEntry::matchCubeMeshEntries(), PsdMesh::matchCubeMeshEntries(), NeuroMesh::matchCubeMeshEntries(), SpineEntry::matchCubeMeshEntriesToHead(), and SpineEntry::matchCubeMeshEntriesToPSD().
double CylBase::nearest | ( | double | x, |
double | y, | ||
double | z, | ||
const CylBase & | parent, | ||
double & | linePos, | ||
double & | r | ||
) | const |
Definition at line 378 of file CylBase.cpp.
References dia_, Vec::distance(), EPSILON, numDivs_, Vec::pointOnLine(), x_, y_, and z_.
Referenced by nearest(), NeuroMesh::nearest(), and NeuroMesh::updateShaftParents().
double CylBase::nearest | ( | double | x, |
double | y, | ||
double | z, | ||
const CylBase & | parent, | ||
unsigned int & | index | ||
) | const |
Definition at line 414 of file CylBase.cpp.
References nearest(), and numDivs_.
double CylBase::selectGridSize | ( | double | h, |
double | dia1, | ||
double | granularity | ||
) | const |
Utility commands for building interface to cube mesh
Definition at line 242 of file CylBase.cpp.
References dia_, length_, and numDivs_.
Referenced by matchCubeMeshEntries().
void CylBase::setDia | ( | double | v | ) |
Definition at line 83 of file CylBase.cpp.
References dia_.
Referenced by NeuroNode::NeuroNode(), SpineEntry::setVolume(), SpineEntry::SpineEntry(), and NeuroMesh::vSetVolumeNotRates().
void CylBase::setIsCylinder | ( | bool | v | ) |
Definition at line 113 of file CylBase.cpp.
References isCylinder_.
Referenced by NeuroMesh::insertSingleDummy(), and SpineEntry::SpineEntry().
void CylBase::setLength | ( | double | v | ) |
Definition at line 93 of file CylBase.cpp.
References length_.
Referenced by NeuroNode::calculateLength(), NeuroNode::NeuroNode(), SpineEntry::setVolume(), SpineEntry::SpineEntry(), and NeuroMesh::vSetVolumeNotRates().
void CylBase::setNumDivs | ( | unsigned int | v | ) |
Definition at line 103 of file CylBase.cpp.
References numDivs_.
Referenced by NeuroMesh::insertSingleDummy(), and SpineEntry::SpineEntry().
void CylBase::setX | ( | double | v | ) |
Definition at line 53 of file CylBase.cpp.
References x_.
Referenced by NeuroMesh::insertSingleDummy(), NeuroNode::NeuroNode(), SpineEntry::positionShaftBase(), SpineEntry::setVolume(), and SpineEntry::SpineEntry().
void CylBase::setY | ( | double | v | ) |
Definition at line 63 of file CylBase.cpp.
References y_.
Referenced by NeuroMesh::insertSingleDummy(), NeuroNode::NeuroNode(), SpineEntry::positionShaftBase(), SpineEntry::setVolume(), and SpineEntry::SpineEntry().
void CylBase::setZ | ( | double | v | ) |
Definition at line 73 of file CylBase.cpp.
References z_.
Referenced by NeuroMesh::insertSingleDummy(), NeuroNode::NeuroNode(), SpineEntry::positionShaftBase(), SpineEntry::setVolume(), and SpineEntry::SpineEntry().
double CylBase::volume | ( | const CylBase & | parent | ) | const |
Returns vol of current node. Usually needs to refer to parent.
The entire volume for a truncated cone is given by: V = 1/3 pi.length.(r0^2 + r0.r1 + r1^2) where the length is the length of the cone r0 is radius at base r1 is radius at top. Note that this converges to volume of a cone if r0 or r1 is zero, and to the volume of a cylinder if r0 == r1.
Definition at line 135 of file CylBase.cpp.
References dia_, isCylinder_, length_, and PI.
Referenced by SpineEntry::setVolume(), SpineEntry::volume(), and NeuroMesh::vSetVolumeNotRates().
double CylBase::voxelVolume | ( | const CylBase & | parent, |
unsigned int | fid | ||
) | const |
Returns volume of specified voxel (MeshEntry)
Returns volume of MeshEntry. This isn't the best subdivision of the cylinder from the viewpoint of keeping the length constants all the same for different volumes. Ideally the thinner segments should have a smaller length. But this is simple and so is the diffusion calculation, so leave it. Easy to fine-tune later by modifying how one computes frac0 and frac1.
Definition at line 152 of file CylBase.cpp.
References dia_, isCylinder_, length_, numDivs_, PI, and s0.
Referenced by NeuroMesh::updateCoords().
|
private |
Definition at line 107 of file CylBase.h.
Referenced by getCoordinates(), getDia(), getDiffusionArea(), getMiddleArea(), matchCubeMeshEntries(), nearest(), selectGridSize(), setDia(), volume(), and voxelVolume().
|
private |
Number of subdivisions of cylinder.
Definition at line 110 of file CylBase.h.
Referenced by getDiffusionArea(), getIsCylinder(), getMiddleArea(), matchCubeMeshEntries(), setIsCylinder(), volume(), and voxelVolume().
|
private |
Diameter of node end.
Definition at line 108 of file CylBase.h.
Referenced by getLength(), getVoxelLength(), matchCubeMeshEntries(), selectGridSize(), setLength(), volume(), and voxelVolume().
|
private |
Length of compartment.
Definition at line 109 of file CylBase.h.
Referenced by getCoordinates(), getDiffusionArea(), getMiddleArea(), getNumDivs(), getVoxelLength(), matchCubeMeshEntries(), nearest(), selectGridSize(), setNumDivs(), and voxelVolume().
|
private |
end of the node. The start is given by parent coords.
Definition at line 103 of file CylBase.h.
Referenced by getCoordinates(), getX(), matchCubeMeshEntries(), nearest(), and setX().
|
private |
Definition at line 104 of file CylBase.h.
Referenced by getCoordinates(), getY(), matchCubeMeshEntries(), nearest(), and setY().
|
private |
Definition at line 105 of file CylBase.h.
Referenced by getCoordinates(), getZ(), matchCubeMeshEntries(), nearest(), and setZ().