DiffSolverIface< LinOp > Class Template Reference

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

#include <DiffusionOps.H>

Inheritance diagram for amr_wind::pde::DiffSolverIface< LinOp >:
[legend]
Collaboration diagram for amr_wind::pde::DiffSolverIface< LinOp >:
[legend]

Public Member Functions

 DiffSolverIface (PDEFields &fields, const bool has_overset, const bool mesh_mapping, const std::string &prefix="diffusion")
 
virtual ~DiffSolverIface ()=default
 
virtual void linsys_solve (const amrex::Real dt)
 
virtual void linsys_solve_impl ()
 
virtual void set_acoeffs (LinOp &linop, const FieldState fstate)
 
template<typename L >
void set_bcoeffs (L &linop, std::enable_if_t< std::is_same_v< L, amrex::MLTensorOp > > *=nullptr)
 
template<typename L >
void set_bcoeffs (L &linop, std::enable_if_t< std::is_same_v< L, amrex::MLABecLaplacian > > *=nullptr)
 

Protected Member Functions

virtual void setup_operator (LinOp &linop, const amrex::Real alpha, const amrex::Real beta, const FieldState fstate)
 Sets up the linear operator (e.g., setup BCs, etc.)
 
virtual void setup_solver (amrex::MLMG &mlmg)
 

Protected Attributes

PDEFieldsm_pdefields
 
Fieldm_density
 
MLMGOptions m_options
 
bool m_mesh_mapping {false}
 
std::unique_ptr< LinOp > m_solver
 
std::unique_ptr< LinOp > m_applier
 

Detailed Description

template<typename LinOp>
class amr_wind::pde::DiffSolverIface< LinOp >

Base class for all diffusion operators

This class provides the common operations for an implicit solution of a convection-diffusion equation within AMR-Wind.

Template Parameters
LinOpThe linear operator (see AMREeX docs)

Constructor & Destructor Documentation

◆ DiffSolverIface()

template<typename LinOp >
amr_wind::pde::DiffSolverIface< LinOp >::DiffSolverIface ( PDEFields & fields,
const bool has_overset,
const bool mesh_mapping,
const std::string & prefix = "diffusion" )

◆ ~DiffSolverIface()

template<typename LinOp >
virtual amr_wind::pde::DiffSolverIface< LinOp >::~DiffSolverIface ( )
virtualdefault

Member Function Documentation

◆ linsys_solve()

template<typename LinOp >
void amr_wind::pde::DiffSolverIface< LinOp >::linsys_solve ( const amrex::Real dt)
virtual

Implicit solve and update of a linear system

Parameters
dttimestep size

◆ linsys_solve_impl()

template<typename LinOp >
void amr_wind::pde::DiffSolverIface< LinOp >::linsys_solve_impl ( )
virtual

◆ set_acoeffs()

template<typename LinOp >
void amr_wind::pde::DiffSolverIface< LinOp >::set_acoeffs ( LinOp & linop,
const FieldState fstate )
virtual

◆ set_bcoeffs() [1/2]

template<typename LinOp >
template<typename L >
void amr_wind::pde::DiffSolverIface< LinOp >::set_bcoeffs ( L & linop,
std::enable_if_t< std::is_same_v< L, amrex::MLABecLaplacian > > * = nullptr )
inline

◆ set_bcoeffs() [2/2]

template<typename LinOp >
template<typename L >
void amr_wind::pde::DiffSolverIface< LinOp >::set_bcoeffs ( L & linop,
std::enable_if_t< std::is_same_v< L, amrex::MLTensorOp > > * = nullptr )
inline

◆ setup_operator()

template<typename LinOp >
void amr_wind::pde::DiffSolverIface< LinOp >::setup_operator ( LinOp & linop,
const amrex::Real alpha,
const amrex::Real beta,
const FieldState fstate )
protectedvirtual

Sets up the linear operator (e.g., setup BCs, etc.)

◆ setup_solver()

template<typename LinOp >
void amr_wind::pde::DiffSolverIface< LinOp >::setup_solver ( amrex::MLMG & mlmg)
protectedvirtual

Member Data Documentation

◆ m_applier

template<typename LinOp >
std::unique_ptr<LinOp> amr_wind::pde::DiffSolverIface< LinOp >::m_applier
protected

◆ m_density

template<typename LinOp >
Field& amr_wind::pde::DiffSolverIface< LinOp >::m_density
protected

◆ m_mesh_mapping

template<typename LinOp >
bool amr_wind::pde::DiffSolverIface< LinOp >::m_mesh_mapping {false}
protected

◆ m_options

template<typename LinOp >
MLMGOptions amr_wind::pde::DiffSolverIface< LinOp >::m_options
protected

◆ m_pdefields

template<typename LinOp >
PDEFields& amr_wind::pde::DiffSolverIface< LinOp >::m_pdefields
protected

◆ m_solver

template<typename LinOp >
std::unique_ptr<LinOp> amr_wind::pde::DiffSolverIface< LinOp >::m_solver
protected

The documentation for this class was generated from the following files:
  • /home/runner/work/amr-wind/amr-wind/amr-wind/equation_systems/DiffusionOps.H
  • /home/runner/work/amr-wind/amr-wind/amr-wind/equation_systems/DiffusionOps.cpp