MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
EndoMesh.h
Go to the documentation of this file.
1 /**********************************************************************
2 ** This program is part of 'MOOSE', the
3 ** Messaging Object Oriented Simulation Environment.
4 ** Copyright (C) 2011 Upinder S. Bhalla. and NCBS
5 ** It is made available under the terms of the
6 ** GNU Lesser General Public License version 2.1
7 ** See the file COPYING.LIB for the full notice.
8 **********************************************************************/
9 
10 #ifndef _ENDO_MESH_H
11 #define _ENDO_MESH_H
12 
23 class EndoMesh: public MeshCompt
24 {
25  public:
26  EndoMesh();
27  ~EndoMesh();
29  // Field assignment stuff
31  void setRpower( const Eref& e, double v );
32  double getRpower( const Eref& e ) const;
33  void setRscale( const Eref& e, double v );
34  double getRscale( const Eref& e ) const;
35  void setApower( const Eref& e, double v );
36  double getApower( const Eref& e ) const;
37  void setAscale( const Eref& e, double v );
38  double getAscale( const Eref& e ) const;
39  void setVpower( const Eref& e, double v );
40  double getVpower( const Eref& e ) const;
41  void setVscale( const Eref& e, double v );
42  double getVscale( const Eref& e ) const;
43  void setSurround( const Eref& e, ObjId v );
44  ObjId getSurround( const Eref& e ) const;
45  void setDoAxialDiffusion( const Eref& e, bool v );
46  bool getDoAxialDiffusion( const Eref& e ) const;
47 
49  // FieldElement assignment stuff for MeshEntries
51 
53  unsigned int getMeshType( unsigned int fid ) const;
55  unsigned int getMeshDimensions( unsigned int fid ) const;
56  unsigned int innerGetDimensions() const;
58  double getMeshEntryVolume( unsigned int fid ) const;
60  vector< double > getCoordinates( unsigned int fid ) const;
62  vector< double > getDiffusionArea( unsigned int fid ) const;
64  vector< double > getDiffusionScaling( unsigned int fid ) const;
66  double extendedMeshEntryVolume( unsigned int fid ) const;
67 
69 
73  unsigned int innerGetNumEntries() const;
75  void innerSetNumEntries( unsigned int n );
76 
78  vector< unsigned int > getParentVoxel() const;
79  const vector< double >& vGetVoxelVolume() const;
80  const vector< double >& vGetVoxelMidpoint() const;
81  const vector< double >& getVoxelArea() const;
82  const vector< double >& getVoxelLength() const;
83 
85  double vGetEntireVolume() const;
86 
88  bool vSetVolumeNotRates( double volume );
90  // Dest funcs
92 
94  void innerBuildDefaultMesh( const Eref& e,
95  double volume, unsigned int numEntries );
96 
98  const Eref& e,
99  const SrcFinfo2< unsigned int, vector< double > >*
100  meshStatsFinfo
101  );
102 
103  void innerHandleNodeInfo(
104  const Eref& e,
105  unsigned int numNodes, unsigned int numThreads );
106 
108  // inherited virtual funcs for Boundary
110 
111  void matchMeshEntries( const ChemCompt* other,
112  vector< VoxelJunction > & ret ) const;
113 
114  double nearest( double x, double y, double z,
115  unsigned int& index ) const;
116 
117  void indexToSpace( unsigned int index,
118  double& x, double& y, double& z ) const;
119 
121 
122  static const Cinfo* initCinfo();
123 
124  private:
132 
134 
140  double rPower_;
141  double rScale_;
142  double aPower_;
143  double aScale_;
144  double vPower_;
145  double vScale_;
146 
148 };
149 
150 #endif // _ENDO_MESH_H
unsigned int getMeshDimensions(unsigned int fid) const
Virtual function to return dimensions of specified entry.
Definition: EndoMesh.cpp:258
const MeshCompt * parent_
Definition: EndoMesh.h:131
const vector< double > & getVoxelArea() const
Definition: EndoMesh.cpp:384
void setRpower(const Eref &e, double v)
Definition: EndoMesh.cpp:161
double getRpower(const Eref &e) const
Definition: EndoMesh.cpp:166
Id insideMeshes_
Definition: EndoMesh.h:133
vector< double > getDiffusionArea(unsigned int fid) const
Virtual function to return diffusion X-section area.
Definition: EndoMesh.cpp:293
unsigned int innerGetNumEntries() const
Definition: EndoMesh.cpp:336
void indexToSpace(unsigned int index, double &x, double &y, double &z) const
Definition: EndoMesh.cpp:460
bool vSetVolumeNotRates(double volume)
Inherited virtual. Resizes len and dia of each voxel.
Definition: EndoMesh.cpp:411
Definition: ObjId.h:20
bool doAxialDiffusion_
vEndo = vScale * pow( surroundVol, vPower_)
Definition: EndoMesh.h:147
void innerHandleRequestMeshStats(const Eref &e, const SrcFinfo2< unsigned int, vector< double > > *meshStatsFinfo)
More inherited virtual funcs: request comes in for mesh stats.
Definition: EndoMesh.cpp:318
const int numEntries
Definition: proc.cpp:60
double getMeshEntryVolume(unsigned int fid) const
Virtual function to return volume of mesh Entry.
Definition: EndoMesh.cpp:269
double aPower_
rEndo = rScale * pow( surroundVol, rPower_)
Definition: EndoMesh.h:142
void innerSetNumEntries(unsigned int n)
Inherited virtual func.
Definition: EndoMesh.cpp:345
void setApower(const Eref &e, double v)
Definition: EndoMesh.cpp:181
double vScale_
vEndo = vScale * pow( surroundVol, vPower_)
Definition: EndoMesh.h:145
double getAscale(const Eref &e) const
Definition: EndoMesh.cpp:196
double getVscale(const Eref &e) const
Definition: EndoMesh.cpp:216
void innerHandleNodeInfo(const Eref &e, unsigned int numNodes, unsigned int numThreads)
Definition: EndoMesh.cpp:326
static const Cinfo * initCinfo()
Definition: EndoMesh.cpp:26
double getVpower(const Eref &e) const
Definition: EndoMesh.cpp:206
double rPower_
EndoMeshes inside. Used to update.
Definition: EndoMesh.h:140
double getRscale(const Eref &e) const
Definition: EndoMesh.cpp:176
void setVpower(const Eref &e, double v)
Definition: EndoMesh.cpp:201
void innerBuildDefaultMesh(const Eref &e, double volume, unsigned int numEntries)
Virtual func to make a mesh with specified Volume and numEntries.
Definition: EndoMesh.cpp:350
const vector< double > & vGetVoxelMidpoint() const
Virtual func so that derived classes can return voxel midpoint.
Definition: EndoMesh.cpp:379
double getApower(const Eref &e) const
Definition: EndoMesh.cpp:186
vector< unsigned int > getParentVoxel() const
Inherited virtual, do nothing for now.
Definition: EndoMesh.cpp:361
const vector< double > & vGetVoxelVolume() const
Virtual func so that derived classes can pass voxel volume back.
Definition: EndoMesh.cpp:370
double vPower_
aEndo = aScale * pow( surroundVol, aPower_)
Definition: EndoMesh.h:144
Definition: Eref.h:26
ObjId getSurround(const Eref &e) const
Definition: EndoMesh.cpp:232
void setDoAxialDiffusion(const Eref &e, bool v)
Definition: EndoMesh.cpp:237
unsigned int getMeshType(unsigned int fid) const
Virtual function to return MeshType of specified entry.
Definition: EndoMesh.cpp:252
void setAscale(const Eref &e, double v)
Definition: EndoMesh.cpp:191
void setRscale(const Eref &e, double v)
Definition: EndoMesh.cpp:171
double nearest(double x, double y, double z, unsigned int &index) const
Definition: EndoMesh.cpp:453
ObjId surround_
Definition: EndoMesh.h:130
static unsigned int numNodes
vector< double > getCoordinates(unsigned int fid) const
Virtual function to return coords of mesh Entry.
Definition: EndoMesh.cpp:277
double aScale_
aEndo = aScale * pow( surroundVol, aPower_)
Definition: EndoMesh.h:143
double extendedMeshEntryVolume(unsigned int fid) const
Volume of mesh Entry including abutting diff-coupled voxels.
Definition: EndoMesh.cpp:307
Definition: Id.h:17
unsigned int innerGetDimensions() const
Virtual function to return # of spatial dimensions of mesh.
Definition: EndoMesh.cpp:264
bool getDoAxialDiffusion(const Eref &e) const
Definition: EndoMesh.cpp:242
double vGetEntireVolume() const
Inherited virtual. Returns entire volume of compartment.
Definition: EndoMesh.cpp:402
void setSurround(const Eref &e, ObjId v)
Definition: EndoMesh.cpp:221
void matchMeshEntries(const ChemCompt *other, vector< VoxelJunction > &ret) const
Definition: EndoMesh.cpp:420
const vector< double > & getVoxelLength() const
Definition: EndoMesh.cpp:393
vector< double > getDiffusionScaling(unsigned int fid) const
Virtual function to return scale factor for diffusion. 1 here.
Definition: EndoMesh.cpp:300
double rScale_
rEndo = rScale * pow( surroundVol, rPower_)
Definition: EndoMesh.h:141
Definition: Cinfo.h:18
void setVscale(const Eref &e, double v)
Definition: EndoMesh.cpp:211