OGS
anonymous_namespace{TimeLoop.cpp} Namespace Reference

Functions

void updateDeactivatedSubdomains (std::vector< std::unique_ptr< ProcessLib::ProcessData > > const &per_process_data, double const t)
 
bool isOutputStep (std::vector< ProcessLib::Output > const &outputs, const int timestep, const NumLib::Time &t, const NumLib::Time &end_time)
 
void preOutputForAllProcesses (int const timestep, NumLib::Time const &t, double const dt, const NumLib::Time &end_time, std::vector< std::unique_ptr< ProcessLib::ProcessData > > const &per_process_data, std::vector< GlobalVector * > const &process_solutions, std::vector< GlobalVector * > const &process_solutions_prev, std::vector< ProcessLib::Output > const &outputs)
 

Function Documentation

◆ isOutputStep()

bool anonymous_namespace{TimeLoop.cpp}::isOutputStep ( std::vector< ProcessLib::Output > const & outputs,
const int timestep,
const NumLib::Time & t,
const NumLib::Time & end_time )

Definition at line 40 of file TimeLoop.cpp.

43{
44 if (end_time == t)
45 {
46 // the last timestep is an output step
47 return true;
48 }
49
50 return ranges::any_of(outputs, [timestep, t](auto const& output)
51 { return output.isOutputStep(timestep, t); });
52}

Referenced by preOutputForAllProcesses().

◆ preOutputForAllProcesses()

void anonymous_namespace{TimeLoop.cpp}::preOutputForAllProcesses ( int const timestep,
NumLib::Time const & t,
double const dt,
const NumLib::Time & end_time,
std::vector< std::unique_ptr< ProcessLib::ProcessData > > const & per_process_data,
std::vector< GlobalVector * > const & process_solutions,
std::vector< GlobalVector * > const & process_solutions_prev,
std::vector< ProcessLib::Output > const & outputs )

Definition at line 54 of file TimeLoop.cpp.

62{
63 if (!isOutputStep(outputs, timestep, t, end_time))
64 {
65 return;
66 }
67
68 for (auto& process_data : per_process_data)
69 {
70 auto const process_id = process_data->process_id;
71 auto& pcs = process_data->process;
72
73 pcs.preOutput(t(), dt, process_solutions, process_solutions_prev,
74 process_id);
75 }
76}
bool isOutputStep(std::vector< ProcessLib::Output > const &outputs, const int timestep, const NumLib::Time &t, const NumLib::Time &end_time)
Definition TimeLoop.cpp:40

References isOutputStep().

◆ updateDeactivatedSubdomains()

void anonymous_namespace{TimeLoop.cpp}::updateDeactivatedSubdomains ( std::vector< std::unique_ptr< ProcessLib::ProcessData > > const & per_process_data,
double const t )

Definition at line 28 of file TimeLoop.cpp.

32{
33 for (auto& process_data : per_process_data)
34 {
35 process_data->process.updateDeactivatedSubdomains(
36 t, process_data->process_id);
37 }
38}