Alamo
|
Public Member Functions | |
Integrator () | |
virtual | ~Integrator () |
void | InitData () |
void | Restart (std::string restartfile, bool a_node=false) |
void | Evolve () |
void | SetFilename (std::string _plot_file) |
std::string | GetFilename () |
void | regrid (int lbase, Set::Scalar time, bool initial=false) override |
void | InitFromScratch (Set::Scalar time) |
template<class T , int d> | |
ALAMO_SINGLE_DEFINITION void | AddField (Set::Field< T > &new_field, BC::BC< T > *new_bc, int ncomp, int nghost, std::string name, bool writeout, bool evolving) |
template<class T > | |
ALAMO_SINGLE_DEFINITION void | RegisterGeneralFab (Set::Field< T > &new_fab, int ncomp, int nghost, bool evolving) |
template<class T > | |
ALAMO_SINGLE_DEFINITION void | RegisterGeneralFab (Set::Field< T > &new_fab, int ncomp, int nghost, std::string a_name, bool evolving) |
template<class T > | |
AMREX_ATTRIBUTE_WEAK void | RegisterGeneralFab (Set::Field< T > &new_fab, int ncomp, int nghost, bool writeout, std::string a_name, bool evolving) |
Protected Member Functions | |
virtual void | Initialize (int lev)=0 |
virtual void | Advance (int lev, amrex::Real time, amrex::Real dt)=0 |
virtual void | TagCellsForRefinement (int lev, amrex::TagBoxArray &tags, amrex::Real time, int ngrow)=0 |
virtual void | TimeStepBegin (Set::Scalar, int) |
virtual void | TimeStepComplete (Set::Scalar, int) |
virtual void | Integrate (int, Set::Scalar, int, const amrex::MFIter &, const amrex::Box &) |
virtual void | Regrid (int, Set::Scalar) |
void | RegisterNewFab (Set::Field< Set::Scalar > &new_fab, BC::BC< Set::Scalar > *new_bc, int ncomp, int nghost, std::string name, bool writeout) |
void | RegisterNewFab (Set::Field< Set::Scalar > &new_fab, int ncomp, std::string name, bool writeout) |
void | RegisterNodalFab (Set::Field< Set::Scalar > &new_fab, int ncomp, int nghost, std::string name, bool writeout) |
void | RegisterNodalFab (Set::Field< Set::Scalar > &new_fab, BC::BC< Set::Scalar > *new_bc, int ncomp, int nghost, std::string name, bool writeout) |
template<class T > | |
void | RegisterGeneralFab (Set::Field< T > &new_fab, int ncomp, int nghost, bool evolving=true) |
template<class T > | |
void | RegisterGeneralFab (Set::Field< T > &new_fab, int ncomp, int nghost, std::string a_name, bool evolving=true) |
template<class T > | |
void | RegisterGeneralFab (Set::Field< T > &new_fab, int ncomp, int nghost, bool writeout, std::string a_name, bool evolving=true) |
template<class T , int d> | |
void | AddField (Set::Field< T > &new_field, BC::BC< T > *new_bc, int ncomp, int nghost, std::string, bool writeout, bool evolving) |
void | SetFinestLevel (const int a_finestlevel) |
void | RegisterIntegratedVariable (Set::Scalar *integrated_variable, std::string name, bool extensive=true) |
void | SetTimestep (Set::Scalar _timestep) |
void | SetPlotInt (int plot_int) |
void | SetThermoInt (int a_thermo_int) |
void | SetThermoPlotInt (int a_thermo_plot_int) |
void | SetStopTime (Set::Scalar a_stop_time) |
void | IntegrateVariables (Set::Scalar cur_time, int step) |
void | WritePlotFile (bool initial=false) const |
void | WritePlotFile (std::string prefix, Set::Scalar time, int step) const |
void | WritePlotFile (Set::Scalar time, amrex::Vector< int > iter, bool initial=false, std::string prefix="") const |
Protected Attributes | |
amrex::Vector< amrex::Real > | t_new |
amrex::Vector< int > | istep |
std::string | plot_file { "plt" } |
amrex::Real | timestep = NAN |
bool | integrate_variables_before_advance = true |
bool | integrate_variables_after_advance = false |
struct { | |
int number_of_fabs = 0 | |
std::vector< Set::Field< Set::Scalar > * > fab_array | |
std::vector< int > ncomp_array | |
std::vector< int > nghost_array | |
std::vector< std::string > name_array | |
std::vector< BC::BC< Set::Scalar > * > physbc_array | |
std::vector< bool > writeout_array | |
bool any = true | |
bool all = false | |
} | node |
struct { | |
int number_of_fabs = 0 | |
std::vector< Set::Field< Set::Scalar > * > fab_array | |
std::vector< int > ncomp_array | |
std::vector< int > nghost_array | |
std::vector< std::string > name_array | |
std::vector< BC::BC< Set::Scalar > * > physbc_array | |
std::vector< bool > writeout_array | |
bool any = true | |
bool all = false | |
} | cell |
std::vector< BaseField * > | m_basefields |
std::vector< BaseField * > | m_basefields_cell |
BC::Nothing | bcnothing |
struct { | |
int interval = -1 | |
Set::Scalar dt = NAN | |
int plot_int = -1 | |
Set::Scalar plot_dt = NAN | |
int number = 0 | |
std::vector< Set::Scalar * > vars | |
std::vector< std::string > names | |
std::vector< bool > extensives | |
} | thermo |
int | regrid_int = -1 |
int | base_regrid_int = -1 |
std::string | restart_file_cell = "" |
std::string | restart_file_node = "" |
struct { | |
int on = 0 | |
std::vector< amrex::Box > box | |
} | explicitmesh |
int | abort_on_nan = true |
Private Member Functions | |
virtual void | MakeNewLevelFromScratch (int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm) override |
virtual void | MakeNewLevelFromCoarse (int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm) override |
virtual void | RemakeLevel (int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm) override |
virtual void | ClearLevel (int lev) override |
virtual void | ErrorEst (int lev, amrex::TagBoxArray &tags, amrex::Real time, int ngrow) override |
void | FillPatch (int lev, amrex::Real time, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &source_mf, amrex::MultiFab &destination_multifab, BC::BC< Set::Scalar > &physbc, int icomp) |
long | CountCells (int lev) |
void | TimeStep (int lev, amrex::Real time, int iteration) |
void | FillCoarsePatch (int lev, amrex::Real time, Set::Field< Set::Scalar > &mf, BC::BC< Set::Scalar > &physbc, int icomp, int ncomp) |
void | GetData (const int lev, const amrex::Real time, amrex::Vector< amrex::MultiFab * > &data, amrex::Vector< amrex::Real > &datatime) |
std::vector< std::string > | PlotFileName (int lev, std::string prefix="") const |
Private Attributes | |
amrex::Vector< amrex::Real > | dt |
amrex::Vector< int > | nsubsteps |
int | max_plot_level = -1 |
amrex::Vector< amrex::Real > | t_old |
int | max_step = std::numeric_limits<int>::max() |
amrex::Real | tstart = 0 |
amrex::Real | stop_time = NAN |
Definition at line 73 of file Integrator.H.
Integrator::Integrator::Integrator | ( | ) |
Constructor.
\function Integrator Does the following things:
code
Definition at line 17 of file Integrator.cpp.
|
virtual |
Does nothing – check here first if there are memory leaks.
\func ~Integrator
Definition at line 143 of file Integrator.cpp.
ALAMO_SINGLE_DEFINITION void Integrator::Integrator::AddField | ( | Set::Field< T > & | new_field, |
BC::BC< T > * | new_bc, | ||
int | ncomp, | ||
int | nghost, | ||
std::string | name, | ||
bool | writeout, | ||
bool | evolving | ||
) |
|
protected |
|
protectedpure virtual |
Perform computation.
You must override this function to inherit this class. Advance is called every time(sub)step, and implements the evolution of the system in time.
[in] | lev | [in] AMR Level |
[in] | time | [in] System time |
[in] | dt | [in] Timestep for this level |
Implemented in Integrator::Fracture, Integrator::SutureCrack, Integrator::HeatConduction, Integrator::AllenCahn, Integrator::Dendrite, Integrator::Base::Mechanics< MODEL >, Integrator::Base::Mechanics< Model::Solid::Affine::Isotropic >, Integrator::Base::Mechanics< model_type >, Integrator::Base::Mechanics< Model::Solid::Finite::NeoHookeanPredeformed >, Integrator::TopOp< MODEL >, Integrator::Flame, Integrator::CahnHilliard, and Integrator::ThermoElastic.
|
overrideprivatevirtual |
Definition at line 270 of file Integrator.cpp.
|
private |
Definition at line 330 of file Integrator.cpp.
|
overrideprivatevirtual |
Definition at line 436 of file Integrator.cpp.
Integrator::Integrator::Evolve | ( | ) |
Front-end method to start simulation.
Definition at line 965 of file Integrator.cpp.
|
private |
Fill a fab at current level with the data from one level up.
[in] | lev | [in] AMR level |
[in] | time | [in] Simulatinon time |
[in] | mf | [in] Fab to fill |
[in] | physbc | [in] BC object applying to Fab |
[in] | icomp | [in] start component |
[in] | ncomp | [in] end component (i.e. applies to components `icomp`...`ncomp`) |
Definition at line 405 of file Integrator.cpp.
|
private |
|
private |
|
inline |
Definition at line 109 of file Integrator.H.
void Integrator::Integrator::InitData | ( | ) |
Definition at line 444 of file Integrator.cpp.
|
inline |
Definition at line 117 of file Integrator.H.
|
protectedpure virtual |
Apply initial conditions.
You must override this function to inherit this class. This function is called before the simulation begins, and is where initial conditions should be applied.
[in] | lev | [in] AMR Level |
Implemented in Integrator::PhaseFieldMicrostructure< model_type >, Integrator::Mechanics< MODEL >, Integrator::Mechanics< Model::Solid::Affine::Isotropic >, Integrator::Base::Mechanics< MODEL >, Integrator::Base::Mechanics< Model::Solid::Affine::Isotropic >, Integrator::Base::Mechanics< model_type >, Integrator::Base::Mechanics< Model::Solid::Finite::NeoHookeanPredeformed >, Integrator::TopOp< MODEL >, Integrator::Flame, Integrator::CahnHilliard, Integrator::ThermoElastic, Integrator::HeatConduction, Integrator::AllenCahn, Integrator::Dendrite, Integrator::Fracture, and Integrator::SutureCrack.
|
inlineprotectedvirtual |
Perform an integration to compute integrated quantities.
This is a function that is called by Integrator
to update the variables registered in RegisterIntegratedVariable. The following variables are used:
Reimplemented in Integrator::Fracture, Integrator::SutureCrack, Integrator::Base::Mechanics< MODEL >, Integrator::Base::Mechanics< Model::Solid::Affine::Isotropic >, Integrator::Base::Mechanics< model_type >, Integrator::Base::Mechanics< Model::Solid::Finite::NeoHookeanPredeformed >, Integrator::PhaseFieldMicrostructure< model_type >, Integrator::TopOp< MODEL >, and Integrator::Flame.
Definition at line 213 of file Integrator.H.
|
protected |
Definition at line 1016 of file Integrator.cpp.
|
overrideprivatevirtual |
Wrapper to call FillCoarsePatch.
Definition at line 171 of file Integrator.cpp.
|
overrideprivatevirtual |
|
private |
Definition at line 711 of file Integrator.cpp.
ALAMO_SINGLE_DEFINITION void Integrator::Integrator::RegisterGeneralFab | ( | Set::Field< T > & | new_fab, |
int | ncomp, | ||
int | nghost, | ||
bool | evolving | ||
) |
Definition at line 462 of file Integrator.H.
|
protected |
AMREX_ATTRIBUTE_WEAK void Integrator::Integrator::RegisterGeneralFab | ( | Set::Field< T > & | new_fab, |
int | ncomp, | ||
int | nghost, | ||
bool | writeout, | ||
std::string | a_name, | ||
bool | evolving | ||
) |
Definition at line 476 of file Integrator.H.
|
protected |
ALAMO_SINGLE_DEFINITION void Integrator::Integrator::RegisterGeneralFab | ( | Set::Field< T > & | new_fab, |
int | ncomp, | ||
int | nghost, | ||
std::string | a_name, | ||
bool | evolving | ||
) |
Definition at line 469 of file Integrator.H.
|
protected |
|
protected |
Definition at line 320 of file Integrator.cpp.
|
protected |
Definition at line 292 of file Integrator.cpp.
|
protected |
Definition at line 298 of file Integrator.cpp.
|
protected |
Definition at line 304 of file Integrator.cpp.
|
protected |
Definition at line 310 of file Integrator.cpp.
|
inlineoverride |
Definition at line 111 of file Integrator.H.
|
inlineprotectedvirtual |
Reimplemented in Integrator::Mechanics< MODEL >, Integrator::Mechanics< Model::Solid::Affine::Isotropic >, and Integrator::Flame.
Definition at line 220 of file Integrator.H.
|
overrideprivatevirtual |
RESETS ALL MULTIFABS AT A GIVEN LEVEL
(OVERRIDES PURE VIRTUAL METHOD - DO NOT CHANGE)
[in] | lev | [in] AMR Level |
[in] | time | [in] Simulation time |
Definition at line 220 of file Integrator.cpp.
void Integrator::Integrator::Restart | ( | std::string | restartfile, |
bool | a_node = false |
||
) |
|
inline |
Definition at line 108 of file Integrator.H.
|
inlineprotected |
Definition at line 242 of file Integrator.H.
|
protected |
Definition at line 160 of file Integrator.cpp.
|
inlineprotected |
Definition at line 260 of file Integrator.H.
|
inlineprotected |
Definition at line 258 of file Integrator.H.
|
inlineprotected |
Definition at line 259 of file Integrator.H.
|
protected |
Definition at line 150 of file Integrator.cpp.
|
protectedpure virtual |
Tag cells where mesh refinement is needed.
You must override this function to inherit this class. Advance is called every time(sub)step, and implements the evolution of the system in time.
Implemented in Integrator::Flame, Integrator::PhaseFieldMicrostructure< model_type >, Integrator::CahnHilliard, Integrator::Base::Mechanics< MODEL >, Integrator::Base::Mechanics< Model::Solid::Affine::Isotropic >, Integrator::Base::Mechanics< model_type >, Integrator::Base::Mechanics< Model::Solid::Finite::NeoHookeanPredeformed >, Integrator::Dendrite, Integrator::HeatConduction, Integrator::AllenCahn, Integrator::Mechanics< MODEL >, Integrator::Mechanics< Model::Solid::Affine::Isotropic >, Integrator::TopOp< MODEL >, Integrator::Fracture, Integrator::SutureCrack, and Integrator::ThermoElastic.
|
private |
Definition at line 1096 of file Integrator.cpp.
|
inlineprotectedvirtual |
Run another system calculation (e.g. implicit solve) before integration step.
This function is called at the beginning of every timestep. This function can be used to complete additional global solves, e.g. a MLMG implicit solve.
Overriding is optional; the default is to do nothing.
Reimplemented in Integrator::Fracture, Integrator::SutureCrack, Integrator::Base::Mechanics< MODEL >, Integrator::Base::Mechanics< Model::Solid::Affine::Isotropic >, Integrator::Base::Mechanics< model_type >, Integrator::Base::Mechanics< Model::Solid::Finite::NeoHookeanPredeformed >, Integrator::ThermoElastic, Integrator::Flame, Integrator::CahnHilliard, and Integrator::PhaseFieldMicrostructure< model_type >.
Definition at line 189 of file Integrator.H.
|
inlineprotectedvirtual |
Run another system calculation (e.g. implicit solve) after integration step.
This function is called at the end of every timestep. This function can be used to complete additional global solves, e.g. a MLMG implicit solve.
Overriding is optional; the default is to do nothing.
Reimplemented in Integrator::Flame, Integrator::Fracture, Integrator::SutureCrack, and Integrator::PhaseFieldMicrostructure< model_type >.
Definition at line 199 of file Integrator.H.
|
protected |
Definition at line 721 of file Integrator.cpp.
|
protected |
|
protected |
Definition at line 726 of file Integrator.cpp.
|
protected |
Definition at line 374 of file Integrator.H.
bool Integrator::Integrator::all = false |
Definition at line 326 of file Integrator.H.
bool Integrator::Integrator::any = true |
Definition at line 325 of file Integrator.H.
|
protected |
Determine how often to regrid based on coarse level only (default: 0)
Definition at line 360 of file Integrator.H.
|
protected |
Definition at line 344 of file Integrator.H.
std::vector<amrex::Box> Integrator::Integrator::box |
Definition at line 367 of file Integrator.H.
struct { ... } Integrator::Integrator::cell |
|
private |
Timesteps for each level of refinement.
Definition at line 303 of file Integrator.H.
Set::Scalar Integrator::Integrator::dt = NAN |
Definition at line 349 of file Integrator.H.
struct { ... } Integrator::Integrator::explicitmesh |
std::vector<bool> Integrator::Integrator::extensives |
Definition at line 355 of file Integrator.H.
std::vector<Set::Field<Set::Scalar>*> Integrator::Integrator::fab_array |
Definition at line 319 of file Integrator.H.
|
protected |
Definition at line 314 of file Integrator.H.
|
protected |
Definition at line 313 of file Integrator.H.
int Integrator::Integrator::interval = -1 |
Definition at line 348 of file Integrator.H.
|
protected |
Keep track of where each level is.
Definition at line 263 of file Integrator.H.
|
protected |
Definition at line 341 of file Integrator.H.
|
protected |
Definition at line 342 of file Integrator.H.
|
private |
Definition at line 305 of file Integrator.H.
|
private |
Maximum allowable timestep.
Definition at line 308 of file Integrator.H.
std::vector<std::string> Integrator::Integrator::name_array |
Definition at line 322 of file Integrator.H.
std::vector<std::string> Integrator::Integrator::names |
Definition at line 354 of file Integrator.H.
std::vector<int> Integrator::Integrator::ncomp_array |
Definition at line 320 of file Integrator.H.
std::vector<int> Integrator::Integrator::nghost_array |
Definition at line 321 of file Integrator.H.
struct { ... } Integrator::Integrator::node |
|
private |
how many substeps on each level?
Definition at line 304 of file Integrator.H.
int Integrator::Integrator::number = 0 |
Definition at line 352 of file Integrator.H.
int Integrator::Integrator::number_of_fabs = 0 |
Definition at line 318 of file Integrator.H.
int Integrator::Integrator::on = 0 |
Definition at line 366 of file Integrator.H.
std::vector<BC::BC<Set::Scalar>*> Integrator::Integrator::physbc_array |
Definition at line 323 of file Integrator.H.
Set::Scalar Integrator::Integrator::plot_dt = NAN |
Definition at line 351 of file Integrator.H.
|
protected |
Plotfile name.
Definition at line 265 of file Integrator.H.
int Integrator::Integrator::plot_int = -1 |
How frequently to dump plot file (default: never)
Definition at line 350 of file Integrator.H.
|
protected |
Determine how often to regrid (default: 2)
Definition at line 359 of file Integrator.H.
|
protected |
Definition at line 362 of file Integrator.H.
|
protected |
Definition at line 363 of file Integrator.H.
|
private |
Default stop time.
Definition at line 310 of file Integrator.H.
|
protected |
Keep track of current old simulation time on each level.
Definition at line 262 of file Integrator.H.
|
private |
Keep track of current old simulation time on each level.
Definition at line 307 of file Integrator.H.
struct { ... } Integrator::Integrator::thermo |
|
protected |
Timestep for the base level of refinement.
Definition at line 301 of file Integrator.H.
|
private |
Default start time (default: 0)
Definition at line 309 of file Integrator.H.
std::vector<Set::Scalar*> Integrator::Integrator::vars |
Definition at line 353 of file Integrator.H.
std::vector<bool> Integrator::Integrator::writeout_array |
Definition at line 324 of file Integrator.H.