chombo-discharge
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
DiskProfiledPlane Class Reference

Geometry class for disk electrode and profiled surface experiments. More...

#include <CD_DiskProfiledPlane.H>

Inheritance diagram for DiskProfiledPlane:
Inheritance graph
[legend]
Collaboration diagram for DiskProfiledPlane:
Collaboration graph
[legend]

Public Member Functions

 DiskProfiledPlane () noexcept
 Constructor - reads in all parameters.
 
virtual ~DiskProfiledPlane ()=default
 Destructor - does nothing.
 
- Public Member Functions inherited from ComputationalGeometry
 ComputationalGeometry ()
 Constructor. Sets a blank geometry.
 
virtual ~ComputationalGeometry ()
 Destructor.
 
const Vector< Dielectric > & getDielectrics () const
 Get dielectrics.
 
const Vector< Electrode > & getElectrodes () const
 Get electrodes.
 
Real getGasPermittivity () const
 Get the background gas permittivity.
 
void useScanShop (const ProblemDomain &a_beginDomain)
 Calls for ComputationalGeometry to use ScanShop rather than Chombo's default geometry generation tool.
 
void useChomboShop ()
 Calls for ComputationalGeometry to use Chombo's geometry generation tool.
 
void usePolyhedralShop (const ProblemDomain &a_beginDomain)
 Generate the geometry with PolyhedralGeometryShop.
 
void setDielectrics (const Vector< Dielectric > &a_dielectrics)
 Set dielectrics.
 
void setElectrodes (const Vector< Electrode > &a_electrodes)
 Set electrodes.
 
void setGasPermittivity (const Real a_eps0)
 Set the background permittivity.
 
const RefCountedPtr< MultiFluidIndexSpace > & getMfIndexSpace () const
 Get the multifluid index space.
 
const RefCountedPtr< BaseIF > & getGasImplicitFunction () const
 Get the implicit function used to generate the gas-phase EBIS.
 
const RefCountedPtr< BaseIF > & getSolidImplicitFunction () const
 Get the implicit function used to generate the solid-phase EBIS.
 
const RefCountedPtr< BaseIF > & getImplicitFunction (const phase::which_phase a_phase) const
 Get implicit function for the specified phase.
 
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.
 
int getNumGridLevels () const noexcept
 Number of levels makeGrids built.
 
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.
 
GeometryService::InOut classify (const Box &a_box, const ProblemDomain &a_domain, const phase::which_phase a_phase) const
 Classify a box on any domain at or finer than a level makeGrids built.
 
int getStartLevel () const noexcept
 Level of the start domain. Every level at or below it is whole; the cut tiles begin above it.
 
int getLevel (const ProblemDomain &a_domain) const noexcept
 Level of a domain among the levels makeGrids built.
 
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.
 
const Vector< Box > & getBoxes (const int a_level) const noexcept
 Every box on a level, both phases' boxes being the same.
 
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, which is what a simulation grid on the level is made of. On the start level, its boxes irregular in either phase; empty below it.
 
const Vector< Box > & getSplitBoxes (const int a_level, Vector< int > &a_reasons) const noexcept
 The boxes that split in the upward pass on a level, with why: 1 a pair inside the box, 2 a pair reaching into the ring outside it, 3 two surfaces facing each other across the band.
 
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).
 
const ProblemDomain & getDomain (const int a_level) const noexcept
 Domain of a level.
 
Real getDx (const int a_level) const noexcept
 Grid spacing of a level.
 
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.
 

Protected Member Functions

virtual void defineElectrode () noexcept
 Define the electrode.
 
virtual void defineDielectric () noexcept
 Define the dielectric plate.
 
- Protected Member Functions inherited from ComputationalGeometry
void reportGrids () const
 Report the boxes and tiles of every level to pout.
 
void buildImplicitFunctions ()
 Build the composite implicit functions of the two phases from the electrodes and dielectrics.
 
Vector< Vector< GeometryService::InOut > > & types (const phase::which_phase a_phase) noexcept
 The per-level classifications of one phase.
 
const Vector< Vector< GeometryService::InOut > > & types (const phase::which_phase a_phase) const noexcept
 The per-level classifications of one phase.
 
void buildStartLevel ()
 Step 0: build and classify the start level.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
void makeTiles ()
 Step 2: tile the boxes that are irregular in either phase into one properly nested set per level.
 
void classifyTiles (const Vector< Vector< int > > &a_firstChild, const Vector< Vector< int > > &a_numChildren, Vector< Vector< GeometryService::InOut > > &a_gasTileTypes, Vector< Vector< GeometryService::InOut > > &a_solidTileTypes, Vector< Vector< int > > &a_tileHosts) const
 Step 3: place every tile of every level in the boxes and classify it in both phases.
 
void buildBoxTrees ()
 Build the spatial index over the boxes of every level.
 
std::shared_ptr< BoxTree > buildTree (const Vector< Box > &a_boxes) const
 Build one spatial index over a list of boxes.
 
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.
 
void buildTileTrees ()
 Build the spatial index over the cut tiles of every level.
 
void buildBoxTree (const int a_level)
 Build the spatial index over the boxes of one level.
 
Vector< int > boxesMeeting (const int a_level, const Box &a_box) const
 Boxes of a level that intersect a box.
 
Vector< int > tilesMeeting (const int a_level, const Box &a_box) const
 Cut tiles of a level that intersect a box.
 
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.
 
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 levels with the result.
 
void buildCoarserLevels ()
 Step 5: build the levels coarser than the start level, and push irregularity down onto every whole level.
 
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.
 
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.
 

Additional Inherited Members

- Public Types inherited from ComputationalGeometry
using Vec3 = EBGeometry::Vec3T< Real >
 Coordinate of a bounding volume of the spatial index.
 
using BV = EBGeometry::BoundingVolumes::AABBT< Real >
 Bounding volume of the spatial index over the boxes of a level.
 
using BoxTree = EBGeometry::BVH::PackedBVH< Real, int, K, EBGeometry::BVH::ValueStorage< int > >
 Spatial index over the boxes of one level. The primitives are the boxes' indices into that level's list, stored by value, and every bounding volume is the box itself in index space, so a query answers with candidates that the exact box test then filters.
 
- Static Public Attributes inherited from ComputationalGeometry
static constexpr int K = 4
 Branching factor of the spatial index over the boxes of a level.
 
- Protected Types inherited from ComputationalGeometry
enum class  Generator { GeometryShop , ScanShop , PolyhedralShop }
 Which generator to build the geometry with. More...
 
enum class  SplitReason {
  None , Interior , Ring , Medial ,
  DoubleCrossing , Twist
}
 Why a box split: not at all, a pair of cut cells inside the box turning too sharply, such a pair reaching into the ring one cell outside it, a pair whose normals face each other (two surfaces closer than the band), an edge the level above would cross twice, or a cut cell whose interface is twisted into a saddle. More...
 
- Static Protected Member Functions inherited from ComputationalGeometry
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.
 
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.
 
- Protected Attributes inherited from ComputationalGeometry
Generator m_generator
 Generator selected by the user.
 
RefCountedPtr< MultiFluidIndexSpace > m_multifluidIndexSpace
 Multifluid index spaces.
 
RefCountedPtr< BaseIF > m_implicitFunctionGas
 The gas-phase implicit function (i.e. outside electrodes and dielectrics).
 
RefCountedPtr< BaseIF > m_implicitFunctionSolid
 The solid-phase implicit function (i.e. the inside of the dielectrics).
 
Vector< Dielectric > m_dielectrics
 List of dielectrics.
 
Vector< Electrode > m_electrodes
 List of electrodes.
 
ProblemDomain m_scanDomain
 Grid level where we begin using ScanShop.
 
RealVect m_probLo
 Lower-left corner of the domain.
 
Real m_eps0
 Background permittivity.
 
Real m_refineAngle
 Angle, in degrees, between neighbouring normals above which an irregular box is split.
 
bool m_refineSaddles
 Whether a box holding a saddle – an interface patch twisted about its own centre – is split. ComputationalGeometry.refine_saddles, optional, off by default; set it true to turn the refinement on.
 
int m_maxGhostEB
 Maximum number of ghost cells that we will ever need.
 
int m_startLevel
 Level of the start domain; every level below it is built whole.
 
int m_stopLevel
 Level of the stop domain, the finest level.
 
int m_minBlockSize
 Tile size, in cells. ComputationalGeometry.min_block_size, 8 when not given.
 
int m_maxBlockSize
 Super-tile size, in cells; the size every box makeGrids makes is split to. ComputationalGeometry.max_block_size, 8 when not given.
 
bool m_profile
 Whether makeGrids reports its levels and its timings to pout. ComputationalGeometry.profile, off by default.
 
bool m_verbose
 Whether every member function announces itself in pout. ComputationalGeometry.verbose, off by default.
 
Vector< ProblemDomain > m_domains
 Domains of the levels makeGrids builds, coarsest first.
 
Vector< Real > m_dx
 Grid spacings of the levels makeGrids builds, coarsest first.
 
Vector< Vector< Box > > m_cutTiles
 Cut-cell tiles per level, common to both phases.
 
Vector< Vector< Box > > m_boxes
 Boxes per level, common to both phases.
 
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_boxes. Null on a level with no boxes, and on every level until buildBoxTrees has run.
 
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 m_cutTiles. Null on a level with no tiles, and on every level until buildTileTrees has run.
 
Vector< Vector< int > > m_splitCounts
 Per level, the number of boxes that split for each SplitReason, and per level the number of tiles that lie in an irregular box (tagged) versus elsewhere (nesting), for the report.
 
Vector< Vector< Box > > m_splitBoxes
 Per level, the boxes that split in the upward pass, and why (SplitReason as an integer), parallel.
 
Vector< Vector< int > > m_splitReasons
 Per level, the reason each box in m_splitBoxes split.
 
Vector< Vector< GeometryService::InOut > > m_gasTypes
 Gas-phase classification of each box in m_boxes, parallel to it.
 
Vector< Vector< GeometryService::InOut > > m_solidTypes
 Solid-phase classification of each box in m_boxes, parallel to it.
 
- Static Protected Attributes inherited from ComputationalGeometry
static constexpr Real s_thresh = 1.E-15
 Threshold for Vof computation.
 
static constexpr bool s_strictGeometry = true
 Whether a cut cell whose body will not close stops the run.
 
static constexpr int s_treeLeafSize = 8
 Boxes per leaf the spatial index over a level's boxes is built with.
 
static constexpr int s_maxTilePasses = 8
 Most times the tiles are built: the first build, and one more for every pass that finds a cell the level above would cross twice. The run stops if they are all spent with such a cell still unresolved.
 

Detailed Description

Geometry class for disk electrode and profiled surface experiments.

This geometry consists of a disk electrode oriented along +y (user can shift it), and a profiled plane with specified profiles: squares or square channels, spheres, or cylinders. Profiled are organized along a user-specified lattice (coinciding with the coordinate directions), and can be shifted.


The documentation for this class was generated from the following files: