37 #ifndef EXTENDEDBIDOMAINPROBLEM_HPP_
38 #define EXTENDEDBIDOMAINPROBLEM_HPP_
41 #include <boost/serialization/base_object.hpp>
44 #include <boost/shared_ptr.hpp>
45 #include <boost/serialization/shared_ptr.hpp>
47 #include "AbstractCardiacProblem.hpp"
48 #include "AbstractCardiacTissue.hpp"
49 #include "AbstractExtendedBidomainSolver.hpp"
50 #include "AbstractCardiacCellFactory.hpp"
51 #include "Electrodes.hpp"
52 #include "ExtendedBidomainTissue.hpp"
54 #include "HeartRegionCodes.hpp"
55 #include "DistributedTetrahedralMesh.hpp"
56 #include "AbstractStimulusFactory.hpp"
57 #include "ElectrodesStimulusFactory.hpp"
84 template<
unsigned DIM>
90 friend class TestArchivingExtendedBidomain;
98 template<
class Archive>
99 void save(Archive & archive,
const unsigned int version)
const
101 archive & boost::serialization::base_object<AbstractCardiacProblem<DIM, DIM, 3> >(*this);
123 for (
unsigned i = 0; i < DIM; i++)
126 archive & conductivity;
129 bool has_solution = (this->
mSolution != NULL);
130 archive & has_solution;
136 writer.DefineUnlimitedDimension(
"Time",
"msec", 1);
138 int V = writer.DefineVariable(
"V",
"mV");
139 int V_2 = writer.DefineVariable(
"V_2",
"mV");
140 int phie = writer.DefineVariable(
"Phi_e",
"mV");
141 std::vector<int> variable_ids;
142 variable_ids.push_back(V);
143 variable_ids.push_back(V_2);
144 variable_ids.push_back(phie);
145 writer.EndDefineMode();
146 writer.PutUnlimitedVariable(0.0);
149 writer.PutStripedVector(variable_ids, this->
mSolution);
159 template<
class Archive>
160 void load(Archive & archive,
const unsigned int version)
162 archive & boost::serialization::base_object<AbstractCardiacProblem<DIM, DIM, 3> >(*this);
184 for (
unsigned i = 0; i < DIM; i++)
187 archive & conductivity;
192 archive & has_solution;
196 this->
mSolution = this->
mpMesh->GetDistributedVectorFactory()->CreateVec(3);
202 Vec V = this->
mpMesh->GetDistributedVectorFactory()->CreateVec();
203 Vec V_2 = this->
mpMesh->GetDistributedVectorFactory()->CreateVec();
204 Vec phie = this->
mpMesh->GetDistributedVectorFactory()->CreateVec();
211 DistributedVector vm_first_cell_distri = this->
mpMesh->GetDistributedVectorFactory()->CreateDistributedVector(V);
212 DistributedVector vm_second_cell_distri = this->
mpMesh->GetDistributedVectorFactory()->CreateDistributedVector(V_2);
220 index != mSolution_distri.
End();
223 mSolution_V_1[index] = vm_first_cell_distri[index];
224 mSolution_V_2[index] = vm_second_cell_distri[index];
225 mSolution_phie[index] = phie_distri[index];
234 BOOST_SERIALIZATION_SPLIT_MEMBER()
498 #include "SerializationExportWrapper.hpp" // Must be last
unsigned mVoltageColumnId_Phie
void SetExtendedBidomainParameters(double Am1, double Am2, double AmGap, double Cm1, double Cm2, double Ggap)
virtual AbstractDynamicLinearPdeSolver< DIM, DIM, 3 > * CreateSolver()
void SetHasBath(bool hasBath)
virtual AbstractCardiacTissue< DIM > * CreateCardiacTissue()
AbstractStimulusFactory< DIM > * mpExtracellularStimulusFactory
ExtendedBidomainTissue< DIM > * GetExtendedBidomainTissue()
void SetExtracellularStimulusFactory(AbstractStimulusFactory< DIM > *pFactory)
void ProcessExtracellularStimulus()
static bool IsAbsolutePath(const std::string &rPath)
bool mUserSpecifiedSecondCellConductivities
int mRowForAverageOfPhiZeroed
unsigned mVoltageColumnId_Vm1
virtual void WriteOneStep(double time, Vec voltageVec)
void SetIntracellularConductivitiesForSecondCell(c_vector< double, DIM > conductivities)
bool mUserHasSetBidomainValuesExplicitly
Vec CreateInitialCondition()
void SetGgapHeterogeneities(std::vector< boost::shared_ptr< AbstractChasteRegion< DIM > > > &rGgapHeterogeneityRegions, std::vector< double > &rGgapValues)
void SetNodeForAverageOfPhiZeroed(unsigned node)
void GetVariableOverNodes(Vec data, const std::string &rVariableName, unsigned timestep=0)
friend class boost::serialization::access
bool mUserSuppliedExtracellularStimulus
virtual void DefineWriterColumns(bool extending)
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * mpMesh
AbstractExtendedBidomainSolver< DIM, DIM > * mpSolver
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
void SetFixedExtracellularPotentialNodes(std::vector< unsigned > nodes)
unsigned mVoltageColumnId_Vm2
void load(Archive &archive, const unsigned int version)
std::vector< boost::shared_ptr< AbstractChasteRegion< DIM > > > mGgapHeterogeneityRegions
void DefineFixedDimension(long dimensionSize)
std::vector< signed int > mVariablesIDs
ExtendedBidomainTissue< DIM > * mpExtendedBidomainTissue
AbstractCardiacCellFactory< DIM, DIM > * mpSecondCellFactory
void save(Archive &archive, const unsigned int version) const
void AnalyseMeshForBath()
void WriteInfo(double time)
static std::string GetArchiveRelativePath()
unsigned mApplyAveragePhieZeroConstraintAfterSolving
std::vector< double > mGgapHeterogenousValues
c_vector< double, DIM > mIntracellularConductivitiesSecondCell
std::vector< unsigned > mFixedExtracellularPotentialNodes