|
Alamo
|
#include <Elastic.H>
Public Types | |
| enum class | BC { Displacement , Traction , Periodic , Neumann } |
| enum class | Boundary { Lo , Hi , 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, bool a_conservative_face_flux=false) | |
| 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={}, bool a_conservative_face_flux=false) |
| 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 | SyncCoefficients () |
| 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 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 | interpolationAmr (int famrlev, MultiFab &fine, const MultiFab &crse, IntVect const &nghost) 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 |
| 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 |
| bool | useQuadraticAmrInterpolation () const override |
| bool | relaxCoarseFineGhostRows () const override |
| virtual void | prepareForSolve () override |
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 amrex::Periodicity &p) |
| void | FillBoundaryCoeff (MultiFab &psi, const amrex::Periodicity &p) |
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_conservative_face_flux = 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, | ||
| bool | a_conservative_face_flux = false |
||
| ) |
Definition at line 10 of file Elastic.cpp.
|
virtual |
Definition at line 23 of file Elastic.cpp.
|
delete |
|
delete |
|
overrideprivatevirtual |
Implements Operator::Operator< Grid::Node >.
Definition at line 738 of file Elastic.cpp.
|
private |
Definition at line 761 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 888 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 = {}, |
||
| bool | a_conservative_face_flux = false |
||
| ) |
Definition at line 28 of file Elastic.cpp.
|
overrideprotectedvirtual |
Reimplemented from Operator::Operator< Grid::Node >.
Definition at line 370 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 685 of file Elastic.cpp.
| void Operator::Elastic< SYM >::Error0x | ( | int | amrlev, |
| int | mglev, | ||
| MultiFab & | R0x, | ||
| const MultiFab & | x | ||
| ) | const |
Definition at line 515 of file Elastic.cpp.
|
finaloverrideprotectedvirtual |
Implements Operator::Operator< Grid::Node >.
Definition at line 158 of file Elastic.cpp.
|
finalprotectedvirtual |
Definition at line 542 of file Elastic.cpp.
|
private |
Definition at line 1077 of file Elastic.cpp.
|
private |
Definition at line 1069 of file Elastic.cpp.
|
inline |
|
inlineoverrideprotectedvirtual |
|
inlineprotectedvirtual |
|
delete |
|
delete |
|
inlinestatic |
|
inlineoverrideprotectedvirtual |
Reimplemented from Operator::Operator< Grid::Node >.
|
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 67 of file Elastic.cpp.
| void Operator::Elastic< SYM >::SetPsi | ( | int | amrlev, |
| const amrex::MultiFab & | a_psi | ||
| ) |
Definition at line 137 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 559 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 620 of file Elastic.cpp.
|
inlineoverrideprotectedvirtual |
Reimplemented from Operator::Operator< Grid::Node >.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |