FieldFillPatchOps< BCOpCreator > Class Template Reference

AMR-Wind API: amr_wind::FieldFillPatchOps< BCOpCreator > Class Template Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches

#include <FieldFillPatchOps.H>

Inheritance diagram for amr_wind::FieldFillPatchOps< BCOpCreator >:
[legend]
Collaboration diagram for amr_wind::FieldFillPatchOps< BCOpCreator >:
[legend]

Public Types

using Functor = typename BCOpCreator::FunctorType
 

Public Member Functions

 FieldFillPatchOps (Field &field, const amrex::AmrCore &mesh, const SimTime &time, FieldInterpolator itype=FieldInterpolator::CellConsLinear, FieldInterpolator face_itype=FieldInterpolator::FaceDivFree)
 
 FieldFillPatchOps (Field &field, const amrex::AmrCore &mesh, const SimTime &time, const BCOpCreator &bc_op, FieldInterpolator itype=FieldInterpolator::CellConsLinear, FieldInterpolator face_itype=FieldInterpolator::FaceDivFree)
 
amrex::Vector< amrex::MultiFab * > get_mfab_vec (int lev)
 
void fillpatch (int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost, const FieldState fstate=FieldState::New) override
 
void fillpatch_sibling_fields (int lev, amrex::Real time, amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > &mfabs, amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > &ffabs, amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > &cfabs, const amrex::IntVect &nghost, const amrex::Vector< amrex::BCRec > &fillpatch_bcrec, const amrex::Vector< amrex::BCRec > &physbc_bcrec, const FieldState) override
 
void fillpatch_from_coarse (int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost, const FieldState fstate=FieldState::New) override
 Implementation that handles filling patches from a coarse to fine level.
 
void fillphysbc (int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost, const FieldState) override
 Implementation that handles filling physical boundary conditions.
 
void set_inflow (int lev, amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost, const FieldState) override
 
void set_inflow_sibling_fields (const int lev, const amrex::Real time, const amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > mfabs) override
 
- Public Member Functions inherited from amr_wind::FieldFillPatchOpsBase
 FieldFillPatchOpsBase ()=default
 
virtual ~FieldFillPatchOpsBase ()=default
 
virtual void set_inflow_sibling_fields (const int lev, const amrex::Real time, amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > mfabs)=0
 

Protected Member Functions

Functor bc_functor ()
 
Functor bc_functor_face (const int face_dir)
 
void check_face_mapper ()
 

Protected Attributes

const SimTimem_time
 
const amrex::AmrCore & m_mesh
 
Fieldm_field
 
const BCOpCreator m_op
 
amrex::Interpolater * m_mapper
 Function that handles interpolation from coarse to fine level.
 
amrex::Interpolater * m_face_mapper
 Function that handles interpolation from coarse to fine level for faces.
 

Detailed Description

template<typename BCOpCreator>
class amr_wind::FieldFillPatchOps< BCOpCreator >

Concrete implementation of filling patches and boundary conditions on multi-level AMR meshes.

Member Typedef Documentation

◆ Functor

template<typename BCOpCreator >
using amr_wind::FieldFillPatchOps< BCOpCreator >::Functor = typename BCOpCreator::FunctorType

Constructor & Destructor Documentation

◆ FieldFillPatchOps() [1/2]

template<typename BCOpCreator >
amr_wind::FieldFillPatchOps< BCOpCreator >::FieldFillPatchOps ( Field & field,
const amrex::AmrCore & mesh,
const SimTime & time,
FieldInterpolator itype = FieldInterpolator::CellConsLinear,
FieldInterpolator face_itype = FieldInterpolator::FaceDivFree )
inline
Parameters
fieldField whose patches are filled by this instance
meshThe mesh instance to determine amrex::Geometry at a level
timeTime instance
itypeInterpolation type (default: conservative cell linear)
face_itypeFace interpolation type (default: face divergence free)

◆ FieldFillPatchOps() [2/2]

template<typename BCOpCreator >
amr_wind::FieldFillPatchOps< BCOpCreator >::FieldFillPatchOps ( Field & field,
const amrex::AmrCore & mesh,
const SimTime & time,
const BCOpCreator & bc_op,
FieldInterpolator itype = FieldInterpolator::CellConsLinear,
FieldInterpolator face_itype = FieldInterpolator::FaceDivFree )
inline

Member Function Documentation

◆ bc_functor()

template<typename BCOpCreator >
Functor amr_wind::FieldFillPatchOps< BCOpCreator >::bc_functor ( )
inlineprotected

