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

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/tagging/CartBoxRefinement.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
CartBoxRefinement.H
Go to the documentation of this file.
1#ifndef CARTBOXREFINEMENT_H
2#define CARTBOXREFINEMENT_H
3
4#include <iosfwd>
5
7#include "AMReX_RealBox.H"
8#include "AMReX_Vector.H"
9
10namespace amr_wind {
11
19class CartBoxRefinement : public RefinementCriteria::Register<CartBoxRefinement>
20{
21public:
22 static std::string identifier() { return "CartBoxRefinement"; }
23
24 explicit CartBoxRefinement(CFDSim& sim);
25
26 ~CartBoxRefinement() override = default;
27
29 void initialize(const std::string& key) override;
30
31 void
32 operator()(int level, amrex::TagBoxArray& tags, amrex::Real time, int ngrow)
33 override;
34
38 void read_inputs(const amrex::AmrCore& /*mesh*/, std::istream& /*ifh*/);
39
41 const amrex::Vector<amrex::BoxArray>& boxarray_vec() const
42 {
43 return m_boxarrays;
44 }
45
46protected:
47 const amrex::AmrCore& m_mesh;
48
50 amrex::Vector<amrex::Vector<amrex::RealBox>> m_real_boxes;
51
53 amrex::Vector<amrex::BoxArray> m_boxarrays;
54
56 int m_nlevels{-1};
57};
58
59} // namespace amr_wind
60
61#endif /* CARTBOXREFINEMENT_H */
Definition CFDSim.H:47
Definition CartBoxRefinement.H:20
void read_inputs(const amrex::AmrCore &, std::istream &)
Definition CartBoxRefinement.cpp:95
amrex::Vector< amrex::BoxArray > m_boxarrays
Boxarrays for each level in AMR hierarchy.
Definition CartBoxRefinement.H:53
~CartBoxRefinement() override=default
void operator()(int level, amrex::TagBoxArray &tags, amrex::Real time, int ngrow) override
Definition CartBoxRefinement.cpp:130
int m_nlevels
Number of levels of fixed nested refinement.
Definition CartBoxRefinement.H:56
amrex::Vector< amrex::Vector< amrex::RealBox > > m_real_boxes
Domain bounding boxes where refinement is performed at each level.
Definition CartBoxRefinement.H:50
CartBoxRefinement(CFDSim &sim)
Definition CartBoxRefinement.cpp:77
void initialize(const std::string &key) override
Read input file and initialize boxarray used to refine each level.
Definition CartBoxRefinement.cpp:79
const amrex::AmrCore & m_mesh
Definition CartBoxRefinement.H:47
static std::string identifier()
Definition CartBoxRefinement.H:22
const amrex::Vector< amrex::BoxArray > & boxarray_vec() const
Vector of boxarrays that define refinement zones at each level.
Definition CartBoxRefinement.H:41
Definition BCInterface.cpp:7