/home/runner/work/amr-wind/amr-wind/amr-wind/utilities/tagging/GeometryRefinement.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/tagging/GeometryRefinement.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
GeometryRefinement.H
Go to the documentation of this file.
1#ifndef GEOMETRYREFINEMENT_H
2#define GEOMETRYREFINEMENT_H
3
6
7namespace amr_wind {
8namespace tagging {
9
14 : public Factory<GeometryType, const CFDSim&, const std::string&>
15{
16public:
17 static std::string base_identifier() { return "GeometryType"; }
18
19 GeometryType() = default;
20
21 ~GeometryType() override = default;
22
23 virtual void operator()(
24 const amrex::Box&,
25 const amrex::Geometry& geom,
26 const amrex::Array4<amrex::TagBox::TagType>& tags) const = 0;
27
28 virtual const amrex::RealBox& bound_box() const = 0;
29};
30
31} // namespace tagging
32
37 : public RefinementCriteria::Register<GeometryRefinement>
38{
39public:
40 static std::string identifier() { return "GeometryRefinement"; }
41
42 explicit GeometryRefinement(const CFDSim& /*sim*/);
43
44 ~GeometryRefinement() override = default;
45
47 void initialize(const std::string& key) override;
48
49 void
50 operator()(int level, amrex::TagBoxArray& tags, amrex::Real time, int ngrow)
51 override;
52
53private:
54 const CFDSim& m_sim;
55
56 amrex::Vector<std::unique_ptr<tagging::GeometryType>> m_geom_refiners;
57
61 int m_set_level{-1};
62
63 // If the user hasn't specified a particular level, act on a range of levels
65 int m_max_level{32};
66};
67
68} // namespace amr_wind
69
70#endif /* GEOMETRYREFINEMENT_H */
Definition CFDSim.H:47
Definition GeometryRefinement.H:38
~GeometryRefinement() override=default
int m_min_level
Definition GeometryRefinement.H:64
int m_set_level
Definition GeometryRefinement.H:61
const CFDSim & m_sim
Definition GeometryRefinement.H:54
int m_max_level
Definition GeometryRefinement.H:65
void operator()(int level, amrex::TagBoxArray &tags, amrex::Real time, int ngrow) override
Definition GeometryRefinement.cpp:34
static std::string identifier()
Definition GeometryRefinement.H:40
GeometryRefinement(const CFDSim &)
Definition GeometryRefinement.cpp:9
void initialize(const std::string &key) override
Read input file and initialize boxarray used to refine each level.
Definition GeometryRefinement.cpp:13
amrex::Vector< std::unique_ptr< tagging::GeometryType > > m_geom_refiners
Definition GeometryRefinement.H:56
Definition GeometryRefinement.H:15
~GeometryType() override=default
virtual void operator()(const amrex::Box &, const amrex::Geometry &geom, const amrex::Array4< amrex::TagBox::TagType > &tags) const =0
virtual const amrex::RealBox & bound_box() const =0
static std::string base_identifier()
Definition GeometryRefinement.H:17
Definition BCInterface.cpp:7
Definition Factory.H:65