29 void setX0(
double v );
31 void setY0(
double v );
33 void setZ0(
double v );
36 void setX1(
double v );
38 void setY1(
double v );
40 void setZ1(
double v );
43 void setDx(
double v );
45 void setDy(
double v );
47 void setDz(
double v );
50 void setNx(
unsigned int v );
51 unsigned int getNx()
const;
52 void setNy(
unsigned int v );
53 unsigned int getNy()
const;
54 void setNz(
unsigned int v );
55 unsigned int getNz()
const;
115 const SrcFinfo2<
unsigned int, vector< double > >*
121 unsigned int numNodes,
unsigned int numThreads );
130 void buildMesh(
Id geom,
double x,
double y,
double z );
150 unsigned int neighbor(
unsigned int spaceIndex,
151 int dx,
int dy,
int dz )
const;
167 vector< VoxelJunction >& ret )
const;
174 vector< VoxelJunction >& ret )
const;
178 vector< VoxelJunction >& ret )
const;
185 vector< VoxelJunction >& ret )
const;
199 double& x,
double& y,
double& z )
const;
202 unsigned int spaceToIndex(
double x,
double y,
double z )
const;
208 double nearest(
double x,
double y,
double z,
unsigned int& index )
216 double& xmin,
double &xmax,
217 double& ymin,
double &ymax,
218 double& zmin,
double &zmax )
const;
228 const vector< unsigned int >&
surface()
const;
269 vector< pair< unsigned int, unsigned int > >& intersect,
270 double xmin,
double xmax,
271 double ymin,
double ymax,
272 double zmin,
double zmax
277 vector< VoxelJunction >& ret )
const;
280 vector< VoxelJunction >& ret )
const;
348 #endif // _CUBE_MESH_H
vector< unsigned int > surface_
void assignVoxels(vector< pair< unsigned int, unsigned int > > &intersect, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) const
vector< unsigned int > getSurface() const
unsigned int getNx() const
static const Cinfo * initCinfo()
vector< unsigned int > m2s_
of entries in z in surround volume
unsigned int getNz() const
unsigned int spaceToIndex(double x, double y, double z) const
Converts the 3-D coords to an index. EMPTY if out of range.
unsigned int nz_
of entries in y in surround volume
unsigned int neighbor(unsigned int spaceIndex, int dx, int dy, int dz) const
int compareMeshSpacing(const CubeMesh *other) const
Return 0 if spacing same, -1 if self smaller, +1 if self bigger.
void fillThreeDimSurface()
void setCoords(const Eref &e, vector< double > v)
vector< double > getCoords(const Eref &e) const
const vector< double > & getVoxelLength() const
double nearest(double x, double y, double z, unsigned int &index) const
void matchCubeMeshEntries(const CubeMesh *other, vector< VoxelJunction > &ret) const
vector< double > getDiffusionScaling(unsigned int fid) const
Virtual function to return scale factor for diffusion. 1 here.
unsigned int getNy() const
static const unsigned int ABUTY
void innerSetCoords(const vector< double > &v)
double x0_
Flag: should all voxels diffuse to any tgt?
const vector< unsigned int > & surface() const
Utility and test function to read surface.
static const unsigned int MULTI
void setSpaceToMesh(vector< unsigned int > v)
void matchCylMeshEntries(const ChemCompt *other, vector< VoxelJunction > &ret) const
bool isInsideSpheroid(double x, double y, double z) const
void innerHandleRequestMeshStats(const Eref &e, const SrcFinfo2< unsigned int, vector< double > > *meshStatsFinfo)
More inherited virtual funcs: request comes in for mesh stats.
void setNx(unsigned int v)
const vector< double > & vGetVoxelVolume() const
Virtual func so that derived classes can pass voxel volume back.
bool isInsideCuboid(double x, double y, double z) const
void matchMeshEntries(const ChemCompt *other, vector< VoxelJunction > &ret) const
unsigned int innerGetDimensions() const
vector< unsigned int > getMeshToSpace() const
void addStoich(Id stoich)
void setAlwaysDiffuse(bool v)
void setMeshToSpace(vector< unsigned int > v)
vector< unsigned int > getSpaceToMesh() const
unsigned int getMeshType(unsigned int fid) const
Virtual function to return MeshType of specified entry.
void setNz(unsigned int v)
const vector< double > & vGetVoxelMidpoint() const
Virtual func so that derived classes can return voxel midpoint.
void transmitChange(const Eref &e, double oldvol)
static const unsigned int SURFACE
void defineIntersection(const CubeMesh *other, double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax) const
Defines a cuboid volume of intersection between self and other.
vector< double > getDiffusionArea(unsigned int fid) const
Virtual function to return diffusion X-section area.
void fillTwoDimSurface()
Fills surface_ vector with spatial meshIndices for a rectangle.
bool alwaysDiffuse_
Flag: Should dx change or nx, with vol?
vector< unsigned int > s2m_
void fillSpaceToMeshLookup()
void setJunctionVol(const CubeMesh *other, vector< VoxelJunction > &ret) const
Assigns volume info for the voxel junctions.
double vGetEntireVolume() const
Virtual func to get volume of entire compartment.
void setDiffScale(const CubeMesh *other, vector< VoxelJunction > &ret) const
Assigns diffusion scaling info for the voxel junctions.
void innerHandleNodeInfo(const Eref &e, unsigned int numNodes, unsigned int numThreads)
static unsigned int numNodes
unsigned int nx_
Cuboid edge.
void indexToSpace(unsigned int index, double &x, double &y, double &z) const
Converts the integer meshIndex to spatial coords.
void innerSetNumEntries(unsigned int n)
Inherited virtual func.
bool preserveNumEntries_
Flag: Should the ends loop around mathemagically?
unsigned int ny_
of entries in x in surround volume
void innerBuildDefaultMesh(const Eref &e, double volume, unsigned int numEntries)
Virtual func to make a mesh with specified Volume and numEntries.
static const unsigned int EMPTY
double extendedMeshEntryVolume(unsigned int fid) const
Virtual function to return volume of mesh Entry, including.
vector< double > getCoordinates(unsigned int fid) const
Virtual function to return coords of mesh Entry.
static const unsigned int ABUTZ
void matchAllEntries(const CubeMesh *other, vector< VoxelJunction > &ret) const
void setNy(unsigned int v)
vector< unsigned int > getParentVoxel() const
Inherited virtual, do nothing for now.
bool vSetVolumeNotRates(double volume)
Virtual func, assigns volume, usually to single voxel.
void setPreserveNumEntries(bool v)
const vector< double > & getVoxelArea() const
bool getAlwaysDiffuse() const
static const unsigned int ABUTX
unsigned int getMeshDimensions(unsigned int fid) const
Virtual function to return dimensions of specified entry.
unsigned int numDims() const
Utility function for returning # of dimensions in mesh.
void setSurface(vector< unsigned int > v)
void buildMesh(Id geom, double x, double y, double z)
bool getPreserveNumEntries() const
unsigned int innerGetNumEntries() const
double getMeshEntryVolume(unsigned int fid) const
Virtual function to return volume of mesh Entry.