Alamo
|
Public Types | |
enum | BC { BC::Displacement, BC::Traction, BC::Periodic, BC::Neumann } |
enum | Boundary { Boundary::Lo, Boundary::Hi, Boundary::None } |
Public Member Functions | |
Elastic () | |
Elastic (const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info) | |
virtual | ~Elastic () |
Elastic (const Elastic &)=delete | |
Elastic (Elastic &&)=delete | |
Elastic & | operator= (const Elastic &)=delete |
Elastic & | operator= (Elastic &&)=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={}) |
virtual void | SetHomogeneous (bool a_homogeneous) override |
void | SetModel (Set::Matrix4< AMREX_SPACEDIM, SYM > &a_model) |
void | SetModel (int amrlev, const MultiTab &a_model) |
void | SetModel (const amrex::Vector< MultiTab > &a_model) |
void | SetModel (const Set::Field< Set::Matrix4< AMREX_SPACEDIM, SYM >> &a_model) |
void | SetPsi (int amrlev, const amrex::MultiFab &a_psi) |
void | SetPsi (int amrlev, const amrex::MultiFab &a_psi, const Set::Scalar &a_psi_small) |
void | SetBC (::BC::Operator::Elastic::Elastic *a_bc) |
::BC::Operator::Elastic::Elastic & | GetBC () |
void | Strain (int amrlev, amrex::MultiFab &epsfab, const amrex::MultiFab &ufab, bool voigt=false) const |
void | Stress (int amrlev, amrex::MultiFab &sigmafab, const amrex::MultiFab &ufab, bool voigt=false, bool a_homogeneous=false) |
void | Energy (int amrlev, amrex::MultiFab &energy, const amrex::MultiFab &u, bool a_homogeneous=false) |
void | SetBC (const std::array< std::array< BC, AMREX_SPACEDIM >, AMREX_SPACEDIM > &a_bc_lo, const std::array< std::array< BC, AMREX_SPACEDIM >, AMREX_SPACEDIM > &a_bc_hi) |
void | Error0x (int amrlev, int mglev, MultiFab &R0x, const MultiFab &x) const |
void | SetTesting (bool a_testing) |
void | SetUniform (bool a_uniform) |
virtual void | SetAverageDownCoeffs (bool a_average_down_coeffs) override |
Public Member Functions inherited from Operator::Operator< Grid::Node > | |
Operator () | |
Operator (const amrex::Vector< amrex::Geometry > &a_geom, const amrex::Vector< amrex::BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo(), const Vector< FabFactory< FArrayBox > const * > &a_factory={}) | |
virtual | ~Operator () |
Operator (const Operator &)=delete | |
Operator (Operator &&)=delete | |
Operator & | operator= (const Operator &)=delete |
Operator & | operator= (Operator &&)=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={}) |
const Geometry & | Geom (int amr_lev, int mglev=0) const noexcept |
void | Reflux (int crse_amrlev, MultiFab &res, const MultiFab &crse_sol, const MultiFab &crse_rhs, MultiFab &fine_res, MultiFab &fine_sol, const MultiFab &fine_rhs) |
void | Apply (int amrlev, int mglev, MultiFab &out, const MultiFab &in) const |
void | SetOmega (Set::Scalar a_omega) |
void | SetNormalizeDDW (bool a_normalize_ddw) |
void | RegisterNewFab (amrex::Vector< amrex::MultiFab > &input) |
void | RegisterNewFab (amrex::Vector< std::unique_ptr< amrex::MultiFab > > &input) |
const amrex::FArrayBox & | GetFab (const int num, const int amrlev, const int mglev, const amrex::MFIter &mfi) const |
virtual int | getNGrow (int=0, int=0) const override final |
virtual void | solutionResidual (int amrlev, MultiFab &resid, MultiFab &x, const MultiFab &b, const MultiFab *crse_bcdata=nullptr) override final |
virtual void | correctionResidual (int amrlev, int mglev, MultiFab &resid, MultiFab &x, const MultiFab &b, BCMode bc_mode, const MultiFab *crse_bcdata=nullptr) override final |
Static Public Member Functions | |
static void | Parse (Elastic< SYM > &value, IO::ParmParse &pp) |
Static Public Member Functions inherited from Operator::Operator< Grid::Node > | |
static void | realFillBoundary (MultiFab &phi, const Geometry &geom) |
Protected Member Functions | |
virtual void | Diagonal (int amrlev, int mglev, amrex::MultiFab &diag) override |
virtual void | Fapply (int amrlev, int mglev, MultiFab &out, const MultiFab &in) const override final |
virtual void | FFlux (int amrlev, const MFIter &mfi, const std::array< FArrayBox *, AMREX_SPACEDIM > &flux, const FArrayBox &sol, const int face_only=0) const final |
virtual int | getNComp () const override |
virtual bool | isCrossStencil () const |
virtual void | prepareForSolve () override |
Protected Member Functions inherited from Operator::Operator< Grid::Node > | |
virtual void | Diagonal (bool recompute=false) |
virtual void | Fsmooth (int amrlev, int mglev, MultiFab &x, const MultiFab &b) const override |
virtual void | normalize (int amrlev, int mglev, MultiFab &mf) const override |
virtual void | reflux (int crse_amrlev, MultiFab &res, const MultiFab &crse_sol, const MultiFab &crse_rhs, MultiFab &fine_res, MultiFab &fine_sol, const MultiFab &fine_rhs) const override |
virtual void | restriction (int amrlev, int cmglev, MultiFab &crse, MultiFab &fine) const final |
virtual void | interpolation (int amrlev, int fmglev, MultiFab &fine, const MultiFab &crse) const override final |
virtual void | averageDownSolutionRHS (int camrlev, MultiFab &crse_sol, MultiFab &crse_rhs, const MultiFab &fine_sol, const MultiFab &fine_rhs) final |
virtual bool | isSingular (int amrlev) const final |
virtual bool | isBottomSingular () const final |
virtual void | applyBC (int amrlev, int mglev, MultiFab &phi, BCMode bc_mode, amrex::MLLinOp::StateMode, bool skip_fillboundary=false) const final |
virtual void | fixUpResidualMask (int amrlev, iMultiFab &resmsk) final |
Private Types | |
using | MATRIX4 = Set::Matrix4< AMREX_SPACEDIM, SYM > |
using | TArrayBox = amrex::BaseFab< MATRIX4 > |
using | MultiTab = amrex::FabArray< TArrayBox > |
Private Member Functions | |
virtual void | averageDownCoeffs () override |
void | averageDownCoeffsDifferentAmrLevels (int fine_amrlev) |
void | averageDownCoeffsSameAmrLevel (int amrlev) |
void | FillBoundaryCoeff (MultiTab &sigma, const Geometry &geom) |
void | FillBoundaryCoeff (MultiFab &psi, const Geometry &geom) |
Private Attributes | |
std::array< std::array< BC, AMREX_SPACEDIM >, AMREX_SPACEDIM > | m_bc_lo |
std::array< std::array< BC, AMREX_SPACEDIM >, AMREX_SPACEDIM > | m_bc_hi |
amrex::Vector< Set::Field< Set::Matrix4< AMREX_SPACEDIM, SYM > > > | m_ddw_mf |
amrex::Vector< Set::Field< Set::Scalar > > | m_psi_mf |
Set::Scalar | m_psi_small = 1E-8 |
bool | m_psi_set = false |
bool | m_testing = false |
bool | m_uniform = false |
bool | m_homogeneous = false |
bool | m_average_down_coeffs = false |
::BC::Operator::Elastic::Elastic * | m_bc |
bool | m_model_set = false |
bool | m_bc_set = false |
Additional Inherited Members | |
Protected Attributes inherited from Operator::Operator< Grid::Node > | |
int | m_num_a_fabs = 0 |
bool | m_diagonal_computed = false |
amrex::Vector< amrex::Vector< amrex::Vector< amrex::MultiFab > > > | m_a_coeffs |
amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab > > > | m_diag |
Set::Scalar | m_omega = 2./3. |
bool | m_normalize_ddw = false |
|
private |
|
private |
|
private |
|
strong |
|
strong |
|
inline |
Operator::Elastic< SYM >::Elastic | ( | const Vector< Geometry > & | a_geom, |
const Vector< BoxArray > & | a_grids, | ||
const Vector< DistributionMapping > & | a_dmap, | ||
const LPInfo & | a_info | ||
) |
Definition at line 10 of file Elastic.cpp.
|
virtual |
Definition at line 21 of file Elastic.cpp.
|
delete |
|
delete |
|
overrideprivatevirtual |
Implements Operator::Operator< Grid::Node >.
Definition at line 582 of file Elastic.cpp.
|
private |
Definition at line 605 of file Elastic.cpp.
|
private |
Update coarse-level AMR coefficients with data from fine level.
This function is called before the solve, and it updates the Matrix4 coefficients on coarse levels with averaged versions on the fine levels. Typically, this is not necessary, since the coefficients are computed on each level already. However, there are some cases where this messes up the multigrid solver. (Phase field fracture is the primary example.)
This is disabled by default. In order to enable, call
elasticoperator.SetAverageDownCoeffs(true);
Definition at line 720 of file Elastic.cpp.
void Operator::Elastic< SYM >::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 at line 26 of file Elastic.cpp.
|
overrideprotectedvirtual |
Reimplemented from Operator::Operator< Grid::Node >.
Definition at line 272 of file Elastic.cpp.
void Operator::Elastic< SYM >::Energy | ( | int | amrlev, |
amrex::MultiFab & | energy, | ||
const amrex::MultiFab & | u, | ||
bool | a_homogeneous = false |
||
) |
Compute energy density \(\mathbb{W}\) given the displacement field \(\mathbf{u}\) by
\[\mathbb{W} = \mathbb{\Sigma}\mathbb{\Sigma}\mathbf{\sigma}_{ij}\mathbf{\epsilon}_{ij}\]
where \(\mathbf{\sigma}\) and \(\mathbf{\epsilon}\) are as defined above
Definition at line 529 of file Elastic.cpp.
void Operator::Elastic< SYM >::Error0x | ( | int | amrlev, |
int | mglev, | ||
MultiFab & | R0x, | ||
const MultiFab & | x | ||
) | const |
Definition at line 359 of file Elastic.cpp.
|
finaloverrideprotectedvirtual |
Implements Operator::Operator< Grid::Node >.
Definition at line 147 of file Elastic.cpp.
|
finalprotectedvirtual |
Definition at line 386 of file Elastic.cpp.
|
private |
Definition at line 901 of file Elastic.cpp.
|
private |
Definition at line 883 of file Elastic.cpp.
|
inline |
|
inlineoverrideprotectedvirtual |
|
inlineprotectedvirtual |
|
delete |
|
delete |
|
inlinestatic |
|
inlineoverrideprotectedvirtual |
Reimplemented from Operator::Operator< Grid::Node >.
|
inlineoverridevirtual |
Reimplemented from Operator::Operator< Grid::Node >.
|
inline |
The different types of Boundary Condtiions are listed in the BC::Operator::Elastic
documentation
|
inline |
|
inlineoverridevirtual |
Reimplemented from Operator::Operator< Grid::Node >.
|
inline |
|
inline |
void Operator::Elastic< SYM >::SetModel | ( | int | amrlev, |
const MultiTab & | a_model | ||
) |
void Operator::Elastic< SYM >::SetModel | ( | Set::Matrix4< AMREX_SPACEDIM, SYM > & | a_model | ) |
Definition at line 59 of file Elastic.cpp.
void Operator::Elastic< SYM >::SetPsi | ( | int | amrlev, |
const amrex::MultiFab & | a_psi | ||
) |
Definition at line 126 of file Elastic.cpp.
|
inline |
|
inline |
|
inline |
void Operator::Elastic< SYM >::Strain | ( | int | amrlev, |
amrex::MultiFab & | epsfab, | ||
const amrex::MultiFab & | ufab, | ||
bool | voigt = false |
||
) | const |
Compute strain \(\mathbf{\epsilon}\) given the displacement field \(\mathbf{u}\) by
\[\mathbf{\epsilon}_{ij} = \frac{1}{2}(u_{i,j} + u_{j,i})\]
Definition at line 403 of file Elastic.cpp.
void Operator::Elastic< SYM >::Stress | ( | int | amrlev, |
amrex::MultiFab & | sigmafab, | ||
const amrex::MultiFab & | ufab, | ||
bool | voigt = false , |
||
bool | a_homogeneous = false |
||
) |
Compute stress \(\mathbf{\sigma}\) given the displacement field \(\mathbf{u}\) by
\[\mathbf{\sigma}_{ij} = \mathbb{C}_{ijkl}\,u_{k,l}\]
where, \(\mathbb{C}\) is furnished by the templated model
Definition at line 464 of file Elastic.cpp.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |