36 #include "AbstractPdeModifier.hpp" 37 #include "VtkMeshWriter.hpp" 38 #include "ReplicatableVector.hpp" 39 #include "AveragedSourceEllipticPde.hpp" 40 #include "AveragedSourceParabolicPde.hpp" 42 template<
unsigned DIM>
45 bool isNeumannBoundaryCondition,
49 mpBoundaryCondition(pBoundaryCondition),
50 mIsNeumannBoundaryCondition(isNeumannBoundaryCondition),
53 mOutputGradient(false),
54 mOutputSolutionAtPdeNodes(false),
63 template<
unsigned DIM>
76 template<
unsigned DIM>
82 template<
unsigned DIM>
88 template<
unsigned DIM>
94 template<
unsigned DIM>
100 template<
unsigned DIM>
106 template<
unsigned DIM>
113 template<
unsigned DIM>
127 template<
unsigned DIM>
133 template<
unsigned DIM>
139 template<
unsigned DIM>
145 template<
unsigned DIM>
161 template<
unsigned DIM>
175 (*mpVizPdeSolutionResultsFile) << i <<
" ";
176 const c_vector<double,DIM>& r_location =
mpFeMesh->
GetNode(i)->rGetLocation();
177 for (
unsigned k=0; k<DIM; k++)
179 (*mpVizPdeSolutionResultsFile) << r_location[k] <<
" ";
184 (*mpVizPdeSolutionResultsFile) << solution_repl[i] <<
" ";
187 (*mpVizPdeSolutionResultsFile) <<
"\n";
193 std::ostringstream time_string;
199 std::vector<double> pde_solution;
202 pde_solution.push_back(solution_repl[i]);
208 delete p_vtk_mesh_writer;
213 template<
unsigned DIM>
225 template<
unsigned DIM>
231 template<
unsigned DIM>
237 template<
unsigned DIM>
243 template<
unsigned DIM>
virtual void UpdateAtEndOfOutputTimeStep(AbstractCellPopulation< DIM, DIM > &rCellPopulation)
void SetOutputGradient(bool outputGradient)
Node< SPACE_DIM > * GetNode(unsigned index) const
virtual void SetupSolve(AbstractCellPopulation< DIM, DIM > &rCellPopulation, std::string outputDirectory)
bool HasAveragedSourcePde()
static SimulationTime * Instance()
bool IsNeumannBoundaryCondition()
std::string mDependentVariableName
virtual unsigned GetNumNodes() const
unsigned GetTimeStepsElapsed() const
out_stream mpVizPdeSolutionResultsFile
virtual void OutputSimulationModifierParameters(out_stream &rParamsFile)=0
void SetDependentVariableName(const std::string &rName)
virtual void UpdateAtEndOfSolve(AbstractCellPopulation< DIM, DIM > &rCellPopulation)
void WriteFilesUsingMesh(AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, bool keepOriginalElementIndexing=true)
out_stream OpenOutputFile(const std::string &rFileName, std::ios_base::openmode mode=std::ios::out|std::ios::trunc) const
boost::shared_ptr< AbstractBoundaryCondition< DIM > > mpBoundaryCondition
std::string mOutputDirectory
void SetOutputSolutionAtPdeNodes(bool outputSolutionAtPdeNodes)
AbstractPdeModifier(boost::shared_ptr< AbstractLinearPde< DIM, DIM > > pPde=NULL, boost::shared_ptr< AbstractBoundaryCondition< DIM > > pBoundaryCondition=boost::shared_ptr< AbstractBoundaryCondition< DIM > >(), bool isNeumannBoundaryCondition=true, Vec solution=nullptr)
void OutputSimulationModifierParameters(out_stream &rParamsFile)
std::string & rGetDependentVariableName()
boost::shared_ptr< AbstractBoundaryCondition< DIM > > GetBoundaryCondition()
void SetUpSourceTermsForAveragedSourcePde(TetrahedralMesh< DIM, DIM > *pMesh, std::map< CellPtr, unsigned > *pCellPdeElementMap=nullptr)
virtual ~AbstractPdeModifier()
TetrahedralMesh< DIM, DIM > * GetFeMesh() const
bool mIsNeumannBoundaryCondition
bool mOutputSolutionAtPdeNodes
void AddPointData(std::string name, std::vector< double > data)
boost::shared_ptr< AbstractLinearPde< DIM, DIM > > GetPde()
boost::shared_ptr< AbstractLinearPde< DIM, DIM > > mpPde
TetrahedralMesh< DIM, DIM > * mpFeMesh