6#ifndef MODEL_SOLID_AFFINE_CUBIC_H_
7#define MODEL_SOLID_AFFINE_CUBIC_H_
22 static constexpr const char *
name =
"cubic";
52 void Print(std::ostream &out)
const
67 ret.
F0 = Set::Matrix::Zero();
78 ret.
F0 = Set::Matrix::Random();
91 static Cubic Combine(
const std::vector<Cubic> &models,
const std::vector<Set::Scalar> &eta,
int order)
95 ret.
F0 = Set::Matrix::Zero();
99 for (
unsigned int n = 0 ; n < models.size(); n++) etasum += eta[n];
100 for (
unsigned int n = 0 ; n < models.size(); n++)
102 ret.
ddw += models[n].ddw * (eta[n] / etasum);
103 ret.
F0 += models[n].F0 * (eta[n] / etasum);
110 for (
unsigned int n = 0 ; n < models.size(); n++) etasum += eta[n]*eta[n];
111 for (
unsigned int n = 0 ; n < models.size(); n++)
113 ret.
ddw += models[n].ddw * (eta[n]*eta[n] / etasum);
114 ret.
F0 += models[n].F0 * (eta[n]*eta[n] / etasum);
123 #define OP_CLASS Cubic
124 #define OP_VARS X(ddw) X(F0)
144 if (
i==0)
return name +
".Cxxxx";
152 for (amrex::MFIter
mfi(
a_dst, amrex::TilingIfNotGPU());
mfi.isValid(); ++
mfi)
154 const amrex::Box&
bx =
mfi.growntilebox(amrex::IntVect(
a_nghost));
157 amrex::Array4<const Model::Solid::Affine::Cubic>
const &
src = ((*this)[
a_lev])->
array(
mfi);
158 amrex::Array4<Set::Scalar>
const &
dst =
a_dst.array(
mfi);
#define ALAMO_SINGLE_DEFINITION
bool contains(std::string name)
void queryclass(std::string name, T *value)
AMREX_FORCE_INLINE void SetF0(Set::Matrix &a_F0)
void Define(Set::Scalar C11, Set::Scalar C12, Set::Scalar C44, Eigen::Matrix3d R, Set::Matrix a_F0=Set::Matrix::Zero())
static AMREX_FORCE_INLINE Cubic Combine(const std::vector< Cubic > &models, const std::vector< Set::Scalar > &eta, int order)
Set::Matrix4< AMREX_SPACEDIM, Set::Sym::MajorMinor > DDW(const Set::Matrix &gradu) const
void Define(Set::Scalar C11, Set::Scalar C12, Set::Scalar C44, Set::Scalar phi1, Set::Scalar Phi, Set::Scalar phi2, Set::Matrix a_F0=Set::Matrix::Zero())
Set::Matrix DW(const Set::Matrix &gradu) const
static void Parse(Cubic &value, IO::ParmParse &pp)
static Cubic Random(Set::Scalar C11, Set::Scalar C12, Set::Scalar C44)
void Print(std::ostream &out) const
Set::Scalar W(const Set::Matrix &gradu) const
static const KinematicVariable kinvar
static constexpr const char * name
Set::Matrix4< AMREX_SPACEDIM, Set::Sym::MajorMinor > ddw
Set::Matrix DW(const Set::Matrix &gradu) const
Set::Matrix4< AMREX_SPACEDIM, Set::Sym::MajorMinor > DDW(const Set::Matrix &) const
void Define(Set::Scalar C11, Set::Scalar C12, Set::Scalar C44, Set::Scalar phi1, Set::Scalar Phi, Set::Scalar phi2)
Set::Scalar W(const Set::Matrix &gradu) const
std::string Name(int) const
void Copy(int, amrex::MultiFab &, int, int) const
Eigen::Matrix< amrex::Real, AMREX_SPACEDIM, 1 > Vector
Eigen::Matrix< amrex::Real, AMREX_SPACEDIM, AMREX_SPACEDIM > Matrix
void Exception(std::string file, std::string func, int line, Args const &... args)