MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ZombiePoolInterface.cpp
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) 2003-2010 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 #include "header.h"
10 #ifdef USE_GSL
11 #include <gsl/gsl_errno.h>
12 #include <gsl/gsl_matrix.h>
13 #include <gsl/gsl_odeiv2.h>
14 #endif
15 
16 #include "VoxelPoolsBase.h"
17 // #include "VoxelPools.h"
18 #include "../mesh/VoxelJunction.h"
19 #include "XferInfo.h"
20 #include "ZombiePoolInterface.h"
21 
22 #include "RateTerm.h"
23 #include "FuncTerm.h"
24 #include "SparseMatrix.h"
25 #include "KinSparseMatrix.h"
26 #include "Stoich.h"
27 #include "../shell/Shell.h"
28 #include "../mesh/MeshEntry.h"
29 #include "../mesh/Boundary.h"
30 #include "../mesh/ChemCompt.h"
31 
33  : stoich_(), compartment_(),
34  isBuilt_( false )
35 {;}
36 
38 {;}
40 {;}
41 
43 
45 {
46  return compartment_;
47 }
48 
50 {
51  isBuilt_ = false; // We will have to now rebuild the whole thing.
52  if ( compt.element()->cinfo()->isA( "ChemCompt" ) ) {
53  compartment_ = compt;
54  vector< double > vols =
55  Field< vector < double > >::get( compt, "voxelVolume" );
56  if ( vols.size() > 0 ) {
57  setNumAllVoxels( vols.size() );
58  for ( unsigned int i = 0; i < vols.size(); ++i ) {
59  pools(i)->setVolume( vols[i] );
60  }
61  }
62  }
63 }
Element * element() const
Synonym for Id::operator()()
Definition: Id.cpp:113
virtual void setNumAllVoxels(unsigned int numVoxels)=0
Assign number of voxels (size of pools_ vector )
Definition: SetGet.h:236
virtual void updateJunctions(double dt)
Used for telling Dsolver to handle all ops across Junctions.
virtual void setCompartment(Id compartment)
Assigns compartment.
virtual VoxelPoolsBase * pools(unsigned int i)=0
Return a pointer to the specified VoxelPool.
bool isBuilt_
Flag: True when solver setup has been completed.
bool isA(const string &ancestor) const
Definition: Cinfo.cpp:280
virtual void setPrev()
Used to tell Dsolver to assign 'prev' values.
const Cinfo * cinfo() const
Definition: Element.cpp:66
void setVolume(double vol)
Just assigns the volume without any cascading to other values.
Id compartment_
Id of Chem compartment used to figure out volumes of voxels.
Definition: Id.h:17