36#ifndef IMMERSEDBOUNDARYCELLPOPULATION_HPP_
37#define IMMERSEDBOUNDARYCELLPOPULATION_HPP_
39#include "AbstractOffLatticeCellPopulation.hpp"
40#include "ImmersedBoundaryMesh.hpp"
42#include <boost/serialization/base_object.hpp>
43#include <boost/serialization/set.hpp>
44#include <boost/serialization/vector.hpp>
47template <
unsigned DIM>
56template <
unsigned DIM>
120 friend class boost::serialization::access;
133 template <
class Archive>
134 void serialize(Archive& archive,
const unsigned int version)
136 archive& boost::serialization::base_object<AbstractOffLatticeCellPopulation<DIM> >(*this);
153 double Delta1D(
double dist,
double spacing);
186 std::vector<CellPtr>& rCells,
187 bool deleteMesh =
false,
188 bool validate =
true,
189 const std::vector<unsigned> locationIndices = std::vector<unsigned>());
395 CellPtr
AddCell(CellPtr pNewCell, CellPtr pParentCell = CellPtr());
423 void Update(
bool hasHadBirthsOrDeaths =
true);
494 double GetWidth(
const unsigned& rDimension);
546 std::string& rVariableName,
547 bool dirichletBoundaryConditionApplies =
false,
548 double dirichletBoundaryValue = 0.0);
603 c_vector<double, DIM>& rDisplacement,
624namespace serialization
629 template <
class Archive,
unsigned DIM>
630 inline void save_construct_data(
636 ar& t->DoesPopulationHaveActiveSources();
637 ar& t->GetInteractionDistance();
638 ar& t->GetReMeshFrequency();
639 ar& t->ThrowsStepSizeException();
640 ar& t->GetCellRearrangementThreshold();
647 template <
class Archive,
unsigned DIM>
648 inline void load_construct_data(
654 bool hasActiveSources =
false;
655 ar >> hasActiveSources;
656 double interactionDistance = 0.0;
657 ar >> interactionDistance;
658 unsigned int reMeshFrequency = 1;
659 ar >> reMeshFrequency;
660 bool throwStepSizeException =
false;
661 ar >> throwStepSizeException;
662 double cellRearrangementThreshold = 0.5;
663 ar >> cellRearrangementThreshold;
667 t->SetIfPopulationHasActiveSources(hasActiveSources);
668 t->SetInteractionDistance(interactionDistance);
669 t->SetReMeshFrequency(reMeshFrequency);
670 t->SetThrowsStepSizeException(
true);
671 t->SetCellRearrangementThreshold(cellRearrangementThreshold);
gcov doesn't like this file...
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
virtual void OpenWritersFiles(OutputFileHandler &rOutputFileHandler)
double GetCellRearrangementThreshold() const
bool IsCellOnBoundary(CellPtr pCell)
void SetReMeshFrequency(unsigned newFrequency)
double mCellRearrangementThreshold
unsigned RemoveDeadCells()
double Delta1D(double dist, double spacing)
double mInteractionDistance
boost::shared_ptr< AbstractImmersedBoundaryDivisionRule< DIM > > mpImmersedBoundaryDivisionRule
double GetIntrinsicSpacing() const
unsigned GetReMeshFrequency() const
virtual void AcceptCellWriter(boost::shared_ptr< AbstractCellWriter< DIM, DIM > > pCellWriter, CellPtr pCell)
unsigned mReMeshFrequency
virtual double GetCellDataItemAtPdeNode(unsigned pdeNodeIndex, std::string &rVariableName, bool dirichletBoundaryConditionApplies=false, double dirichletBoundaryValue=0.0)
void OutputCellPopulationParameters(out_stream &rParamsFile)
double GetInteractionDistance() const
virtual void AcceptPopulationEventWriter(boost::shared_ptr< AbstractCellPopulationEventWriter< DIM, DIM > > pPopulationEventWriter)
friend class TestImmersedBoundaryCellPopulation
ImmersedBoundaryMesh< DIM, DIM > & rGetMesh()
double CalculateIntrinsicCellSize()
boost::shared_ptr< AbstractImmersedBoundaryDivisionRule< DIM > > GetImmersedBoundaryDivisionRule()
unsigned GetNumElements()
ImmersedBoundaryElement< DIM - 1, DIM > * GetLamina(unsigned laminaIndex)
virtual ~ImmersedBoundaryCellPopulation()
ImmersedBoundaryElement< DIM, DIM > * GetElementCorrespondingToCell(CellPtr pCell)
unsigned AddNode(Node< DIM > *pNewNode)
bool DoesPopulationHaveActiveSources() const
bool mPopulationHasActiveSources
bool mOutputNodeRegionToVtk
ImmersedBoundaryElement< DIM, DIM > * GetElement(unsigned elementIndex)
std::set< unsigned > GetNeighbouringNodeIndices(unsigned index)
c_vector< double, DIM > GetLocationOfCellCentre(CellPtr pCell)
void Update(bool hasHadBirthsOrDeaths=true)
void SetCellRearrangementThreshold(double newThreshold)
void UpdateNodeLocations(double dt)
bool ThrowsStepSizeException() const
friend class TestImmersedBoundaryDivisionRules
bool IsCellAssociatedWithADeletedLocation(CellPtr pCell)
double GetVolumeOfCell(CellPtr pCell)
virtual void AcceptPopulationWriter(boost::shared_ptr< AbstractCellPopulationWriter< DIM, DIM > > pPopulationWriter)
virtual void AcceptPopulationCountWriter(boost::shared_ptr< AbstractCellPopulationCountWriter< DIM, DIM > > pPopulationCountWriter)
virtual bool IsPdeNodeAssociatedWithNonApoptoticCell(unsigned pdeNodeIndex)
void SetThrowsStepSizeException(bool throws)
void SetImmersedBoundaryDivisionRule(boost::shared_ptr< AbstractImmersedBoundaryDivisionRule< DIM > > pImmersedBoundaryDivisionRule)
void SetOutputNodeRegionToVtk(bool outputNodeRegionsToVtk)
virtual double GetDefaultTimeStep()
CellPtr AddCell(CellPtr pNewCell, CellPtr pParentCell=CellPtr())
virtual void WriteVtkResultsToFile(const std::string &rDirectory)
double GetDampingConstant(unsigned nodeIndex)
Node< DIM > * GetNode(unsigned index)
bool mThrowStepSizeException
std::set< unsigned > GetNeighbouringLocationIndices(CellPtr pCell)
void SetNode(unsigned index, ChastePoint< DIM > &rNewLocation)
virtual TetrahedralMesh< DIM, DIM > * GetTetrahedralMeshForPdeModifier()
ImmersedBoundaryMesh< DIM, DIM > * mpImmersedBoundaryMesh
void SetIfPopulationHasActiveSources(bool hasActiveSources)
void serialize(Archive &archive, const unsigned int version)
virtual void CheckForStepSizeException(unsigned nodeIndex, c_vector< double, DIM > &rDisplacement, double dt)
double GetWidth(const unsigned &rDimension)
void SetInteractionDistance(double newDistance)