00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _PSD_MESH_H
00011 #define _PSD_MESH_H
00012
00027 class PsdMesh: public MeshCompt
00028 {
00029 public:
00030 PsdMesh();
00031 PsdMesh( const PsdMesh& other );
00032 ~PsdMesh();
00033
00035
00037
00042 void updateCoords();
00043
00046 unsigned int parent( unsigned int index ) const;
00047
00049
00051
00056 double getThickness() const;
00057 void setThickness( double v );
00058
00059 vector< unsigned int > getNeuronVoxel() const;
00060 vector< Id > getElecComptMap() const;
00061
00063 vector< unsigned int > getStartVoxelInCompt() const;
00065 vector< unsigned int > getEndVoxelInCompt() const;
00066
00068
00070
00072 unsigned int getMeshType( unsigned int fid ) const;
00074 unsigned int getMeshDimensions( unsigned int fid ) const;
00076 double getMeshEntryVolume( unsigned int fid ) const;
00078 void setMeshEntryVolume( unsigned int fid, double volume );
00080 vector< double > getCoordinates( unsigned int fid ) const;
00082 vector< double > getDiffusionArea( unsigned int fid ) const;
00084 vector< double > getDiffusionScaling( unsigned int fid ) const;
00086 double extendedMeshEntryVolume( unsigned int fid ) const;
00087
00089
00092 unsigned int innerGetNumEntries() const;
00094 void innerSetNumEntries( unsigned int n );
00095
00097 unsigned int innerGetDimensions() const;
00098
00099 vector< unsigned int > getParentVoxel() const;
00100 const vector< double >& vGetVoxelVolume() const;
00101 const vector< double >& vGetVoxelMidpoint() const;
00102 const vector< double >& getVoxelArea() const;
00103 const vector< double >& getVoxelLength() const;
00104
00106 double vGetEntireVolume() const;
00107
00109 bool vSetVolumeNotRates( double volume );
00111
00113
00115 void innerBuildDefaultMesh( const Eref& e,
00116 double volume, unsigned int numEntries );
00117
00118 void innerHandleRequestMeshStats(
00119 const Eref& e,
00120 const SrcFinfo2< unsigned int, vector< double > >*
00121 meshStatsFinfo
00122 );
00123
00124 void innerHandleNodeInfo(
00125 const Eref& e,
00126 unsigned int numNodes, unsigned int numThreads );
00127
00128 void handlePsdList(
00129 const Eref& e,
00130 vector< double > params,
00131 vector< Id > elecCompts,
00132 vector< unsigned int > parentVoxel );
00133
00134 void transmitChange( const Eref& e );
00135
00136 void buildStencil();
00137
00139
00141
00142 void matchMeshEntries( const ChemCompt* other,
00143 vector< VoxelJunction > & ret ) const;
00144
00145 void matchNeuroMeshEntries( const ChemCompt* other,
00146 vector< VoxelJunction > & ret ) const;
00147
00148 void matchCubeMeshEntries( const ChemCompt* other,
00149 vector< VoxelJunction > & ret ) const;
00150
00151 void matchSpineMeshEntries( const ChemCompt* other,
00152 vector< VoxelJunction > & ret ) const;
00153
00162 double nearest( double x, double y, double z,
00163 unsigned int& index ) const;
00164
00165 void indexToSpace( unsigned int index,
00166 double& x, double& y, double& z ) const;
00167
00169 static const Cinfo* initCinfo();
00170
00171 private:
00173 double thickness_;
00174
00178 vector< CylBase > psd_;
00179 vector< CylBase > pa_;
00180 vector< double > parentDist_;
00181 vector< unsigned int > parent_;
00182 vector< Id > elecCompt_;
00183
00189 double surfaceGranularity_;
00190
00191 vector< double > vs_;
00192 vector< double > area_;
00193 vector< double > length_;
00194 };
00195
00196
00197 #endif // _PSD_MESH_H