WARPXM v1.10.0
Loading...
Searching...
No Matches
integrating_controller.h
Go to the documentation of this file.
1#ifndef WXM_INTEGRATOR_CONTROLLER_H
2#define WXM_INTEGRATOR_CONTROLLER_H
3
5#include "time_stepper_base.h"
6
8
10
11#include <memory>
12#include <vector>
13#include <array>
14#include <numeric>
15
16namespace wxm
17{
18namespace dt_calc
19{
21{
22 // holder for child subdomain integrators
23 std::vector<std::unique_ptr<WmHostAction>> _processors;
24
25 // integrators to run to compute the error estimate
26 std::vector<wxm::dfem::dg_integrator*> _integrators;
27
28 // pair of variable/component
29 typedef std::vector<std::pair<wxm::variable::distributed_variable_t*, size_t>>
30 variables_type;
31
32 // pair of distributed variable and component index
33 std::vector<variables_type> _variables;
34
35 bool add_variables(const WxCryptSet& wxc, const std::string& name);
36
37public:
41 double max_dt;
45 double max_growth;
46
50 double kappa;
51
56 double error_tol;
57
61 double max_error;
62
69 double alpha;
70
76
78 : time_stepper_base(parent_solver)
79 {
80 }
81
82 void setup(const WxCryptSet& wxc) override;
83
84 bool allow_retry() const override
85 {
86 return true;
87 }
88
90};
91} // namespace dt_calc
92} // namespace wxm
93
94#endif
Encapsulates information necessary to communicate and explain a decision about what timestep should b...
Definition: timestep_decision.h:16
Opaque Pointer object that carries the referenced data type, but does not expose this payload type as...
Definition: wmopaqueptr.h:81
WxCryptSet extends WxCrypt by providing, in addition to name-value pairs, an set of named WxCryptSets...
Definition: wxcryptset.h:35
virtual std::string name() const
Get name of object.
Represents important parameters for the efficacy of a completing simulation step.
Definition: wxstepperstatus.h:19
Definition: integrating_controller.h:21
double max_growth
Maximum amount the timestep is allowed to grow in a single timestep.
Definition: integrating_controller.h:45
integrating_controller(const WmConstOpaquePtr &parent_solver)
Definition: integrating_controller.h:77
double max_dt
Maximum timestep allowed.
Definition: integrating_controller.h:41
double max_error
What max error value is allowed before the controller forces a retry.
Definition: integrating_controller.h:61
double error_tol
what error tolerance level is acceptable.
Definition: integrating_controller.h:56
double kappa
I-controller parameter; typically should be 0.9.
Definition: integrating_controller.h:50
bool allow_retry() const override
Definition: integrating_controller.h:84
bool stability_limit
True if the controller should take the minimum of the error-based timestep and stability timestep.
Definition: integrating_controller.h:75
double alpha
I-controller parameter: , where is the integral constant and is the order of accuracy of the tempor...
Definition: integrating_controller.h:69
void setup(const WxCryptSet &wxc) override
Setup object using supplied crypset.
TimestepDecision test_dt(const WxStepperStatus &stab) override
Test whether the provided step status is acceptable, and recommend a timestep to take.
Definition: time_stepper_base.h:12
str dt_calc
Definition: diffusion2d.py:37
Base namespace for everything not included in the global namespace.
Definition: field_source.h:8