36 #include <boost/lexical_cast.hpp> 37 #include "UblasIncludes.hpp" 38 #include "VesselSegment.hpp" 39 #include "VesselNode.hpp" 40 #include "MicrovesselSolver.hpp" 41 #include "VesselNetworkWriter.hpp" 42 #include "SolutionDependentDiscreteSource.hpp" 44 template<
unsigned DIM>
48 mpOutputFileHandler(),
49 mDiscreteContinuumSolvers(),
50 mpStructuralAdaptationSolver(),
51 mpAngiogenesisSolver(),
53 mDiscreteContinuumSolversHaveCompatibleGridIndexing(false),
54 mUpdatePdeEachSolve(true)
59 template<
unsigned DIM>
65 template<
unsigned DIM>
72 template<
unsigned DIM>
78 template<
unsigned DIM>
84 template<
unsigned DIM>
90 template<
unsigned DIM>
95 template<
unsigned DIM>
98 unsigned num_steps = SimulationTime::Instance()->GetTimeStepsElapsed();
101 std::cout <<
"ADAPT_IN****" << std::endl;
107 std::cout <<
"ADAPT_OUT****" << std::endl;
127 boost::shared_ptr<SolutionDependentDiscreteSource<DIM> > p_solution_dep_source =
129 if(p_solution_dep_source)
137 EXCEPTION(
"Solution dependent PDEs only work with compatible grids at the moment.");
174 p_network_writer->SetVesselNetwork(
mpNetwork);
175 p_network_writer->SetFileName(
177 + boost::lexical_cast<std::string>(num_steps + 1) +
".vtp");
178 p_network_writer->Write();
183 template<
unsigned DIM>
190 p_network_writer->SetVesselNetwork(
mpNetwork);
191 p_network_writer->SetFileName(
mpOutputFileHandler->GetOutputDirectoryFullPath() +
"/VesselNetwork_inc_0.vtp");
192 p_network_writer->Write();
197 while (!SimulationTime::Instance()->IsFinished())
200 SimulationTime::Instance()->IncrementTimeOneStep();
204 template<
unsigned DIM>
210 template<
unsigned DIM>
216 template<
unsigned DIM>
222 template<
unsigned DIM>
224 units::quantity<unit::length> cellReferenceLength,
225 units::quantity<unit::concentration> cellReferenceConcentration,
226 const std::string& rDirectory)
229 mpOutputFileHandler = boost::shared_ptr<OutputFileHandler>(
new OutputFileHandler(rDirectory,
false));
246 template<
unsigned DIM>
252 template<
unsigned DIM>
278 template<
unsigned DIM>
284 template<
unsigned DIM>
296 for(
unsigned idx=0; idx<labels.size(); idx++)
308 template<
unsigned DIM>
void SetVesselNetwork(boost::shared_ptr< VesselNetwork< DIM > > pNetwork)
void SetUpdatePdeEachSolve(bool doUpdate)
boost::shared_ptr< OutputFileHandler > mpOutputFileHandler
void SetAngiogenesisSolver(boost::shared_ptr< AngiogenesisSolver< DIM > > pAngiogenesisSolver)
unsigned mOutputFrequency
void SetOutputFileHandler(boost::shared_ptr< OutputFileHandler > pFileHandler)
static boost::shared_ptr< VesselNetworkWriter< DIM > > Create()
void SetSolution(std::vector< units::quantity< unit::concentration > > solution)
boost::shared_ptr< AngiogenesisSolver< DIM > > mpAngiogenesisSolver
void AddDiscreteContinuumSolver(boost::shared_ptr< AbstractDiscreteContinuumSolver< DIM > > pDiscreteContinuumSolver)
void SetStructuralAdaptationSolver(boost::shared_ptr< StructuralAdaptationSolver< DIM > > pStructuralAdaptationSolver)
void SetRegressionSolver(boost::shared_ptr< RegressionSolver< DIM > > pRegressionSolver)
std::vector< boost::shared_ptr< AbstractDiscreteContinuumSolver< DIM > > > GetDiscreteContinuumSolvers()
boost::shared_ptr< StructuralAdaptationSolver< DIM > > mpStructuralAdaptationSolver
void SetDiscreteContinuumSolversHaveCompatibleGridIndexing(bool compatibleIndexing)
static boost::shared_ptr< MicrovesselSolver > Create()
bool mDiscreteContinuumSolversHaveCompatibleGridIndexing
void SetupFromModifier(AbstractCellPopulation< DIM, DIM > &rCellPopulation, units::quantity< unit::length > cellReferenceLength, units::quantity< unit::concentration > cellReferenceConcentration, const std::string &rDirectory)
void UpdateCellData(std::vector< std::string > labels)
std::vector< boost::shared_ptr< AbstractDiscreteContinuumSolver< DIM > > > mDiscreteContinuumSolvers
boost::shared_ptr< RegressionSolver< DIM > > mpRegressionSolver
void SetOutputFrequency(unsigned frequency)
boost::shared_ptr< VesselNetwork< DIM > > mpNetwork
virtual ~MicrovesselSolver()