-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathevolveStage.cpp
More file actions
43 lines (37 loc) · 1.31 KB
/
evolveStage.cpp
File metadata and controls
43 lines (37 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// ***********************************************************************************
// Idefix MHD astrophysical code
// Copyright(C) Geoffroy R. J. Lesur <[email protected]>
// and other code contributors
// Licensed under CeCILL 2.1 License, see COPYING for more information
// ***********************************************************************************
#include "../idefix.hpp"
#include "dataBlock.hpp"
#include "fluid.hpp"
// Evolve one step forward in time of hydro
void DataBlock::EvolveStage() {
idfx::pushRegion("DataBlock::EvolveStage");
hydro->EvolveStage(this->t,this->dt);
if(haveDust) {
for(int i = 0 ; i < dust.size() ; i++) {
dust[i]->EvolveStage(this->t,this->dt);
}
// Add implicit term for dust drag
if(dust[0]->drag->IsImplicit()) {
for(int i = 0 ; i < dust.size() ; i++) {
dust[i]->drag->AddImplicitBackReaction(this->dt,dust[0]->drag->implicitFactor);
}
dust[0]->drag->NormalizeImplicitBackReaction(this->dt);
for(int i = 0 ; i < dust.size() ; i++) {
dust[i]->drag->AddImplicitFluidMomentum(this->dt);
}
}
}
idfx::popRegion();
}
void DataBlock::EvolveRKLStage() {
idfx::pushRegion("DataBlock::EvolveRKLStage");
if(hydro->haveRKLParabolicTerms) {
hydro->rkl->Cycle();
}
idfx::popRegion();
}