◆ bc_functor_face()

template<typename BCOpCreator >
Functor amr_wind::FieldFillPatchOps< BCOpCreator >::bc_functor_face ( const int face_dir)
inlineprotected

◆ check_face_mapper()

template<typename BCOpCreator >
void amr_wind::FieldFillPatchOps< BCOpCreator >::check_face_mapper ( )
inlineprotected

◆ fillpatch()

template<typename BCOpCreator >
void amr_wind::FieldFillPatchOps< BCOpCreator >::fillpatch ( int lev,
amrex::Real time,
amrex::MultiFab & mfab,
const amrex::IntVect & nghost,
const FieldState fstate = FieldState::New )
inlineoverridevirtual

Implementation that handles filling patches on a single level as well as across a coarse-fine interface.

Implements amr_wind::FieldFillPatchOpsBase.

◆ fillpatch_from_coarse()

template<typename BCOpCreator >
void amr_wind::FieldFillPatchOps< BCOpCreator >::fillpatch_from_coarse ( int lev,
amrex::Real time,
amrex::MultiFab & mfab,
const amrex::IntVect & nghost,
const FieldState fstate = FieldState::New )
inlineoverridevirtual

Implementation that handles filling patches from a coarse to fine level.

Implements amr_wind::FieldFillPatchOpsBase.

◆ fillpatch_sibling_fields()

template<typename BCOpCreator >
void amr_wind::FieldFillPatchOps< BCOpCreator >::fillpatch_sibling_fields ( int lev,
amrex::Real time,
amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > & mfabs,
amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > & ffabs,
amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > & cfabs,
const amrex::IntVect & nghost,
const amrex::Vector< amrex::BCRec > & fillpatch_bcrec,
const amrex::Vector< amrex::BCRec > & physbc_bcrec,
const FieldState fstate )
inlineoverridevirtual

Implementation that handles filling patches on a single level as well as across a coarse-fine interface, for an array of different fields

Implements amr_wind::FieldFillPatchOpsBase.

◆ fillphysbc()

template<typename BCOpCreator >
void amr_wind::FieldFillPatchOps< BCOpCreator >::fillphysbc ( int lev,
amrex::Real time,
amrex::MultiFab & mfab,
const amrex::IntVect & nghost,
const FieldState fstate )
inlineoverridevirtual

Implementation that handles filling physical boundary conditions.

Implements amr_wind::FieldFillPatchOpsBase.

◆ get_mfab_vec()

template<typename BCOpCreator >
amrex::Vector< amrex::MultiFab * > amr_wind::FieldFillPatchOps< BCOpCreator >::get_mfab_vec ( int lev)
inline

Utility function to get a vector of multifabs for over states

Returns one or two multifabs at a given level depending on whether the field was registered with states. When two states are returned the first one is the Old state and the second one is the New state.

◆ set_inflow()

template<typename BCOpCreator >
void amr_wind::FieldFillPatchOps< BCOpCreator >::set_inflow ( int lev,
amrex::Real time,
amrex::MultiFab & mfab,
const amrex::IntVect & nghost,
const FieldState  )
inlineoverridevirtual

◆ set_inflow_sibling_fields()

template<typename BCOpCreator >
void amr_wind::FieldFillPatchOps< BCOpCreator >::set_inflow_sibling_fields ( const int lev,
const amrex::Real time,
const amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > mfabs )
inlineoverride

Member Data Documentation

◆ m_face_mapper

template<typename BCOpCreator >
amrex::Interpolater* amr_wind::FieldFillPatchOps< BCOpCreator >::m_face_mapper
protected

Function that handles interpolation from coarse to fine level for faces.

◆ m_field

template<typename BCOpCreator >
Field& amr_wind::FieldFillPatchOps< BCOpCreator >::m_field
protected

◆ m_mapper

template<typename BCOpCreator >
amrex::Interpolater* amr_wind::FieldFillPatchOps< BCOpCreator >::m_mapper
protected

Function that handles interpolation from coarse to fine level.

◆ m_mesh

template<typename BCOpCreator >
const amrex::AmrCore& amr_wind::FieldFillPatchOps< BCOpCreator >::m_mesh
protected

◆ m_op

template<typename BCOpCreator >
const BCOpCreator amr_wind::FieldFillPatchOps< BCOpCreator >::m_op
protected

◆ m_time

template<typename BCOpCreator >
const SimTime& amr_wind::FieldFillPatchOps< BCOpCreator >::m_time
protected

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