Geometry Struct ReferenceΒΆ

adc_cpp: pops::Geometry Struct Reference
adc_cpp 0.3.0
Model-free C++23 core for coupled hyperbolic-elliptic systems on adaptive (AMR) meshes, with MPI and GPU (Kokkos) backends
pops::Geometry Struct Reference

Cartesian geometry of a level: index domain + physical bounds [xlo, xhi] x [ylo, yhi]. More...

#include <geometry.hpp>

+ Collaboration diagram for pops::Geometry:

Public Member Functions

POPS_HD Real dx () const
 Grid spacing in x (= (xhi - xlo) / domain.nx()). POPS_HD.
 
POPS_HD Real dy () const
 Grid spacing in y (= (yhi - ylo) / domain.ny()). POPS_HD.
 
POPS_HD Real x_cell (int i) const
 Abscissa at the CENTER of cell index i (i = 0 -> xlo + dx/2; defined for negative i). POPS_HD.
 
POPS_HD Real y_cell (int j) const
 Ordinate at the CENTER of cell index j. POPS_HD.
 
Geometry refine (int r) const
 Geometry refined by ratio r: SAME physical extent, refined index domain (dx -> dx/r).
 

Public Attributes

Box2D domain {}
 
Real xlo = 0
 
Real xhi = 1
 
Real ylo = 0
 
Real yhi = 1
 

Detailed Description

Cartesian geometry of a level: index domain + physical bounds [xlo, xhi] x [ylo, yhi].

Trivial POD; POPS_HD accessors. Uniform cell size (dx = (xhi-xlo)/nx, same for dy).

Member Function Documentation

◆ dx()

POPS_HD Real pops::Geometry::dx ( ) const
inline

Grid spacing in x (= (xhi - xlo) / domain.nx()). POPS_HD.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dy()

POPS_HD Real pops::Geometry::dy ( ) const
inline

Grid spacing in y (= (yhi - ylo) / domain.ny()). POPS_HD.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ refine()

Geometry pops::Geometry::refine ( int  r) const
inline

Geometry refined by ratio r: SAME physical extent, refined index domain (dx -> dx/r).

+ Here is the call graph for this function:

◆ x_cell()

POPS_HD Real pops::Geometry::x_cell ( int  i) const
inline

Abscissa at the CENTER of cell index i (i = 0 -> xlo + dx/2; defined for negative i). POPS_HD.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ y_cell()

POPS_HD Real pops::Geometry::y_cell ( int  j) const
inline

Ordinate at the CENTER of cell index j. POPS_HD.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ domain

Box2D pops::Geometry::domain {}

◆ xhi

Real pops::Geometry::xhi = 1

◆ xlo

Real pops::Geometry::xlo = 0

◆ yhi

Real pops::Geometry::yhi = 1

◆ ylo

Real pops::Geometry::ylo = 0

The documentation for this struct was generated from the following file: