Skip to content
Snippets Groups Projects
Commit d660d000 authored by jonathan.froehlich's avatar jonathan.froehlich
Browse files

Added gamm coupled config

parent 1b279642
No related branches found
No related tags found
1 merge request!231Resolve "Document Code"
Pipeline #125727 canceled
Model = Coupled
CoupledModel = Segregated
#CoupledProblem = BiventricleCoarse
CoupledProblem = BiventricleCoarse
ElphyModelClass = MElphyModel
ElphyModelName = TenTusscher
......
#loadconf = electrophysiology/m++.conf;
loadconf = elasticity/m++.conf;
#loadconf = elasticity/m++.conf;
#loadconf = coupled/m++.conf;
loadconf = coupled/gamm-paper/coarse-biventricle.conf
\ No newline at end of file
......@@ -18,15 +18,15 @@ void MainCoupled::Initialize() {
}
Vector &MainCoupled::Run() {
string eModelName="";
string eModelName = "";
Config::Get("ElphyModel", eModelName);
auto elphySolver = GetElphySolver(eModelName, *tensionModel, elphyA->ExcitationData());
// Load ElphySolver from src/electrophysiology/solvers/ElphySolver.cpp
auto elphySolver = GetElphySolver(eModelName, *tensionModel, elphyA->ExcitationData());
std::string model{"Segregated"};
Config::Get("CoupledModel", model);
if (model == "TensionCellmodels") {
//MTensionSolver cellSolver(*tensionModel, *excitationData);
//MSplittingSolver eSolver(*elphyA, cellSolver);
CellModelSolver solver(*elphyA, *elphySolver);
solver.Solve(*potential, *stretch);
return *potential;
......@@ -35,9 +35,12 @@ Vector &MainCoupled::Run() {
bool prestress{false};
Config::Get("WithPrestress", prestress);
if (prestress) {
// Calculates Prestress at src/elasticity/solvers/IterativePressureSolver.cpp
CalculatePrestress(*mechA, *displacement);
}
// Initializes and runs solver at src/coupled/solvers/SegregatedSolver.cpp
SegregatedSolver solver(
std::move(elphySolver),
std::make_unique<ElastodynamicTimeIntegrator>()
......@@ -53,6 +56,7 @@ void MainCoupled::generateStartVectors() {
stretch = std::make_unique<Vector>(elphyA->GetDisc());
displacement = std::make_unique<Vector>(0.0, mechA->GetDisc());
// Gets initial value of cellmodel at src/cellmodesl/*.cpp
*potential = tensionModel->InitialValue(ELPHY);
*stretch = tensionModel->InitialValue(TENSION);
}
......@@ -83,9 +87,13 @@ Vector &MainCoupled::GetDisplacement() const {
}
void MainCoupled::initAssemble() {
// Creates Elphy Assemble at src/electrophysiology/assemble/IElphyAssemble.cpp
elphyA = CreateElphyAssemble(*coupledProblem, *tensionModel, elphyDegree);
// Creates Mech Assemble at src/elasticity/assemble/IElasticity.cpp
mechA = CreateFiniteElasticityAssemble(*coupledProblem, mechDegree, false);
// Creates Mech Assemble at src/MainCardMech.hpp
auto times = ReadTimeFromConfig("Mech");
elphyA->ResetTime(times[0], times[1], times[2]);
mechA->ResetTime(times[0], times[1], times[2]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment