FieldFillPatchOps< BCOpCreator > Class Template Reference

Kynema-SGF API: kynema_sgf::FieldFillPatchOps< BCOpCreator > Class Template Reference
Kynema-SGF API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches

#include <FieldFillPatchOps.H>

Inheritance diagram for kynema_sgf::FieldFillPatchOps< BCOpCreator >:
[legend]
Collaboration diagram for kynema_sgf::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
 Implementation that handles filling patches on a single level as well as across a coarse-fine interface.
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
 Implementation that handles filling patches on a single level as well as across a coarse-fine interface, for an array of different fields.
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 kynema_sgf::FieldFillPatchOpsBase
 FieldFillPatchOpsBase ()=default
virtual ~FieldFillPatchOpsBase ()=default
virtual void set_inflow_sibling_fields (int lev, 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 kynema_sgf::FieldFillPatchOps< BCOpCreator >

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

Member Typedef Documentation

◆ Functor

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

Constructor & Destructor Documentation

◆ FieldFillPatchOps() [1/2]

template<typename BCOpCreator>
kynema_sgf::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>
kynema_sgf::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 kynema_sgf::FieldFillPatchOps< BCOpCreator >::bc_functor ( )
inlineprotected

◆ bc_functor_face()

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

◆ check_face_mapper()

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

◆ fillpatch()

template<typename BCOpCreator>
void kynema_sgf::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 kynema_sgf::FieldFillPatchOpsBase.

Reimplemented in kynema_sgf::FillMPL, kynema_sgf::OceanWavesFillInflow, and kynema_sgf::PlaneFillInflow.

◆ fillpatch_from_coarse()

template<typename BCOpCreator>
void kynema_sgf::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 kynema_sgf::FieldFillPatchOpsBase.

Reimplemented in kynema_sgf::FillMPL, kynema_sgf::OceanWavesFillInflow, and kynema_sgf::PlaneFillInflow.

◆ fillpatch_sibling_fields()

template<typename BCOpCreator>
void kynema_sgf::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 kynema_sgf::FieldFillPatchOpsBase.

Reimplemented in kynema_sgf::FillMPL, kynema_sgf::OceanWavesFillInflow, and kynema_sgf::PlaneFillInflow.

◆ fillphysbc()

template<typename BCOpCreator>
void kynema_sgf::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 kynema_sgf::FieldFillPatchOpsBase.

Reimplemented in kynema_sgf::FillMPL, kynema_sgf::OceanWavesFillInflow, and kynema_sgf::PlaneFillInflow.

◆ get_mfab_vec()

template<typename BCOpCreator>
amrex::Vector< amrex::MultiFab * > kynema_sgf::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 kynema_sgf::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 kynema_sgf::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* kynema_sgf::FieldFillPatchOps< BCOpCreator >::m_face_mapper
protected

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

◆ m_field

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

◆ m_mapper

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

Function that handles interpolation from coarse to fine level.

◆ m_mesh

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

◆ m_op

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

◆ m_time

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

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