/home/runner/work/amr-wind/amr-wind/amr-wind/utilities/subvolume/Subvolume.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/subvolume/Subvolume.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
Subvolume.H
Go to the documentation of this file.
1#ifndef SUBVOLUME_H
2#define SUBVOLUME_H
3
4#include <memory>
5
6#include "amr-wind/CFDSim.H"
10#include <AMReX_PlotFileUtil.H>
11
25
26namespace amr_wind::subvolume {
27
28class Subvolume : public PostProcessBase::Register<Subvolume>
29{
30public:
31 static std::string identifier() { return "Subvolume"; }
32
33 Subvolume(CFDSim& /*sim*/, std::string /*label*/);
34
35 ~Subvolume() override;
36
38 void pre_init_actions() override {}
39
41 void initialize() override;
42
44 void post_regrid_actions() override;
45
47 void output_actions() override;
48
50 void post_advance_work() override {};
51
52 [[nodiscard]] const amrex::Vector<std::string>& var_names() const
53 {
54 return m_var_names;
55 }
56
57protected:
58private:
60
61 amrex::Vector<std::unique_ptr<SubvolumeBase>> m_subvolumes;
62
64 amrex::Vector<std::string> m_var_names;
65
67 amrex::Vector<Field*> m_fields;
68
70 amrex::Vector<IntField*> m_int_fields;
71
73 std::unique_ptr<DerivedQtyMgr> m_derived_mgr;
74
80 const std::string m_label;
81
89 std::string m_label_out;
90
91 // number of field components
92 int m_ncomp{0};
93
94 // number of int field components
95 int m_nicomp{0};
96
97 // number of derived field components
98 int m_ndcomp{0};
99};
100
101} // namespace amr_wind::subvolume
102
103#endif /* SUBVOLUME_H */
Definition CFDSim.H:54
std::unique_ptr< DerivedQtyMgr > m_derived_mgr
List of derived fields to be sampled for this collection of probes.
Definition Subvolume.H:73
amrex::Vector< Field * > m_fields
List of fields to be sampled for this collection of probes.
Definition Subvolume.H:67
const amrex::Vector< std::string > & var_names() const
Definition Subvolume.H:52
Subvolume(CFDSim &, std::string)
Definition Subvolume.cpp:13
amrex::Vector< std::string > m_var_names
List of variable names for output.
Definition Subvolume.H:64
int m_ndcomp
Definition Subvolume.H:98
amrex::Vector< std::unique_ptr< SubvolumeBase > > m_subvolumes
Definition Subvolume.H:61
void post_regrid_actions() override
Do any work that needs to happen after regrid.
Definition Subvolume.cpp:124
std::string m_label_out
Definition Subvolume.H:89
int m_nicomp
Definition Subvolume.H:95
const std::string m_label
Definition Subvolume.H:80
void pre_init_actions() override
Perform actions before mesh is created.
Definition Subvolume.H:38
amrex::Vector< IntField * > m_int_fields
List of IntFields to be sampled for this collection of probes.
Definition Subvolume.H:70
void initialize() override
Read user inputs for chunks, output timing.
Definition Subvolume.cpp:21
static std::string identifier()
Definition Subvolume.H:31
void post_advance_work() override
Actions to do at end of every time step.
Definition Subvolume.H:50
void output_actions() override
Get chunks and output to disk.
Definition Subvolume.cpp:133
CFDSim & m_sim
Definition Subvolume.H:59
int m_ncomp
Definition Subvolume.H:92
Definition RectangularSubvolume.cpp:7