1 #ifndef AMREX_ML_TENSOR_OP_H_
2 #define AMREX_ML_TENSOR_OP_H_
3 #include <AMReX_Config.H>
62 void setShearViscosity (
int amrlev,
const Array<MultiFab const*,AMREX_SPACEDIM>& eta);
64 void setBulkViscosity (
int amrlev,
const Array<MultiFab const*,AMREX_SPACEDIM>& kappa);
67 [[nodiscard]]
int getNComp () const final {
return AMREX_SPACEDIM; }
70 [[nodiscard]]
bool isTensorOp () const final {
return true; }
80 [[nodiscard]]
bool isSingular (
int ) const final {
return false; }
Definition: AMReX_MLABecLaplacian.H:15
typename MLLinOpT< MF >::Location Location
Definition: AMReX_MLABecLaplacian.H:22
bool needsUpdate() const override
Does it need update if it's reused?
Definition: AMReX_MLABecLaplacian.H:149
typename MLLinOpT< MF >::BCMode BCMode
Definition: AMReX_MLCellLinOp.H:28
typename MLLinOpT< MF >::StateMode StateMode
Definition: AMReX_MLCellLinOp.H:29
Definition: AMReX_MLMGBndry.H:12
Definition: AMReX_MLTensorOp.H:27
bool isTensorOp() const final
Definition: AMReX_MLTensorOp.H:70
void update() final
Update for reuse.
Definition: AMReX_MLTensorOp.H:75
bool m_has_kappa
Definition: AMReX_MLTensorOp.H:98
bool m_needs_update
Definition: AMReX_MLTensorOp.H:96
MLTensorOp(MLTensorOp &&)=delete
bool isBottomSingular() const final
Is the bottom of MG singular?
Definition: AMReX_MLTensorOp.H:81
void compVelGrad(int amrlev, const Array< MultiFab *, AMREX_SPACEDIM > &fluxes, MultiFab &sol, Location loc) const
Definition: AMReX_MLTensorOp_grad.cpp:133
MLTensorOp & operator=(const MLTensorOp &)=delete
void define(const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo(), const Vector< FabFactory< FArrayBox > const * > &a_factory={})
Definition: AMReX_MLTensorOp.cpp:39
MLTensorOp(const MLTensorOp &)=delete
~MLTensorOp() override=default
void setBulkViscosity(int amrlev, const Array< MultiFab const *, AMREX_SPACEDIM > &kappa)
Definition: AMReX_MLTensorOp.cpp:108
bool needsUpdate() const final
Does it need update if it's reused?
Definition: AMReX_MLTensorOp.H:72
bool isSingular(int) const final
Is it singular on given AMR level?
Definition: AMReX_MLTensorOp.H:80
void prepareForSolve() final
Definition: AMReX_MLTensorOp.cpp:128
Vector< Vector< Array< MultiFab, AMREX_SPACEDIM > > > m_kappa
Definition: AMReX_MLTensorOp.H:99
void compFlux(int amrlev, const Array< MultiFab *, AMREX_SPACEDIM > &fluxes, MultiFab &sol, Location loc) const override
Definition: AMReX_MLTensorOp_grad.cpp:7
bool isCrossStencil() const final
Definition: AMReX_MLTensorOp.H:69
void apply(int amrlev, int mglev, MultiFab &out, MultiFab &in, BCMode bc_mode, StateMode s_mode, const MLMGBndry *bndry=nullptr) const final
Definition: AMReX_MLTensorOp.cpp:200
int getNComp() const final
Return number of components.
Definition: AMReX_MLTensorOp.H:67
MLTensorOp()
Definition: AMReX_MLTensorOp.cpp:12
void setBCoeffs(int amrlev, const Array< MultiFab const *, AMREX_SPACEDIM > &beta)=delete
void setShearViscosity(int amrlev, const Array< MultiFab const *, AMREX_SPACEDIM > &eta)
Definition: AMReX_MLTensorOp.cpp:96
void applyBCTensor(int amrlev, int mglev, MultiFab &vel, BCMode bc_mode, StateMode s_mode, const MLMGBndry *bndry) const
Definition: AMReX_MLTensorOp.cpp:336
A collection (stored as an array) of FArrayBox objects.
Definition: AMReX_MultiFab.H:38
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition: AMReX_Vector.H:27
Definition: AMReX_Amr.cpp:49
void Abort(const std::string &msg)
Print out message to cerr and exit via abort().
Definition: AMReX.cpp:225
std::array< T, N > Array
Definition: AMReX_Array.H:24
Definition: AMReX_MLLinOp.H:35