Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
AMReX_EB2_IndexSpace_STL.H
Go to the documentation of this file.
1#ifndef AMREX_EB2_INDEXSPACE_STL_H_
2#define AMREX_EB2_INDEXSPACE_STL_H_
3#include <AMReX_Config.H>
4
5#include <AMReX_EB2.H>
7
8#include <string>
9
16namespace amrex::EB2 {
17
20 : public IndexSpace
21{
22public:
23
42 IndexSpaceSTL (const std::string& stl_file, Real stl_scale,
43 Array<Real,3> const& stl_center, int stl_reverse_normal,
44 const Geometry& geom, int required_coarsening_level,
45 int max_coarsening_level, int ngrow,
46 bool build_coarse_level_by_coarsening,
47 bool extend_domain_face, int num_coarsen_opt,
48 bool bvh_optimization, bool support_mvmc);
49
50 IndexSpaceSTL (IndexSpaceSTL const&) = delete;
52 void operator= (IndexSpaceSTL const&) = delete;
53 void operator= (IndexSpaceSTL &&) = delete;
54
55 ~IndexSpaceSTL () override = default;
56
58 [[nodiscard]] const Level& getLevel (const Geometry& geom) const final;
60 [[nodiscard]] const Geometry& getGeometry (const Box& dom) const final;
62 [[nodiscard]] const Box& coarsestDomain () const final {
63 return m_geom.back().Domain();
64 }
66 void addFineLevels (int num_new_fine_levels) final;
68 void addRegularCoarseLevels (int num_new_coarse_levels) final;
69
71 void setShift (int direction, int ncells) override;
72
73private:
74
75 Vector<STLLevel> m_stllevel;
76 Vector<Geometry> m_geom;
77 Vector<Box> m_domain;
78 Vector<int> m_ngrow;
79};
80
81}
82
83#endif
IndexSpace that samples implicit geometry from STL meshes.
Definition AMReX_EB2_IndexSpace_STL.H:21
~IndexSpaceSTL() override=default
void operator=(IndexSpaceSTL const &)=delete
const Level & getLevel(const Geometry &geom) const final
Return the EB level that matches geom.Domain().
Definition AMReX_EB2_IndexSpace_STL.cpp:75
void setShift(int direction, int ncells) override
Apply a periodic shift (in cells) to the entire IndexSpace.
Definition AMReX_EB2_IndexSpace_STL.cpp:106
void addFineLevels(int num_new_fine_levels) final
Dynamically add a number of finer levels to the hierarchy.
Definition AMReX_EB2_IndexSpace_STL.cpp:91
const Box & coarsestDomain() const final
Domain of the coarsest EB representation.
Definition AMReX_EB2_IndexSpace_STL.H:62
IndexSpaceSTL(IndexSpaceSTL const &)=delete
IndexSpaceSTL(IndexSpaceSTL &&)=delete
void addRegularCoarseLevels(int num_new_coarse_levels) final
Prepend regular coarse levels below the existing hierarchy.
Definition AMReX_EB2_IndexSpace_STL.cpp:100
const Geometry & getGeometry(const Box &dom) const final
Return the Geometry whose domain equals dom.
Definition AMReX_EB2_IndexSpace_STL.cpp:83
Definition AMReX_EB2.H:28
Definition AMReX_EB2_Level.H:42
Rectangular problem domain geometry.
Definition AMReX_Geometry.H:74
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition AMReX_Vector.H:28
amrex_real Real
Floating Point Type for Fields.
Definition AMReX_REAL.H:79
std::array< T, N > Array
Definition AMReX_Array.H:26
Definition AMReX_FabArrayBase.H:33