64 std::shared_ptr<BoundaryConditionsContainer<DIM,DIM,1> > p_bcc = ConstructBoundaryConditionsContainer(rCellPopulation);
66 this->UpdateCellPdeElementMap(rCellPopulation);
70 this->SetUpSourceTermsForAveragedSourcePde(this->mpFeMesh, &this->mCellPdeElementMap);
79 double current_time = p_simulation_time->
GetTime();
81 solver.
SetTimes(current_time,current_time + dt);
85 Vec previous_solution = this->mSolution;
90 this->mSolution = solver.
Solve();
92 this->UpdateCellData(rCellPopulation);
112 if (!this->mSetBcsOnBoxBoundary)
114 EXCEPTION(
"Boundary conditions cannot yet be set on the cell population boundary for a ParabolicBoxDomainPdeModifier");
118 if (this->IsNeumannBoundaryCondition())
122 elem_iter != this->mpFeMesh->GetBoundaryElementIteratorEnd();
125 p_bcc->AddNeumannBoundaryCondition(*elem_iter, this->mpBoundaryCondition.get());
132 node_iter != this->mpFeMesh->GetBoundaryNodeIteratorEnd();
135 p_bcc->AddDirichletBoundaryCondition(*node_iter, this->mpBoundaryCondition.get());
149 double initial_condition = rCellPopulation.
Begin()->GetCellData()->GetItem(this->mDependentVariableName);
152 cell_iter != rCellPopulation.
End();
155 double initial_condition_at_cell = cell_iter->GetCellData()->GetItem(this->mDependentVariableName);
157 assert(fabs(initial_condition_at_cell - initial_condition)<1e-12);
void OutputSimulationModifierParameters(out_stream &rParamsFile)
virtual void SetupSolve(AbstractCellPopulation< DIM, DIM > &rCellPopulation, std::string outputDirectory)
void SetupInitialSolutionVector(AbstractCellPopulation< DIM, DIM > &rCellPopulation)
virtual std::shared_ptr< BoundaryConditionsContainer< DIM, DIM, 1 > > ConstructBoundaryConditionsContainer(AbstractCellPopulation< DIM, DIM > &rCellPopulation)
virtual void UpdateAtEndOfTimeStep(AbstractCellPopulation< DIM, DIM > &rCellPopulation)
virtual ~ParabolicBoxDomainPdeModifier()
void OutputSimulationModifierParameters(out_stream &rParamsFile)
virtual void SetupSolve(AbstractCellPopulation< DIM, DIM > &rCellPopulation, std::string outputDirectory)
ParabolicBoxDomainPdeModifier(boost::shared_ptr< AbstractLinearPde< DIM, DIM > > pPde=boost::shared_ptr< AbstractLinearPde< DIM, DIM > >(), boost::shared_ptr< AbstractBoundaryCondition< DIM > > pBoundaryCondition=boost::shared_ptr< AbstractBoundaryCondition< DIM > >(), bool isNeumannBoundaryCondition=true, boost::shared_ptr< ChasteCuboid< DIM > > pMeshCuboid=boost::shared_ptr< ChasteCuboid< DIM > >(), double stepSize=1.0, Vec solution=nullptr)