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
36 {
37  amrex::Array<amrex::LinOpBCType,AMREX_SPACEDIM> r;
38  for (int dir = 0; dir < AMREX_SPACEDIM; ++dir) {
39  if ( lev_geom.isPeriodic(dir) )
40  {
41  r[dir] = LinOpBCType::Periodic;
42  } else {
43  auto bc_type = l_domain_bc_type[Orientation(dir,Orientation::high)];
44  if (bc_type == "Outflow" || bc_type == "Open") {
45  r[dir] = LinOpBCType::Dirichlet;
46  } else {
47  r[dir] = LinOpBCType::Neumann;
48  }
49  }
50  }
51  return r;
52 }

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

15 {
16  amrex::Array<amrex::LinOpBCType,AMREX_SPACEDIM> r;
17  for (int dir = 0; dir < AMREX_SPACEDIM; ++dir) {
18  if ( lev_geom.isPeriodic(dir) )
19  {
20  r[dir] = LinOpBCType::Periodic;
21  } else {
22  auto bc_type = l_domain_bc_type[Orientation(dir,Orientation::low)];
23  if (bc_type == "Outflow" || bc_type == "Open") {
24  r[dir] = LinOpBCType::Dirichlet;
25  } else {
26  r[dir] = LinOpBCType::Neumann;
27  }
28  }
29  }
30  return r;
31 }

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

Here is the caller graph for this function: