WARPXM v1.10.0
Loading...
Searching...
No Matches
wmintegrator.h
Go to the documentation of this file.
1#ifndef WMINTEGRATOR_HA_H
2#define WMINTEGRATOR_HA_H
3
4#include "diagnostic.h"
5
7
8#include <memory>
9#include <vector>
10#include <array>
11#include <numeric>
12
13namespace wxm
14{
15namespace diagnostics
16{
22{
23 // holder for child subdomain integrators
24 std::vector<std::unique_ptr<WmHostAction>> processors_;
25
26 WxMsgBase* sub_comm_;
27 int lead_rank_;
28
29 // integrators to run
30 std::vector<wxm::dfem::dg_integrator*> integrators_;
31
32 // pair of variable/component
33 typedef std::vector<std::pair<wxm::variable::distributed_variable_t*, size_t>>
34 variables_type;
35
36 // pair of distributed variable and component index
37 std::vector<variables_type> variables_;
38
39 bool add_variables(const WxCryptSet& wxc, const std::string& name);
40
41public:
42 WmIntegrator(const WmConstOpaquePtr& parent_solver);
43
44 virtual ~WmIntegrator();
45
46 bool needsDomain() const override
47 {
48 return false;
49 }
50
51 void setup(const WxCryptSet& wxc) override;
52
57
59
60 void runDiagnostic(std::vector<double>& res) override;
61
62 void typeCheck() override
63 {
64 // TODO
65 }
66};
67} // namespace diagnostics
68} // namespace wxm
69
70#endif
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
Provides an abstract interface for message based communication between different processes.
Definition: wxmsgbase.h:22
virtual std::string name() const
Get name of object.
Represents important parameters for the efficacy of a completing simulation step.
Definition: wxstepperstatus.h:19
A simulation diagnostic.
Definition: diagnostic.h:18
Integrates something over the entire domain or a subdomain (DG) Useful base class for sub-classes to ...
Definition: wmintegrator.h:22
void setup(const WxCryptSet &wxc) override
Setup object using supplied crypset.
void runDiagnostic(std::vector< double > &res) override
Run the diagnostic.
bool needsDomain() const override
Return true if this updater needs a domain to work on.
Definition: wmintegrator.h:46
real integrate()
Performs the integration.
void typeCheck() override
Check that the provided variables meet the expected variable types for this hostaction.
Definition: wmintegrator.h:62
WmIntegrator(const WmConstOpaquePtr &parent_solver)
WxStepperStatus step() override
Default is a No-op since Diagnostics should implement the runDiagnostic method.
Base namespace for everything not included in the global namespace.
Definition: field_source.h:8
#define real
Definition: wmoclunstructuredreconstruction.h:11