WARPXM v1.10.0
Loading...
Searching...
No Matches
wmpatchprocess.h
Go to the documentation of this file.
1#ifndef __wmpatchedprocessingobject__h__
2#define __wmpatchedprocessingobject__h__
3
4// STL includes
5#include <vector>
6#include <iostream>
7#include <limits>
8
9// WarpM includes
11
14
26{
27public:
30 _patch(NULL),
31 _suggested_dt(std::numeric_limits<WxStepper::time_t>::max())
32 {
33 }
34
35 virtual ~WmPatchProcess() = default;
36
37 void step();
38
39 virtual void process() = 0;
40
41 void setPatch(const WmUnstructuredPatch* patch)
42 {
43 _patch = patch;
44 }
45
47
48 virtual std::string name(std::string prefix="patchedProcessor.") const
49 {
50 return prefix + _ppName;
51 }
52
53 virtual void setup(const WxCryptSet& wxc);
54
55 void setParentSolver(const WmSolverBase* solver)
56 {
57 _parentSolver = solver;
58 }
59
61 {
62 _dt = dt;
63 }
65 {
66 _time = time;
67 }
68
70 {
71 return _suggested_dt;
72 }
73
75 {
76 return *_patch;
77 }
78 const WmSolver& get_solver() const
79 {
80 return dynamic_cast<const WmSolver&>(*_parentSolver);
81 }
82
83protected:
84 std::string _ppName;
85
88
89 std::vector<std::string> _onSubdomains;
90
94
96 const WmSolverBase* _parentSolver = nullptr;
97};
98
101#endif // __wmpatchedprocessingobject__h__
The WmPatchProcess class is a base class for processes that are broken up onto separate sections of t...
Definition: wmpatchprocess.h:26
WxStepper::time_t _suggested_dt
Definition: wmpatchprocess.h:93
WxStepper::time_t _dt
Definition: wmpatchprocess.h:92
const WmUnstructuredPatch & get_patch() const
Definition: wmpatchprocess.h:74
std::vector< std::string > _onSubdomains
Definition: wmpatchprocess.h:89
WmPatchProcessor * _parentTaskProcessor
Definition: wmpatchprocess.h:86
const WmSolverBase * _parentSolver
Definition: wmpatchprocess.h:96
virtual std::string name(std::string prefix="patchedProcessor.") const
Definition: wmpatchprocess.h:48
void setDt(WxStepper::time_t dt)
Definition: wmpatchprocess.h:60
WmPatchProcess()
Definition: wmpatchprocess.h:28
virtual ~WmPatchProcess()=default
std::string _ppName
Definition: wmpatchprocess.h:84
WxLogStream _debStrm
Definition: wmpatchprocess.h:95
const WmSolver & get_solver() const
Definition: wmpatchprocess.h:78
void setParentSolver(const WmSolverBase *solver)
Definition: wmpatchprocess.h:55
virtual void setup(const WxCryptSet &wxc)
void setParentTaskProcessor(WmPatchProcessor *taskProcessor)
virtual void process()=0
WxStepper::time_t getSuggestedDt() const
Definition: wmpatchprocess.h:69
const WmUnstructuredPatch * _patch
Definition: wmpatchprocess.h:87
void setPatch(const WmUnstructuredPatch *patch)
Definition: wmpatchprocess.h:41
WxStepper::time_t _time
Definition: wmpatchprocess.h:91
void setTime(WxStepper::time_t time)
Definition: wmpatchprocess.h:64
The WmPatchProcessor class is used to manage taskes run on patches of a domain.
Definition: wmpatchprocessor.h:24
A base class for solvers in WARPM.
Definition: wmsolverbase.h:35
Provides many vital functionality to building and executing a sequence of simulation code.
Definition: wmsolver.h:36
Definition: wmunstructuredpatch.h:22
WxCryptSet extends WxCrypt by providing, in addition to name-value pairs, an set of named WxCryptSets...
Definition: wxcryptset.h:35
Provides interface to streaming iostreams to logs.
Definition: wxlogstream.h:19
static WxLogger * get(const std::string &nm)
Returns a logger with a given name.
Definition: wxlogger.h:38
WxLogStream getDebugStream()
Return stream to log debug messages.
Base class for objects which can be advanced in time.
Definition: wxstepper.h:26
real time_t
Time scalar data type.
Definition: wxstepper.h:31