chombo-discharge
Loading...
Searching...
No Matches
CD_ComputationalGeometry.H
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
12
13#ifndef CD_COMPUTATIONALGEOMETRY_H
14#define CD_COMPUTATIONALGEOMETRY_H
15
16// Std includes
17#include <memory>
18#include <string>
19#include <utility>
20#include <vector>
21
22// EBGeometry includes
23#include <EBGeometry.hpp>
24
25// Chombo includes
26#include <BaseIF.H>
27#include <GeometryService.H>
28#include <MFIndexSpace.H>
29#include <Box.H>
30#include <RealVect.H>
31#include <ProblemDomain.H>
32
33// Our includes
34#include <CD_Dielectric.H>
35#include <CD_Electrode.H>
37#include <CD_RealBox.H>
38#include <CD_NamespaceHeader.H>
39
41
51{
52public:
56 static constexpr int K = 4;
57
61 using Vec3 = EBGeometry::Vec3T<Real>;
62
66 using BV = EBGeometry::BoundingVolumes::AABBT<Real>;
67
73 using BoxTree = EBGeometry::BVH::PackedBVH<Real, int, K, EBGeometry::BVH::ValueStorage<int>>;
74
79
83 virtual ~ComputationalGeometry();
84
89 const Vector<Dielectric>&
90 getDielectrics() const;
91
96 const Vector<Electrode>&
97 getElectrodes() const;
98
103 Real
104 getGasPermittivity() const;
105
110 void
111 useScanShop(const ProblemDomain& a_beginDomain);
112
116 void
118
126 void
127 usePolyhedralShop(const ProblemDomain& a_beginDomain);
128
133 void
134 setDielectrics(const Vector<Dielectric>& a_dielectrics);
135
140 void
141 setElectrodes(const Vector<Electrode>& a_electrodes);
142
147 void
148 setGasPermittivity(const Real a_eps0);
149
154 const RefCountedPtr<MultiFluidIndexSpace>&
155 getMfIndexSpace() const;
156
161 const RefCountedPtr<BaseIF>&
163
168 const RefCountedPtr<BaseIF>&
170
176 const RefCountedPtr<BaseIF>&
177 getImplicitFunction(const phase::which_phase a_phase) const;
178
199 virtual void
200 makeGrids(const ProblemDomain& a_startDomain,
201 const ProblemDomain& a_stopDomain,
202 const RealVect& a_probLo,
203 const Real a_startDx,
204 const Real a_refineAngle,
205 const int a_maxGhostEB,
206 const int a_minBlockSize,
207 const int a_maxBlockSize);
208
213 int
214 getNumGridLevels() const noexcept;
215
230 GeometryService::InOut
231 classify(const Box& a_box, const int a_level, const phase::which_phase a_phase) const;
232
245 GeometryService::InOut
246 classify(const Box& a_box, const ProblemDomain& a_domain, const phase::which_phase a_phase) const;
247
264 void
265 ownedPieces(std::vector<std::vector<std::pair<int, Box>>>& a_pieces, const Box& a_box, const int a_level) const;
266
274 void
275 ownedPart(Vector<Box>& a_owned, const Box& a_tile, const int a_level) const;
276
285 void
286 checkOwnedPieces(const Box& a_box, const int a_level) const;
287
292 int
293 getStartLevel() const noexcept;
294
300 int
301 getMaxGhostEB() const noexcept;
302
308 int
309 getMinBlockSize() const noexcept;
310
316 int
317 getLevel(const ProblemDomain& a_domain) const noexcept;
318
326 Vector<Box>
327 getBoxes(const phase::which_phase a_phase, const int a_level, const GeometryService::InOut a_type) const noexcept;
328
334 const Vector<Box>&
335 getBoxes(const int a_level) const noexcept;
336
344 const Vector<Box>&
345 getCutTiles(const int a_level) const noexcept;
346
354 const Vector<Box>&
355 getSplitBoxes(Vector<int>& a_reasons, const int a_level) const noexcept;
356
363 const Vector<GeometryService::InOut>&
364 getTypes(const phase::which_phase a_phase, const int a_level) const noexcept;
365
371 const ProblemDomain&
372 getDomain(const int a_level) const noexcept;
373
382 IntVectSet
383 irregCells(const phase::which_phase a_phase, const ProblemDomain& a_domain) const;
384
393 DisjointBoxLayout
394 irregGrids(const phase::which_phase a_phase, const ProblemDomain& a_domain) const;
395
401 Real
402 getDx(const int a_level) const noexcept;
403
416 virtual void
417 buildGeometries(const ProblemDomain& a_finestDomain,
418 const RealVect& a_probLo,
419 const Real a_finestDx,
420 const int a_nCellMax,
421 const int a_maxGhostEB,
422 const int a_maxCoarsen = -1);
423
424protected:
428 constexpr static Real s_thresh = 1.E-15;
429
437 constexpr static bool s_strictGeometry = true;
438
443 enum class Generator
444 {
445 GeometryShop,
446 ScanShop,
447 PolyhedralShop
448 };
449
454
459 RefCountedPtr<PolyhedralGeometryShop> m_polyhedralShops[2];
460
464 RefCountedPtr<MultiFluidIndexSpace> m_multifluidIndexSpace;
465
469 RefCountedPtr<BaseIF> m_implicitFunctionGas;
470
474 RefCountedPtr<BaseIF> m_implicitFunctionSolid;
475
479 Vector<Dielectric> m_dielectrics;
480
484 Vector<Electrode> m_electrodes;
485
489 ProblemDomain m_scanDomain;
490
494 RealVect m_probLo;
495
499 Real m_eps0;
500
505
517
522
527
532
537
543
549
554
558 Vector<ProblemDomain> m_domains;
559
563 Vector<Real> m_dx;
564
568 Vector<Vector<Box>> m_cutTiles;
569
573 Vector<Vector<Box>> m_boxes;
574
579 Vector<std::shared_ptr<BoxTree>> m_boxTrees;
580
585 Vector<std::shared_ptr<BoxTree>> m_tileTrees;
586
591 Vector<Vector<int>> m_splitCounts;
592
596 Vector<Vector<Box>> m_splitBoxes;
597
601 Vector<Vector<int>> m_splitReasons;
602
606 Vector<Vector<GeometryService::InOut>> m_gasTypes;
607
611 Vector<Vector<GeometryService::InOut>> m_solidTypes;
612
616 void
617 reportGrids() const;
618
624 void
626
632 Vector<Vector<GeometryService::InOut>>&
633 types(const phase::which_phase a_phase) noexcept;
634
640 const Vector<Vector<GeometryService::InOut>>&
641 types(const phase::which_phase a_phase) const noexcept;
642
650 void
652
677 void
678 buildFinerLevels(Vector<Vector<int>>& a_firstChild, Vector<Vector<int>>& a_numChildren);
679
689 void
690 classifyBoxes(const Vector<Box>& a_boxes,
691 const int a_level,
692 Vector<GeometryService::InOut>& a_gasTypes,
693 Vector<GeometryService::InOut>& a_solidTypes) const;
694
705 Vector<int>
706 splitFlags(const Vector<Box>& a_boxes,
707 const int a_level,
708 const Vector<GeometryService::InOut>& a_gasTypes,
709 const Vector<GeometryService::InOut>& a_solidTypes) const;
710
739 GeometryService::InOut
740 classifyBox(const Box& a_box, const int a_level, const phase::which_phase a_phase) const;
741
750 enum class SplitReason
751 {
752 None,
753 Interior,
754 Ring,
755 Medial,
756 DoubleCrossing,
757 Twist
758 };
759
792 bool
793 hasTwistedPatch(const Box& a_box, const int a_level, const phase::which_phase a_phase) const;
794
820 exceedsCurvature(const Box& a_box, const int a_level, const phase::which_phase a_phase) const;
821
841 bool
842 doublyCrossedEdge(const Box& a_box, const int a_level, const phase::which_phase a_phase) const;
843
864 bool
865 piercedSeamFace(const IntVect& a_cell,
866 const int a_level,
867 const phase::which_phase a_phase,
868 const BaseFab<bool>& a_refined) const;
869
885 void
886 makeTiles();
887
912 void
913 classifyTiles(Vector<Vector<GeometryService::InOut>>& a_gasTileTypes,
914 Vector<Vector<GeometryService::InOut>>& a_solidTileTypes,
915 Vector<Vector<int>>& a_tileHosts,
916 const Vector<Vector<int>>& a_firstChild,
917 const Vector<Vector<int>>& a_numChildren) const;
918
922 static constexpr int s_treeLeafSize = 8;
923
928 static constexpr int s_maxTilePasses = 8;
929
935 static BV
936 boundingVolume(const Box& a_box) noexcept;
937
944 void
946
952 std::shared_ptr<BoxTree>
953 buildTree(const Vector<Box>& a_boxes) const;
954
962 static Vector<int>
963 meeting(const std::shared_ptr<BoxTree>& a_tree, const Vector<Box>& a_boxes, const Box& a_box);
964
988 bool
989 tagUnresolvedSeams(Vector<IntVectSet>& a_tags) const;
990
996 void
998
1003 void
1004 buildBoxTree(const int a_level);
1005
1012 Vector<int>
1013 boxesMeeting(const int a_level, const Box& a_box) const;
1014
1021 Vector<int>
1022 tilesMeeting(const int a_level, const Box& a_box) const;
1023
1030 int
1031 containingBox(const int a_level, const IntVect& a_cell) const;
1032
1053 void
1054 decimateBoxes(const Vector<Vector<GeometryService::InOut>>& a_gasTileTypes,
1055 const Vector<Vector<GeometryService::InOut>>& a_solidTileTypes,
1056 const Vector<Vector<int>>& a_tileHosts);
1057
1080 void
1082
1090 void
1091 buildGasGeometry(GeometryService*& a_geoserver,
1092 const ProblemDomain& a_finestDomain,
1093 const RealVect& a_probLo,
1094 const Real a_finestDx);
1095
1103 void
1104 buildSolidGeometry(GeometryService*& a_geoserver,
1105 const ProblemDomain& a_finestDomain,
1106 const RealVect& a_probLo,
1107 const Real a_finestDx);
1108};
1109
1110#include <CD_NamespaceFooter.H>
1111
1112#endif
Dielectric class.
Declaration of an electrode class.
Multi-fluid index space.
Declaration of an axis-aligned box in space.
int m_maxBlockSize
Super-tile size, in cells; the size every box makeGrids makes is split to. ComputationalGeometry....
Definition CD_ComputationalGeometry.H:542
virtual void buildGeometries(const ProblemDomain &a_finestDomain, const RealVect &a_probLo, const Real a_finestDx, const int a_nCellMax, const int a_maxGhostEB, const int a_maxCoarsen=-1)
Build geometries and the MFIndexSpace.
Definition CD_ComputationalGeometry.cpp:248
bool tagUnresolvedSeams(Vector< IntVectSet > &a_tags) const
Tag the cells on the coarse side of a level boundary that the level above it would cross twice,...
Definition CD_ComputationalGeometry.cpp:1918
void reportGrids() const
Report the boxes and tiles of every level to pout.
Definition CD_ComputationalGeometry.cpp:2441
bool hasTwistedPatch(const Box &a_box, const int a_level, const phase::which_phase a_phase) const
Whether any cut cell of the box holds an interface patch that is twisted about its own centre.
Definition CD_ComputationalGeometry.cpp:1640
std::shared_ptr< BoxTree > buildTree(const Vector< Box > &a_boxes) const
Build one spatial index over a list of boxes.
Definition CD_ComputationalGeometry.cpp:2068
const RefCountedPtr< BaseIF > & getGasImplicitFunction() const
Get the implicit function used to generate the gas-phase EBIS.
Definition CD_ComputationalGeometry.cpp:158
Vector< std::shared_ptr< BoxTree > > m_boxTrees
Spatial index over the boxes of every level, one tree per level, holding the boxes' indices into m_bo...
Definition CD_ComputationalGeometry.H:579
bool doublyCrossedEdge(const Box &a_box, const int a_level, const phase::which_phase a_phase) const
Whether a cell edge of a box is crossed twice by the surface at the spacing of the level above it.
Definition CD_ComputationalGeometry.cpp:1459
void ownedPart(Vector< Box > &a_owned, const Box &a_tile, const int a_level) const
The cells of one cut tile that its level owns: the tile less what the next level's tiles hold.
Definition CD_ComputationalGeometry.cpp:827
Vector< Vector< GeometryService::InOut > > & types(const phase::which_phase a_phase) noexcept
The per-level classifications of one phase.
Definition CD_ComputationalGeometry.cpp:1114
const RefCountedPtr< BaseIF > & getImplicitFunction(const phase::which_phase a_phase) const
Get implicit function for the specified phase.
Definition CD_ComputationalGeometry.cpp:180
virtual void makeGrids(const ProblemDomain &a_startDomain, const ProblemDomain &a_stopDomain, const RealVect &a_probLo, const Real a_startDx, const Real a_refineAngle, const int a_maxGhostEB, const int a_minBlockSize, const int a_maxBlockSize)
Build the grids the index space is generated over.
Definition CD_ComputationalGeometry.cpp:377
int getNumGridLevels() const noexcept
Number of levels makeGrids built.
Definition CD_ComputationalGeometry.cpp:577
Vector< int > tilesMeeting(const int a_level, const Box &a_box) const
Cut tiles of a level that intersect a box.
Definition CD_ComputationalGeometry.cpp:2146
const Vector< Electrode > & getElectrodes() const
Get electrodes.
Definition CD_ComputationalGeometry.cpp:147
Vector< std::shared_ptr< BoxTree > > m_tileTrees
Spatial index over the cut tiles of every level, one tree per level, holding the tiles' indices into ...
Definition CD_ComputationalGeometry.H:585
Generator
Which generator to build the geometry with.
Definition CD_ComputationalGeometry.H:444
int getStartLevel() const noexcept
Level of the start domain. Every level at or below it is whole; the cut tiles begin above it.
Definition CD_ComputationalGeometry.cpp:930
Vector< Vector< GeometryService::InOut > > m_gasTypes
Gas-phase classification of each box in m_boxes, parallel to it.
Definition CD_ComputationalGeometry.H:606
static Vector< int > meeting(const std::shared_ptr< BoxTree > &a_tree, const Vector< Box > &a_boxes, const Box &a_box)
The boxes of a list that intersect a box, through the list's spatial index.
Definition CD_ComputationalGeometry.cpp:2088
void buildTileTrees()
Build the spatial index over the cut tiles of every level.
Definition CD_ComputationalGeometry.cpp:2053
void buildBoxTrees()
Build the spatial index over the boxes of every level.
Definition CD_ComputationalGeometry.cpp:2038
int getLevel(const ProblemDomain &a_domain) const noexcept
Level of a domain among the levels makeGrids built.
Definition CD_ComputationalGeometry.cpp:948
void useScanShop(const ProblemDomain &a_beginDomain)
Calls for ComputationalGeometry to use ScanShop rather than Chombo's default geometry generation tool...
Definition CD_ComputationalGeometry.cpp:96
void useChomboShop()
Calls for ComputationalGeometry to use Chombo's geometry generation tool.
Definition CD_ComputationalGeometry.cpp:122
bool m_refineSaddles
Whether a box holding a saddle – an interface patch twisted about its own centre – is split....
Definition CD_ComputationalGeometry.H:516
void makeTiles()
Step 2: tile the boxes that are irregular in either phase into one properly nested set per level.
Definition CD_ComputationalGeometry.cpp:1846
Real m_eps0
Background permittivity.
Definition CD_ComputationalGeometry.H:499
void decimateBoxes(const Vector< Vector< GeometryService::InOut > > &a_gasTileTypes, const Vector< Vector< GeometryService::InOut > > &a_solidTileTypes, const Vector< Vector< int > > &a_tileHosts)
Step 4: cut every hit box down to what the tiles left of it, and replace the lists on the tiled level...
Definition CD_ComputationalGeometry.cpp:2273
void usePolyhedralShop(const ProblemDomain &a_beginDomain)
Generate the geometry with PolyhedralGeometryShop.
Definition CD_ComputationalGeometry.cpp:110
ProblemDomain m_scanDomain
Grid level where we begin using ScanShop.
Definition CD_ComputationalGeometry.H:489
IntVectSet irregCells(const phase::which_phase a_phase, const ProblemDomain &a_domain) const
The cut cells of a phase on a domain that this rank holds.
Definition CD_ComputationalGeometry.cpp:1028
bool piercedSeamFace(const IntVect &a_cell, const int a_level, const phase::which_phase a_phase, const BaseFab< bool > &a_refined) const
Whether a face of a cell toward the level above is pierced at its middle by the surface.
Definition CD_ComputationalGeometry.cpp:1549
void setElectrodes(const Vector< Electrode > &a_electrodes)
Set electrodes.
Definition CD_ComputationalGeometry.cpp:226
void buildSolidGeometry(GeometryService *&a_geoserver, const ProblemDomain &a_finestDomain, const RealVect &a_probLo, const Real a_finestDx)
Set up the geometry generation tool for the solid phase, i.e. the part inside the dielectrics.
Definition CD_ComputationalGeometry.cpp:2528
virtual ~ComputationalGeometry()
Destructor.
Definition CD_ComputationalGeometry.cpp:87
bool m_profile
Whether makeGrids reports its levels and its timings to pout. ComputationalGeometry....
Definition CD_ComputationalGeometry.H:548
int getMaxGhostEB() const noexcept
The width, in cells, by which every box is grown before it is classified.
Definition CD_ComputationalGeometry.cpp:936
Vector< Electrode > m_electrodes
List of electrodes.
Definition CD_ComputationalGeometry.H:484
Vector< int > splitFlags(const Vector< Box > &a_boxes, const int a_level, const Vector< GeometryService::InOut > &a_gasTypes, const Vector< GeometryService::InOut > &a_solidTypes) const
Whether each box must split, the work shared between the ranks.
Definition CD_ComputationalGeometry.cpp:1288
void buildCoarserLevels()
Step 5: build the levels coarser than the start level, and push irregularity down onto every whole le...
Definition CD_ComputationalGeometry.cpp:2384
GeometryService::InOut classify(const Box &a_box, const int a_level, const phase::which_phase a_phase) const
Classify a box on a level from the grids makeGrids built.
Definition CD_ComputationalGeometry.cpp:583
Real m_refineAngle
Angle, in degrees, between neighbouring normals above which an irregular box is split.
Definition CD_ComputationalGeometry.H:504
int m_startLevel
Level of the start domain; every level below it is built whole.
Definition CD_ComputationalGeometry.H:526
Vector< Vector< int > > m_splitReasons
Per level, the reason each box in m_splitBoxes split.
Definition CD_ComputationalGeometry.H:601
Generator m_generator
Generator selected by the user.
Definition CD_ComputationalGeometry.H:453
const Vector< GeometryService::InOut > & getTypes(const phase::which_phase a_phase, const int a_level) const noexcept
Classification of every box on a level for a phase, parallel to getBoxes(level).
Definition CD_ComputationalGeometry.cpp:1012
static constexpr bool s_strictGeometry
Whether a cut cell whose body will not close stops the run.
Definition CD_ComputationalGeometry.H:437
SplitReason
Why a box split: not at all, a pair of cut cells inside the box turning too sharply,...
Definition CD_ComputationalGeometry.H:751
int m_maxGhostEB
Maximum number of ghost cells that we will ever need.
Definition CD_ComputationalGeometry.H:521
void buildFinerLevels(Vector< Vector< int > > &a_firstChild, Vector< Vector< int > > &a_numChildren)
Step 1: the upward pass, from the start level to the stop level.
Definition CD_ComputationalGeometry.cpp:1145
void ownedPieces(std::vector< std::vector< std::pair< int, Box > > > &a_pieces, const Box &a_box, const int a_level) const
Which level describes each part of a box, and through which of its cut tiles.
Definition CD_ComputationalGeometry.cpp:756
int getMinBlockSize() const noexcept
The edge of a tile, in cells of its own level.
Definition CD_ComputationalGeometry.cpp:942
static BV boundingVolume(const Box &a_box) noexcept
The bounding volume of a box in index space, its cells taken as the unit cubes they are.
Definition CD_ComputationalGeometry.cpp:2004
void buildStartLevel()
Step 0: build and classify the start level.
Definition CD_ComputationalGeometry.cpp:1130
void classifyTiles(Vector< Vector< GeometryService::InOut > > &a_gasTileTypes, Vector< Vector< GeometryService::InOut > > &a_solidTileTypes, Vector< Vector< int > > &a_tileHosts, const Vector< Vector< int > > &a_firstChild, const Vector< Vector< int > > &a_numChildren) const
Step 3: place every tile of every level in the boxes and classify it in both phases.
Definition CD_ComputationalGeometry.cpp:2170
void buildBoxTree(const int a_level)
Build the spatial index over the boxes of one level.
Definition CD_ComputationalGeometry.cpp:2023
RealVect m_probLo
Lower-left corner of the domain.
Definition CD_ComputationalGeometry.H:494
SplitReason exceedsCurvature(const Box &a_box, const int a_level, const phase::which_phase a_phase) const
Whether the interface turns by more than m_refineAngle between neighbouring cut cells of a box.
Definition CD_ComputationalGeometry.cpp:1733
EBGeometry::BVH::PackedBVH< Real, int, K, EBGeometry::BVH::ValueStorage< int > > BoxTree
Spatial index over the boxes of one level. The primitives are the boxes' indices into that level's li...
Definition CD_ComputationalGeometry.H:73
void checkOwnedPieces(const Box &a_box, const int a_level) const
Check ownedPieces on a box against a cell-by-cell reading of the tiles.
Definition CD_ComputationalGeometry.cpp:862
RefCountedPtr< PolyhedralGeometryShop > m_polyhedralShops[2]
The polyhedral generator of each phase, indexed by phase::which_phase, kept for the run: the index sp...
Definition CD_ComputationalGeometry.H:459
void buildImplicitFunctions()
Build the composite implicit functions of the two phases from the electrodes and dielectrics.
Definition CD_ComputationalGeometry.cpp:333
Vector< Vector< Box > > m_cutTiles
Cut-cell tiles per level, common to both phases.
Definition CD_ComputationalGeometry.H:568
void setDielectrics(const Vector< Dielectric > &a_dielectrics)
Set dielectrics.
Definition CD_ComputationalGeometry.cpp:215
Vector< Vector< Box > > m_boxes
Boxes per level, common to both phases.
Definition CD_ComputationalGeometry.H:573
const ProblemDomain & getDomain(const int a_level) const noexcept
Domain of a level.
Definition CD_ComputationalGeometry.cpp:1020
void buildGasGeometry(GeometryService *&a_geoserver, const ProblemDomain &a_finestDomain, const RealVect &a_probLo, const Real a_finestDx)
Set up the geometry generation tool for the gas phase.
Definition CD_ComputationalGeometry.cpp:2473
const RefCountedPtr< MultiFluidIndexSpace > & getMfIndexSpace() const
Get the multifluid index space.
Definition CD_ComputationalGeometry.cpp:204
RefCountedPtr< MultiFluidIndexSpace > m_multifluidIndexSpace
Multifluid index spaces.
Definition CD_ComputationalGeometry.H:464
void classifyBoxes(const Vector< Box > &a_boxes, const int a_level, Vector< GeometryService::InOut > &a_gasTypes, Vector< GeometryService::InOut > &a_solidTypes) const
Classify a list of boxes in both phases, the work shared between the ranks.
Definition CD_ComputationalGeometry.cpp:1220
Vector< Box > getBoxes(const phase::which_phase a_phase, const int a_level, const GeometryService::InOut a_type) const noexcept
Boxes of one classification for a phase on a level.
Definition CD_ComputationalGeometry.cpp:962
static constexpr int s_treeLeafSize
Boxes per leaf the spatial index over a level's boxes is built with.
Definition CD_ComputationalGeometry.H:922
GeometryService::InOut classifyBox(const Box &a_box, const int a_level, const phase::which_phase a_phase) const
Classify a box of one phase on one level as regular, covered or irregular.
Definition CD_ComputationalGeometry.cpp:1355
EBGeometry::BoundingVolumes::AABBT< Real > BV
Bounding volume of the spatial index over the boxes of a level.
Definition CD_ComputationalGeometry.H:66
Vector< Dielectric > m_dielectrics
List of dielectrics.
Definition CD_ComputationalGeometry.H:479
Real getGasPermittivity() const
Get the background gas permittivity.
Definition CD_ComputationalGeometry.cpp:193
int m_stopLevel
Level of the stop domain, the finest level.
Definition CD_ComputationalGeometry.H:531
const Vector< Box > & getCutTiles(const int a_level) const noexcept
The cut tiles on a level: the boxes of the level that carry cut cells or nest the level above,...
Definition CD_ComputationalGeometry.cpp:993
Vector< Vector< int > > m_splitCounts
Per level, the number of boxes that split for each SplitReason, and per level the number of tiles tha...
Definition CD_ComputationalGeometry.H:591
int m_minBlockSize
Tile size, in cells. ComputationalGeometry.min_block_size, 8 when not given.
Definition CD_ComputationalGeometry.H:536
bool m_verbose
Whether every member function announces itself in pout. ComputationalGeometry.verbose,...
Definition CD_ComputationalGeometry.H:553
Real getDx(const int a_level) const noexcept
Grid spacing of a level.
Definition CD_ComputationalGeometry.cpp:1106
static constexpr int s_maxTilePasses
Most times the tiles are built: the first build, and one more for every pass that finds a cell the le...
Definition CD_ComputationalGeometry.H:928
EBGeometry::Vec3T< Real > Vec3
Coordinate of a bounding volume of the spatial index.
Definition CD_ComputationalGeometry.H:61
const Vector< Dielectric > & getDielectrics() const
Get dielectrics.
Definition CD_ComputationalGeometry.cpp:136
ComputationalGeometry()
Constructor. Sets a blank geometry.
Definition CD_ComputationalGeometry.cpp:51
const Vector< Box > & getSplitBoxes(Vector< int > &a_reasons, const int a_level) const noexcept
The boxes that split in the upward pass on a level, with why: 1 a pair inside the box,...
Definition CD_ComputationalGeometry.cpp:1001
Vector< ProblemDomain > m_domains
Domains of the levels makeGrids builds, coarsest first.
Definition CD_ComputationalGeometry.H:558
const RefCountedPtr< BaseIF > & getSolidImplicitFunction() const
Get the implicit function used to generate the solid-phase EBIS.
Definition CD_ComputationalGeometry.cpp:169
static constexpr Real s_thresh
Threshold for Vof computation.
Definition CD_ComputationalGeometry.H:428
static constexpr int K
Branching factor of the spatial index over the boxes of a level.
Definition CD_ComputationalGeometry.H:56
int containingBox(const int a_level, const IntVect &a_cell) const
Index of the box of a level that contains a cell, which one box does on a level that is whole.
Definition CD_ComputationalGeometry.cpp:2157
Vector< Real > m_dx
Grid spacings of the levels makeGrids builds, coarsest first.
Definition CD_ComputationalGeometry.H:563
Vector< Vector< Box > > m_splitBoxes
Per level, the boxes that split in the upward pass, and why (SplitReason as an integer),...
Definition CD_ComputationalGeometry.H:596
DisjointBoxLayout irregGrids(const phase::which_phase a_phase, const ProblemDomain &a_domain) const
A layout of a phase on a domain whose boxes hold every cut cell of the phase there.
Definition CD_ComputationalGeometry.cpp:1082
RefCountedPtr< BaseIF > m_implicitFunctionGas
The gas-phase implicit function (i.e. outside electrodes and dielectrics).
Definition CD_ComputationalGeometry.H:469
Vector< int > boxesMeeting(const int a_level, const Box &a_box) const
Boxes of a level that intersect a box.
Definition CD_ComputationalGeometry.cpp:2135
RefCountedPtr< BaseIF > m_implicitFunctionSolid
The solid-phase implicit function (i.e. the inside of the dielectrics).
Definition CD_ComputationalGeometry.H:474
void setGasPermittivity(const Real a_eps0)
Set the background permittivity.
Definition CD_ComputationalGeometry.cpp:237
Vector< Vector< GeometryService::InOut > > m_solidTypes
Solid-phase classification of each box in m_boxes, parallel to it.
Definition CD_ComputationalGeometry.H:611
Geometry generation whose moments are exact integrals of an explicit surface.
Definition CD_PolyhedralGeometryShop.H:64
Derived version of GeometryShop that load balances based on the cut cells themselves.
Definition CD_ScanShop.H:32
Phase names namespace.
Definition CD_MultiFluidIndexSpace.H:28
which_phase
Enumeration of supported phases.
Definition CD_MultiFluidIndexSpace.H:38