ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_SolverUtils.H File Reference
#include "AMReX_LO_BCTYPES.H"
Include dependency graph for ERF_SolverUtils.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

Array< LinOpBCType, AMREX_SPACEDIM > get_lo_projection_bc (Geometry const &lev_geom, Array< std::string, 2 *AMREX_SPACEDIM > l_domain_bc_type)
 
Array< LinOpBCType, AMREX_SPACEDIM > get_hi_projection_bc (Geometry const &lev_geom, Array< std::string, 2 *AMREX_SPACEDIM > l_domain_bc_type)
 

Function Documentation

◆ get_hi_projection_bc()

Array<LinOpBCType,AMREX_SPACEDIM> get_hi_projection_bc ( Geometry const &  lev_geom,
Array< std::string, 2 *AMREX_SPACEDIM >  l_domain_bc_type 
)
inline

Define high-side domain boundary conditions for the projection solve.

Parameters
lev_geomGeometry used to identify periodic high-side boundaries
l_domain_bc_typeDomain boundary-condition names
Returns
High-side linear-operator boundary condition in each direction
50 {
51  amrex::Array<amrex::LinOpBCType,AMREX_SPACEDIM> r;
52  for (int dir = 0; dir < AMREX_SPACEDIM; ++dir) {
53  if ( lev_geom.isPeriodic(dir) )
54  {
55  r[dir] = LinOpBCType::Periodic;
56  } else {
57  auto bc_type = l_domain_bc_type[Orientation(dir,Orientation::high)];
58  if (bc_type == "Outflow" || bc_type == "Open") {
59  r[dir] = LinOpBCType::Dirichlet;
60  } else {
61  r[dir] = LinOpBCType::Neumann;
62  }
63  }
64  }
65  return r;
66 }

Referenced by ERF::project_velocity_tb(), solve_with_EB_mlmg(), and solve_with_mlmg().

Here is the caller graph for this function:

◆ get_lo_projection_bc()

Array<LinOpBCType,AMREX_SPACEDIM> get_lo_projection_bc ( Geometry const &  lev_geom,
Array< std::string, 2 *AMREX_SPACEDIM >  l_domain_bc_type 
)
inline

Define the domain boundary conditions for the (optional) Poisson solve if we want to enforce that the initial conditions satisfy the constraint

Parameters
lev_geomGeometry used to identify periodic low-side boundaries
l_domain_bc_typeDomain boundary-condition names
Returns
Low-side linear-operator boundary condition in each direction
22 {
23  amrex::Array<amrex::LinOpBCType,AMREX_SPACEDIM> r;
24  for (int dir = 0; dir < AMREX_SPACEDIM; ++dir) {
25  if ( lev_geom.isPeriodic(dir) )
26  {
27  r[dir] = LinOpBCType::Periodic;
28  } else {
29  auto bc_type = l_domain_bc_type[Orientation(dir,Orientation::low)];
30  if (bc_type == "Outflow" || bc_type == "Open") {
31  r[dir] = LinOpBCType::Dirichlet;
32  } else {
33  r[dir] = LinOpBCType::Neumann;
34  }
35  }
36  }
37  return r;
38 }

Referenced by ERF::project_velocity_tb(), solve_with_EB_mlmg(), and solve_with_mlmg().

Here is the caller graph for this function: