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"
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;
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);
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()
495#include "SerializationExportWrapper.hpp"
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * mpMesh
static std::string GetArchiveRelativePath()
void SetFixedExtracellularPotentialNodes(std::vector< unsigned > nodes)
virtual void DefineWriterColumns(bool extending)
bool mUserHasSetBidomainValuesExplicitly
void SetGgapHeterogeneities(std::vector< boost::shared_ptr< AbstractChasteRegion< DIM > > > &rGgapHeterogeneityRegions, std::vector< double > &rGgapValues)
void save(Archive &archive, const unsigned int version) const
Vec CreateInitialCondition()
unsigned mVoltageColumnId_Vm1
std::vector< double > mGgapHeterogenousValues
void WriteInfo(double time)
unsigned mApplyAveragePhieZeroConstraintAfterSolving
void SetExtendedBidomainParameters(double Am1, double Am2, double AmGap, double Cm1, double Cm2, double Ggap)
c_vector< double, DIM > mIntracellularConductivitiesSecondCell
void SetNodeForAverageOfPhiZeroed(unsigned node)
ExtendedBidomainTissue< DIM > * mpExtendedBidomainTissue
void SetIntracellularConductivitiesForSecondCell(c_vector< double, DIM > conductivities)
std::vector< signed int > mVariablesIDs
unsigned mVoltageColumnId_Vm2
unsigned mVoltageColumnId_Phie
AbstractStimulusFactory< DIM > * mpExtracellularStimulusFactory
virtual AbstractCardiacTissue< DIM > * CreateCardiacTissue()
std::vector< boost::shared_ptr< AbstractChasteRegion< DIM > > > mGgapHeterogeneityRegions
virtual void WriteOneStep(double time, Vec voltageVec)
void SetExtracellularStimulusFactory(AbstractStimulusFactory< DIM > *pFactory)
ExtendedBidomainTissue< DIM > * GetExtendedBidomainTissue()
AbstractExtendedBidomainSolver< DIM, DIM > * mpSolver
void load(Archive &archive, const unsigned int version)
void SetHasBath(bool hasBath)
bool mUserSpecifiedSecondCellConductivities
AbstractCardiacCellFactory< DIM, DIM > * mpSecondCellFactory
void ProcessExtracellularStimulus()
void AnalyseMeshForBath()
friend class boost::serialization::access
int mRowForAverageOfPhiZeroed
virtual AbstractDynamicLinearPdeSolver< DIM, DIM, 3 > * CreateSolver()
bool mUserSuppliedExtracellularStimulus
std::vector< unsigned > mFixedExtracellularPotentialNodes
static bool IsAbsolutePath(const std::string &rPath)
void GetVariableOverNodes(Vec data, const std::string &rVariableName, unsigned timestep=0)
void DefineUnlimitedDimension(const std::string &rVariableName, const std::string &rVariableUnits, unsigned estimatedLength=1)
void PutUnlimitedVariable(double value)
void DefineFixedDimension(long dimensionSize)
int DefineVariable(const std::string &rVariableName, const std::string &rVariableUnits)
virtual void EndDefineMode()
void PutStripedVector(std::vector< int > variableIDs, Vec petscVector)