Skip to content
Snippets Groups Projects
Commit f76cc3d0 authored by Laura Lindner's avatar Laura Lindner
Browse files

try again adaptive

parent 513fdeb7
No related branches found
No related tags found
1 merge request!273fixed hopefully problem with computing displacement by depending mechassamble...
Pipeline #356026 failed
......@@ -273,8 +273,8 @@ bool adaptiveSegregatedSolver::Step(IElphyAssemble &elphyAssemble, IElasticity &
elphyAssemble.ResetTime(mechAssemble.Time(), mechAssemble.LastTStep(), elphyDeltaTime);
double gammaInfNorm=elphyAssemble.InftyNormOnVertices(v_stretch(elphyValues));
int elphyStepCounter=0;
if (gammaInfNorm==0) {
while (elphyStepCounter != elphySteps && gammaInfNorm == 0.0) {
if (gammaInfNorm<=0.00001) {
while (elphyStepCounter != elphySteps && gammaInfNorm <= 0.00001) {
elphySolver->printSolverNameInStep(elphyAssemble, ongoingElphyStep);
elphySolver->Step(elphyAssemble, elphyValues);
......@@ -312,8 +312,11 @@ bool adaptiveSegregatedSolver::Step(IElphyAssemble &elphyAssemble, IElasticity &
u_displacement(mechValues) += DampExtrapolation * mechAssemble.StepSize() * dyn[0];
}*/
std::cout<<"new mechdt "<<getNewMechDeltaTime(elphyStepCounter)<<endl;
mechAssemble.ResetTime(mechAssemble.Time(), mechAssemble.LastTStep(), getNewMechDeltaTime(elphyStepCounter));
if(mechAssemble.StepSize()!=elphyDeltaTime){
vout(2)<<"new mechdt "<<getNewMechDeltaTime(elphyStepCounter)<<endl;
mechAssemble.ResetTime(mechAssemble.Time(), mechAssemble.LastTStep(), getNewMechDeltaTime(elphyStepCounter));
}
vout(2) << "Solving MechStep from " << mechAssemble.Time() << " to "
<< mechAssemble.NextTimeStep(false) << endl;
......
......@@ -210,11 +210,11 @@ def startAll():
#startJobs(lL,tL,['GS'],sdt,'theta1/',{'Mesh':'TestBiventricleSimpleExcitation_smooth','ElphyProblem':'DeformedBiventricleCoarse','EndTime':0.5, 'CrankNicolsonTheta':1.0})
def startAdaptiveTimeStep():
lL=[1]
tL=[2]
lL=[2]
tL=[0]
nL=['SI']
sdt=0.0004
startJobs(lL,tL,nL,sdt,'adaptive/',{'Mesh':'TestBiventricleSimpleExcitation_smooth','ElphyProblem':'DeformedBiventricleCoarse','EndTime':0.16,'MechDeltaTime':0.0016,'AdaptiveTimeStepForMech':'true','AdaptiveTimeStepForMech':'true'})
startJobs(lL,tL,nL,sdt,'adaptive/',{'Mesh':'TestBiventricleSimpleExcitation_smooth','ElphyProblem':'DeformedBiventricleCoarse','EndTime':0.6,'MechDeltaTime':0.0016,'AdaptiveTimeStepForMech':'true',})
def startFixedMechTimeStep():
lL=[2]
......@@ -230,8 +230,8 @@ if __name__=="__main__":
#startSI()
#startGS()
#startAll()
startFixedMechTimeStep()
#startAdaptiveTimeStep()
#startFixedMechTimeStep()
startAdaptiveTimeStep()
......
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