6#ifndef MODEL_SOLID_AFFINE_CUBIC_H_
7#define MODEL_SOLID_AFFINE_CUBIC_H_
22 static constexpr const char *
name =
"cubic";
52 virtual void Print(std::ostream &out)
const override
66 ret.
F0 = Set::Matrix::Zero();
76 ret.
F0 = Set::Matrix::Random();
89 static Cubic Combine(
const std::vector<Cubic> &models,
const std::vector<Set::Scalar> &eta,
int order)
93 ret.
F0 = Set::Matrix::Zero();
97 for (
unsigned int n = 0 ; n < models.size(); n++) etasum += eta[n];
98 for (
unsigned int n = 0 ; n < models.size(); n++)
100 ret.
ddw += models[n].ddw * (eta[n] / etasum);
101 ret.
F0 += models[n].F0 * (eta[n] / etasum);
108 for (
unsigned int n = 0 ; n < models.size(); n++) etasum += eta[n]*eta[n];
109 for (
unsigned int n = 0 ; n < models.size(); n++)
111 ret.
ddw += models[n].ddw * (eta[n]*eta[n] / etasum);
112 ret.
F0 += models[n].F0 * (eta[n]*eta[n] / etasum);
121 #define OP_CLASS Cubic
122 #define OP_VARS X(ddw) X(F0)
142 if (
i==0)
return name +
".Cxxxx";
150 for (amrex::MFIter
mfi(
a_dst, amrex::TilingIfNotGPU());
mfi.isValid(); ++
mfi)
152 const amrex::Box&
bx =
mfi.growntilebox(amrex::IntVect(
a_nghost));
155 amrex::Array4<const Model::Solid::Affine::Cubic>
const &
src = ((*this)[
a_lev])->
array(
mfi);
156 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, std::string file="", std::string func="", int line=-1)
virtual void Print(std::ostream &out) const override
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())
Set::Matrix DW(const Set::Matrix &gradu) const override
static AMREX_FORCE_INLINE Cubic Combine(const std::vector< Cubic > &models, const std::vector< Set::Scalar > &eta, int order)
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())
Cubic(Linear::Cubic base)
Set::Scalar W(const Set::Matrix &gradu) const override
static void Parse(Cubic &value, IO::ParmParse &pp)
static Cubic Random(Set::Scalar C11, Set::Scalar C12, Set::Scalar C44)
static const KinematicVariable kinvar
static constexpr const char * name
Set::Matrix4< AMREX_SPACEDIM, Set::Sym::MajorMinor > DDW(const Set::Matrix &gradu) const override
Set::Matrix4< AMREX_SPACEDIM, Set::Sym::MajorMinor > DDW(const Set::Matrix &) const override
Set::Matrix DW(const Set::Matrix &gradu) const override
Set::Matrix4< AMREX_SPACEDIM, Set::Sym::MajorMinor > ddw
Set::Scalar W(const Set::Matrix &gradu) const override
void Define(Set::Scalar C11, Set::Scalar C12, Set::Scalar C44, Set::Scalar phi1, Set::Scalar Phi, Set::Scalar phi2)
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)