Inputs


BC

BC::BC

src/BC/BC.cpp src/BC/BC.H

This is the mechanism for impositing boundary conditions on Set::Field objects of scalar type. Typical convention is for [prefix] to be given by the field name. For instance,

bc.temp.type.xhi = dirichlet dirichlet dirichlet
bc.temp.val.xhi  = 0.0 1.0 0.0

corresponds to the boundary condition for temperature. See the specific integrator for details.

API definitions in src/BC/BC.H

Classes

  • BC::BC

    Methods

    • ~BC()

    • define(const amrex::Geometry &a_geom)

    • FillBoundary(amrex::BaseFab< T > &in, const amrex::Box &box, int ngrow, int dcomp, int ncomp, amrex::Real time, Orientation face=Orientation::All, const amrex::Mask *mask=nullptr)=0

    • FillBoundary(amrex::FabArray< amrex::BaseFab< T > > &mf, int dcomp, int ncomp, amrex::Real time, int)

    • FillBoundary(amrex::FabArray< amrex::BaseFab< T > > &mf, int dcomp, int ncomp, amrex::IntVect const &, amrex::Real time, int bccomp)

    • operator()(amrex::FabArray< amrex::BaseFab< T > > &mf, int dcomp, int ncomp, amrex::IntVect const &, amrex::Real time, int bccomp)

    • FillBoundary(amrex::MultiFab &mf, int dcomp, int ncomp, amrex::Real time, int)

    • operator()(amrex::MultiFab &mf, int dcomp, int ncomp, amrex::IntVect const &, amrex::Real time, int bccomp)

    • GetBCRec()=0

    • IsPeriodic()

    • Periodicity() const

    • Periodicity(const amrex::Box &b)

    Variables

    • amrex::Geometry BC::BC< T >::m_geom

BC::Constant

src/BC/Constant.cpp src/BC/Constant.H

This is the most commonly used standard boundary condition implementation. The name “Constant” refers to the invariance of the BC value or character along each face of the simulation domain; however, you may cause a change in the value with time by using a Numeric::Interpolator::Linear string.

The BC on each face is specified with a type string that specifies the nature of the BC, and a val that specifies the value. By default, all types are Dirichlet and all values are 0.0. The complete list of BC types are below:

Dirichlet boundary condition types can be specified with Dirichlet, dirichlet, EXT_DIR. Neumann boundary condition types are specified with Neumann, neumann. Periodic boundary conditions can be specified with Periodic, periodic, INT_DIR. Important: Ensure that your geometry is specified to be periodic using geometry.is_periodic. For instance, if periodic in x, set to 1 0 0

The BC values can be specified either as a number (e.g. 1.0) or using a linear interpolator string (e.g. (0,1:2.3,-0.1)).

The number of values and types must be either 0 (for defaults), 1 (to set the same for all field components) or N (where N=number of field components).

Parameter

Type

Values

type.xlo

BC type on the lower x edge (2d) face (3d)

dirichlet

type.xhi

BC type on the upper x edge (2d) face (3d)

dirichlet

type.ylo

BC type on the lower y edge (2d) face (3d)

dirichlet

type.yhi

BC type on the upper y edge (2d) face (3d)

dirichlet

type.zlo

BC type on the lower z face (processed but ignored in 2d to prevent unused input errors)

dirichlet

type.zhi

BC type on the upper z face (processed but ignored in 2d to prevent unused input errors)

dirichlet

val.xlo

BC value on the lower x edge (2d) face (3d)

0.0

val.xhi

BC value on the upper x edge (2d) face (3d)

0.0

val.ylo

BC value on the lower y edge (2d) face (3d)

0.0

val.yhi

BC value on the upper y edge (2d) face (3d)

0.0

val.zlo

BC value on the lower z face (processed but ignored in 2d to prevent unused input errors)

0.0

val.zhi

BC value on the upper z face (processed but ignored in 2d to prevent unused input errors)

0.0

API definitions in src/BC/Constant.H

Classes

  • BC::Constant

    Methods

    • Constant(int a_ncomp)

    • Constant(int a_ncomp, IO::ParmParse &pp, std::string name)

    • Constant(int ncomp, amrex::Vector< std::string > bc_hi_str, amrex::Vector< std::string > bc_lo_str, AMREX_D_DECL(amrex::Vector< amrex::Real > _bc_lo_1, amrex::Vector< amrex::Real > _bc_lo_2, amrex::Vector< amrex::Real > _bc_lo_3), AMREX_D_DECL(amrex::Vector< amrex::Real > _bc_hi_1, amrex::Vector< amrex::Real > _bc_hi_2, amrex::Vector< amrex::Real > _bc_hi_3))

    • ~Constant()

    • FillBoundary(amrex::BaseFab< Set::Scalar > &in, const amrex::Box &box, int ngrow, int dcomp, int ncomp, amrex::Real time, Orientation face=Orientation::All, const amrex::Mask *mask=nullptr) override

    • GetBCRec() override

    • IsPeriodic() override

    • Periodicity() const override

    • Periodicity(const amrex::Box &b) override

    • GetBCTypes()

    • FillBoundary(amrex::BaseFab< T > &in, const amrex::Box &box, int ngrow, int dcomp, int ncomp, amrex::Real time, Orientation face=Orientation::All, const amrex::Mask *mask=nullptr)=0

    • FillBoundary(amrex::FabArray< amrex::BaseFab< T > > &mf, int dcomp, int ncomp, amrex::Real time, int)

    • FillBoundary(amrex::FabArray< amrex::BaseFab< T > > &mf, int dcomp, int ncomp, amrex::IntVect const &, amrex::Real time, int bccomp)

    • FillBoundary(amrex::MultiFab &mf, int dcomp, int ncomp, amrex::Real time, int)

    Variables

    • unsigned int BC::Constant::m_ncomp

    • std::array<std::vector<int>, m_nfaces> BC::Constant::m_bc_type

    • std::array<std::vector<Numeric::Interpolator::Linear<Set::Scalar> >, m_nfaces> BC::Constant::m_bc_val

BC::Expression

src/BC/Expression.cpp src/BC/Expression.H

Boundary condition similar to BC::Constant, except that “values” are given as strings which are functions of x,y,z,t.

Parameter

Type

Values

type.xlo

BC type on the lower x edge (2d) face (3d)

dirichlet

type.xhi

BC type on the upper x edge (2d) face (3d)

dirichlet

type.ylo

BC type on the lower y edge (2d) face (3d)

dirichlet

type.yhi

BC type on the upper y edge (2d) face (3d)

dirichlet

type.zlo

BC type on the lower z face (processed but ignored in 2d to prevent unused input errors)

dirichlet

type.zhi

BC type on the upper z face (processed but ignored in 2d to prevent unused input errors)

dirichlet

API definitions in src/BC/Expression.H

Classes

  • BC::Expression

    Methods

    • Expression(int a_ncomp)

    • Expression(int a_ncomp, IO::ParmParse &pp, std::string name)

    • ~Expression()

    • FillBoundary(amrex::BaseFab< Set::Scalar > &in, const amrex::Box &box, int ngrow, int dcomp, int ncomp, amrex::Real time, Orientation face=Orientation::All, const amrex::Mask *mask=nullptr) override

    • GetBCRec() override

    • IsPeriodic() override

    • Periodicity() const override

    • Periodicity(const amrex::Box &b) override

    • GetBCTypes()

    • FillBoundary(amrex::BaseFab< T > &in, const amrex::Box &box, int ngrow, int dcomp, int ncomp, amrex::Real time, Orientation face=Orientation::All, const amrex::Mask *mask=nullptr)=0

    • FillBoundary(amrex::FabArray< amrex::BaseFab< T > > &mf, int dcomp, int ncomp, amrex::Real time, int)

    • FillBoundary(amrex::FabArray< amrex::BaseFab< T > > &mf, int dcomp, int ncomp, amrex::IntVect const &, amrex::Real time, int bccomp)

    • FillBoundary(amrex::MultiFab &mf, int dcomp, int ncomp, amrex::Real time, int)

    Variables

    • unsigned int BC::Expression::m_ncomp

    • std::array<std::vector<int>, m_nfaces> BC::Expression::m_bc_type

    • std::array<std::vector<amrex::Parser>, m_nfaces> BC::Expression::m_bc_func_parser

    • std::array<std::vector<amrex::ParserExecutor<4> >, m_nfaces> BC::Expression::m_bc_func

BC::Nothing

src/BC/Nothing.H

Empty BC class, used when specifying boundaries that have no ghost cells/nodes but a BC object is still required.

API definitions in src/BC/Nothing.H

Classes

  • BC::Nothing

    Methods

    • Nothing()

    • FillBoundary(amrex::BaseFab< Set::Scalar > &, const amrex::Box &, int, int, int, amrex::Real, Orientation=Orientation::All, const amrex::Mask *=nullptr) override

    • GetBCRec() override

BC::Operator

BC::Operator::Operator

src/BC/Operator/Operator.H

The BC::Operator family of BC classes are designed to work with implicit operators. They are not the same thing as other BC types and cannot be used in that same way. (This is not an ideal taxonomy for BC structures - we may transition other BC types to be subspaces of BC::Integrator.)

API definitions in src/BC/Operator/Operator.H

Classes

BC::Operator::Elastic

BC::Operator::Elastic::Elastic

src/BC/Operator/Elastic/Elastic.H

Class of BC operators that work with Operator::Elastic.

API definitions in src/BC/Operator/Elastic/Elastic.H

Classes

  • BC::Operator::Elastic::Elastic

    Methods

    • ~Elastic()=default

    • SetTime(const Set::Scalar a_time)

    • Init(amrex::MultiFab *a_rhs, const amrex::Geometry &a_geom, bool a_homogeneous=false) const =0

    • Init(amrex::FabArray< amrex::BaseFab< Set::Vector > > *a_rhs, const amrex::Geometry &a_geom, bool a_homogeneous=false) const =0

    • Init(Set::Field< Set::Scalar > &a_rhs, const amrex::Vector< amrex::Geometry > &a_geom, bool a_homogeneous=false) const

    • Init(Set::Field< Set::Vector > &a_rhs, const amrex::Vector< amrex::Geometry > &a_geom, bool a_homogeneous=false) const

    • getType(const int &i, const int &j, const int &k, const amrex::Box &domain)=0

    • operator()(const Set::Vector &u, const Set::Matrix &gradu, const Set::Matrix &sigma, const int &i, const int &j, const int &k, const amrex::Box &domain)=0

    Variables

    • Set::Scalar BC::Operator::Elastic::Elastic::m_time

BC::Operator::Elastic::Constant

src/BC/Operator/Elastic/Constant.H

This BC defines boundary conditions that are constant with respect to space. However they may change in time using the Numeric::Interpolator::Linear method.

In 2D, BCs are prescribed for each edge (4) and corner (4) on the boundary, for a total of 8 possible regions. In 3D, BCs are prescribed for each face (6), each edge (12), and each corner (8), for a total of 26 possible regions. Care must be taken to define BCs for edges/corners consistently with the faces/edges, or you will get poor convergence and inaccurate behavior. (See BC::Operator::Elastic::TensionTest for a reduced BC with streamlined load options.)

To define a boundary condition, you must define both a “type” and a “value” in each direction. The type can be “displacement”, “disp”, “neumann”, “traction”, “trac”. The value is the corresponding value. All BCs are, by default, dirichlet (displacement) with a value of zero.

Parameter

Type

Values

type.xloylozlo

3D Corner

type.xloylozhi

3D Corner

type.xloyhizlo

3D Corner

type.xloyhizhi

3D Corner

type.xhiylozlo

3D Corner

type.xhiylozhi

3D Corner

type.xhiyhizlo

3D Corner

type.xhiyhizhi

3D Corner

type.ylozlo

3D Edge

type.ylozhi

3D Edge

type.yhizlo

3D Edge

type.yhizhi

3D Edge

type.zloxlo

3D Edge

type.zloxhi

3D Edge

type.zhixlo

3D Edge

type.zhixhi

3D Edge

type.xloylo

3D Edge / 2D Corner

type.xloyhi

3D Edge / 2D Corner

type.xhiylo

3D Edge / 2D Corner

type.xhiyhi

3D Edge / 2D Corner

type.xlo

3D Face / 2D Edge

type.xhi

3D Face / 2D Edge

type.ylo

3D Face / 2D Edge

type.yhi

3D Face / 2D Edge

type.zlo

3D Face

type.zhi

3D Face

val.xloylozlo

3D Corner

val.xloylozhi

3D Corner

val.xloyhizlo

3D Corner

val.xloyhizhi

3D Corner

val.xhiylozlo

3D Corner

val.xhiylozhi

3D Corner

val.xhiyhizlo

3D Corner

val.xhiyhizhi

3D Corner

val.ylozlo

3D Edge

val.ylozhi

3D Edge

val.yhizlo

3D Edge

val.yhizhi

3D Edge

val.zloxlo

3D Edge

val.zloxhi

3D Edge

val.zhixlo

3D Edge

val.zhixhi

3D Edge

val.xloylo

3D Edge / 2D Corner

val.xloyhi

3D Edge / 2D Corner

val.xhiylo

3D Edge / 2D Corner

val.xhiyhi

3D Edge / 2D Corner

val.xlo

3D Face / 2D Edge

val.xhi

3D Face / 2D Edge

val.ylo

3D Face / 2D Edge

val.yhi

3D Face / 2D Edge

val.zlo

3D Face

val.zhi

3D Face

API definitions in src/BC/Operator/Elastic/Constant.H

Classes

  • BC::Operator::Elastic::Constant

    Methods

    • Constant()

    • Constant(IO::ParmParse &pp, std::string name)

    • ~Constant()

    • Set(const Face face, const Direction direction, const Type type, const Set::Scalar value)

    • Set(const Face, const Direction, const Type, const Set::Scalar, amrex::Vector< amrex::MultiFab * > &, const amrex::Vector< amrex::Geometry > &)

    • Set(const Face face, const Direction direction, const Type type, const Set::Scalar value, amrex::Vector< amrex::MultiFab > &a_rhs, const amrex::Vector< amrex::Geometry > &a_geom)

    • Set(const Face face, const Direction direction, const Type type, const Set::Scalar value, amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_rhs, const amrex::Vector< amrex::Geometry > &a_geom)

    • Init(amrex::FabArray< amrex::BaseFab< Set::Vector > > *a_rhs, const amrex::Geometry &a_geom, bool a_homogeneous=false) const

    • Init(amrex::MultiFab *a_rhs, const amrex::Geometry &a_geom, bool a_homogeneous=false) const

    • getType(const int &i, const int &j, const int &k, const amrex::Box &domain)

    • operator()(const Set::Vector &u, const Set::Matrix &gradu, const Set::Matrix &sigma, const int &i, const int &j, const int &k, const amrex::Box &domain)

    • set(std::array< Type, AMREX_SPACEDIM > &bc_type, const Set::Vector &u, const Set::Matrix &gradu, const Set::Matrix &sigma, Set::Vector n) const

    • Init(amrex::MultiFab *a_rhs, const amrex::Geometry &a_geom, bool a_homogeneous=false) const=0

    • Init(amrex::FabArray< amrex::BaseFab< Set::Vector > > *a_rhs, const amrex::Geometry &a_geom, bool a_homogeneous=false) const=0

    • Init(Set::Field< Set::Scalar > &a_rhs, const amrex::Vector< amrex::Geometry > &a_geom, bool a_homogeneous=false) const

    • Init(Set::Field< Set::Vector > &a_rhs, const amrex::Vector< amrex::Geometry > &a_geom, bool a_homogeneous=false) const

    Variables

    • std::array<std::array<Type, AMREX_SPACEDIM>, m_nfaces> BC::Operator::Elastic::Constant::m_bc_type

    • std::array<std::array<Numeric::Interpolator::Linear<Set::Scalar>,AMREX_SPACEDIM>, m_nfaces> BC::Operator::Elastic::Constant::m_bc_val

BC::Operator::Elastic::Expression

src/BC/Operator/Elastic/Expression.H

Use expressions to define space and time varying boundary conditions for elastic problems.

API definitions in src/BC/Operator/Elastic/Expression.H

Classes

  • BC::Operator::Elastic::Expression

    Methods

    • Expression()

    • ~Expression()

    • Init(amrex::FabArray< amrex::BaseFab< Set::Vector > > *a_rhs, const amrex::Geometry &a_geom, bool a_homogeneous=false) const override

    • Init(amrex::MultiFab *a_rhs, const amrex::Geometry &a_geom, bool a_homogeneous=false) const override

    • getType(const int &i, const int &j, const int &k, const amrex::Box &domain) override

    • operator()(const Set::Vector &u, const Set::Matrix &gradu, const Set::Matrix &sigma, const int &i, const int &j, const int &k, const amrex::Box &domain) override

    • set(std::array< Type, AMREX_SPACEDIM > &bc_type, const Set::Vector &u, const Set::Matrix &gradu, const Set::Matrix &sigma, Set::Vector n) const

    • Expression(IO::ParmParse &pp, std::string name)

    • Init(amrex::MultiFab *a_rhs, const amrex::Geometry &a_geom, bool a_homogeneous=false) const=0

    • Init(amrex::FabArray< amrex::BaseFab< Set::Vector > > *a_rhs, const amrex::Geometry &a_geom, bool a_homogeneous=false) const=0

    • Init(Set::Field< Set::Scalar > &a_rhs, const amrex::Vector< amrex::Geometry > &a_geom, bool a_homogeneous=false) const

    • Init(Set::Field< Set::Vector > &a_rhs, const amrex::Vector< amrex::Geometry > &a_geom, bool a_homogeneous=false) const

    Variables

    • std::array<std::array<Type, AMREX_SPACEDIM>, m_nfaces> BC::Operator::Elastic::Expression::m_bc_type

    • std::array<std::array<amrex::Parser,AMREX_SPACEDIM>, m_nfaces> BC::Operator::Elastic::Expression::m_bc_func_parser

    • std::array<std::array<amrex::ParserExecutor<4>,AMREX_SPACEDIM>, m_nfaces> BC::Operator::Elastic::Expression::m_bc_func

BC::Operator::Elastic::TensionTest

src/BC/Operator/Elastic/TensionTest.H

A boundary condition for mechanics operators that simplifies frequently-used conditions for uniaxial loading.

Types include:

  • uniaxial_stress_clamp: fixes both ends and allows for stress concentrations at the corners.

  • uniaxial_kolsky

  • uniaxial_stress: 1D stress problem

  • uniaxial_strain: 1D strain problem

Parameter

Type

Values

type

Tension test type.

uniaxial_stress_clamp uniaxial_kolsky uniaxial_stress uniaxial_strain

disp

Applied displacement (can be interpolator)

trac

Applied traction (can be interpolator)

API definitions in src/BC/Operator/Elastic/TensionTest.H

Classes

  • BC::Operator::Elastic::TensionTest

    Methods

    • TensionTest()

    • TensionTest(IO::ParmParse &pp, std::string name)

    • ~TensionTest()

    • Init(amrex::FabArray< amrex::BaseFab< Set::Vector > > *a_rhs, const amrex::Geometry &a_geom, bool a_homogeneous=false) const

    • Init(amrex::MultiFab *a_rhs, const amrex::Geometry &a_geom, bool a_homogeneous=false) const

    • Init(amrex::MultiFab *a_rhs, const amrex::Geometry &a_geom, bool a_homogeneous=false) const =0

    • Init(amrex::FabArray< amrex::BaseFab< Set::Vector > > *a_rhs, const amrex::Geometry &a_geom, bool a_homogeneous=false) const =0

    • Init(Set::Field< Set::Scalar > &a_rhs, const amrex::Vector< amrex::Geometry > &a_geom, bool a_homogeneous=false) const

    • Init(Set::Field< Set::Vector > &a_rhs, const amrex::Vector< amrex::Geometry > &a_geom, bool a_homogeneous=false) const

    • set(std::array< Type, AMREX_SPACEDIM > &bc_type, const Set::Vector &u, const Set::Matrix &gradu, const Set::Matrix &sigma, Set::Vector n) const


IC

IC::IC

src/IC/IC.H

Initial condition (IC) objects are used to set fields to specified values, through mathematical expressions, images, etc. They are often used as initial conditions, but may be used generally to incorporate static or time-dependent values. All IC methods inherit from the base IC class, and are implemented by overriding the “Add” method. (Initialize uses Add after setting the field to zero.)

API definitions in src/IC/IC.H

Classes

  • IC::IC - Pure abstract object from which all other objects inherit.

    Methods

    • IC(amrex::Vector< amrex::Geometry > &_geom)

    • ~IC()

    • Add(const int &lev, Set::Field< T > &field, Set::Scalar time)=0

    • Add(const int &lev, Set::Field< T > &field)

    • Initialize(const int &a_lev, Set::Field< T > &a_field, Set::Scalar a_time=0.0)

    • Initialize(const int &a_lev, Set::Field< T > &a_field, Set::Scalar a_time=0.0)

    • SetComp(int a_comp) final

    Variables

    • amrex::Vector<amrex::Geometry>& IC::IC< T >::geom

    • int IC::IC< T >::comp

IC::BMP

src/IC/BMP.H

Initialize a field using a bitmap image. (2D only)

Note that in GIMP, you must select “do not write color space information” and “24 bit R8 G8 B8” when exporting the BMP file.

Parameter

Type

Values

filename

BMP filename.

file path

fit

How to position image in space

stretch fitheight fitwidth coord

coord.lo

Location of lower-left corner in the domain

coord.hi

Location of upper-right corner in the domain

channel

Color channel to use

r g b R G B

min

Scaling value - minimum

0.0

max

Scaling value - maximum

255.0

API definitions in src/IC/BMP.H

Classes

  • IC::BMP

    Methods

    • BMP(amrex::Vector< amrex::Geometry > &_geom)

    • BMP(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp, std::string name)

    • Define(std::string bmpfilename)

    • Add(const int &lev, Set::Field< Set::Scalar > &a_field, Set::Scalar)

    Variables

    • Util::BMP IC::BMP::bmp

    • Fit IC::BMP::fit

    • Channel IC::BMP::channel

    • Set::Scalar IC::BMP::min

    • Set::Scalar IC::BMP::max

    • Set::Vector IC::BMP::coord_lo

    • Set::Vector IC::BMP::coord_hi

IC::Constant

src/IC/Constant.H

Basic IC that just sets the entire field to a constant value. Works with a single or multiple-component field.

Parameter

Type

Values

value

Array of constant values. The number of values should equal either 1 or N where N is the number of fab components

required

API definitions in src/IC/Constant.H

Classes

  • IC::Constant

    Methods

    • ~Constant()=default

    • Constant(amrex::Vector< amrex::Geometry > &_geom)

    • Constant(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp)

    • Constant(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp, std::string name)

    • Add(const int &lev, Set::Field< Set::Scalar > &a_field, Set::Scalar) override

    • Add(const int &lev, Set::Field< Set::Vector > &a_field, Set::Scalar) override

    Variables

    • std::vector<Set::Scalar> IC::Constant::m_value

IC::Ellipse

src/IC/Ellipse.H

If number_of_inclusions is specified, then multiple ellipses are specified. In this case, each parameter must have number_of_inclusion*M values, where M is the number of values specified for the single ellipse case.

Parameter

Type

Values

x0

Coorinates of ellipse center

eps

Diffuse boundary thickness

0.0

A

DxD square matrix defining an ellipse.

a

If A is not defined, then assume a sphere with radius a

number_of_inclusions

Number of ellipses

center

center of the ellipse

x0

center of the ellipse

A

either a vector containing ellipse radii, or a matrix defining the ellipse

A

Same

radius

Array of radii [depricated]

eps

Regularization for smooth boundary

invert

Flip the inside and the outside

API definitions in src/IC/Ellipse.H

Classes

  • IC::Ellipse

    Methods

    • Ellipse(amrex::Vector< amrex::Geometry > &_geom)

    • Ellipse(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp, std::string name)

    • Add(const int &lev, Set::Field< Set::Scalar > &a_field, Set::Scalar)

    Variables

    • int IC::Ellipse::number_of_inclusions

    • amrex::Vector<Set::Vector> IC::Ellipse::center

    • amrex::Vector<Set::Matrix> IC::Ellipse::A

    • amrex::Vector<Set::Scalar> IC::Ellipse::eps

    • int IC::Ellipse::invert

IC::Expression

src/IC/Expression.H

Initialize a field using a mathematical expression. Expressions are imported as strings and are compiled real-time using the AMReX Parser.

Works for single or multiple-component fields. Use the regionN (N=0,1,2, etc. up to number of components) to pass expression. For example:

ic.region0 = "sin(x*y*z)"
ic.region1 = "3.0*(x > 0.5 and y > 0.5)"

for a two-component field. It is up to you to make sure your expressions are parsed correctly; otherwise you will get undefined behavior.

Constants You can add constants to your expressions using the constant directive. For instance, in the following code

psi.ic.type=expression
psi.ic.expression.constant.eps = 0.05
psi.ic.expression.constant.R   = 0.25
psi.ic.expression.region0 = "0.5 + 0.5*tanh((x^2 + y^2 - R)/eps)"

the constants eps and R are defined by the user and then used in the subsequent expression. The variables can have any name made up of characters that is not reserved. However, if multiple ICs are used, they must be defined each time for each IC.

Parameter

Type

Values

coord

coordinate system to use

cartesian polar

API definitions in src/IC/Expression.H

Classes

  • IC::Expression

    Methods

    • Expression(amrex::Vector< amrex::Geometry > &_geom)

    • Expression(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp, std::string name)

    • Add(const int &lev, Set::Field< Set::Scalar > &a_field, Set::Scalar a_time=0.0) override

    • Add(const int &lev, Set::Field< Set::Vector > &a_field, Set::Scalar a_time=0.0) override

    Variables

    • std::vector<amrex::Parser> IC::Expression::parser

    • std::vector<amrex::ParserExecutor<4> > IC::Expression::f

    • Expression::CoordSys IC::Expression::coord

IC::Laminate

src/IC/Laminate.H

Create a single laminate with specified orientation, thickness, and offset.

Parameter

Type

Values

number_of_inclusions

How many laminates (MUST be greater than or equal to 1).

1

orientation

Vector normal to the interface of the laminate

eps

Diffuse thickness

mollifier

Type of mollifer to use (options: dirac, [gaussian])

singlefab

Switch to mode where only one component is used.

invert

Take the complement of the laminate

API definitions in src/IC/Laminate.H

Classes

  • IC::Laminate - Initialize Laminates in a matrix.

    Methods

    • Laminate(amrex::Vector< amrex::Geometry > &_geom)

    • Laminate(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp, std::string name)

    • Add(const int &lev, Set::Field< Set::Scalar > &a_field, Set::Scalar)

    Variables

    • int IC::Laminate::number_of_inclusions

    • amrex::Vector<Set::Vector> IC::Laminate::center

    • amrex::Vector<Set::Vector> IC::Laminate::orientation

    • amrex::Vector<Set::Vector> IC::Laminate::normal

    • amrex::Vector<Set::Scalar> IC::Laminate::eps

    • amrex::Vector<Set::Scalar> IC::Laminate::thickness

    • Mollifier IC::Laminate::moll

    • bool IC::Laminate::singlefab

    • bool IC::Laminate::invert

IC::PSRead

src/IC/PSRead.H

Fill a domain (region where field=0) with packed spheres (regions where field=1). Sphere locations and radii are determined from an xyzr file.

Parameter

Type

Values

eps

Diffuseness of the sphere boundary

filename

Location of .xyzr file

file path

verbose

Verbosity (used in parser only)

mult

Coordinate multiplier

invert

Coordinate multiplier

x0

Coordinate offset

API definitions in src/IC/PSRead.H

Classes

  • IC::PSRead

    Methods

    • PSRead(amrex::Vector< amrex::Geometry > &_geom)

    • PSRead(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp, std::string name)

    • Define()

    • Add(const int &lev, Set::Field< Set::Scalar > &a_phi, Set::Scalar)

    Variables

    • std::vector<Set::Vector> IC::PSRead::X

    • std::vector<Set::Scalar> IC::PSRead::R

    • Set::Scalar IC::PSRead::eps

    • Set::Scalar IC::PSRead::mult

    • Set::Vector IC::PSRead::x0

    • bool IC::PSRead::invert

IC::PerturbedInterface

src/IC/PerturbedInterface.H

Initialize a perturbed interface using Fourier Modes

Notes: 1. todo Extend this class to allow for 3D perturbations, currently only 2D are allowed 2. todo Allow for cosine (or complex exponential) expansions rather than just sin. 3. note This is a two grain only initial condition. 4. note This replaces the depricated “perturbed_bar” initial condition from previous versions

The interface is defined as the \(x=0\) plane (2D), or the \(x=0,z=0\) plane (3D). The equation for the interface is given by \(y(x,z) = \sum_{n\in \{n_1,\ldots,n_N\}} A_n \sin(n\pi x/L_x)\) where \(A_n\) are the amplitudes (stored in #wave_amplitudes), \(n_1,\ldots,n_N\subset\mathbb{Z}_+\) are wave numbers (stored in #wave_numbers), and \(L_x\) is the length in the x direction (obtained using the #geom object).

Grain 1 is defined as being above \(y(x,z)\), Grain 2 is defined as being below.

Parameter

Type

Values

wave_numbers

Wave numbers

wave_amplitudes

Wave amplitudes

normal

Which axis is normal to the interface (x,y,z)

offset

Interface offset from origin

reverse

If true, flip the interface (default:false)

mollifier

Mollifier (options: dirac, [gaussian])

eps

Magnitude of mollifier

API definitions in src/IC/PerturbedInterface.H

Classes

  • IC::PerturbedInterface

    Methods

    • PerturbedInterface(amrex::Vector< amrex::Geometry > &_geom)

    • PerturbedInterface(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp, std::string name)

    • PerturbedInterface(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp)

    • Add(const int &lev, Set::Field< Set::Scalar > &a_field, Set::Scalar)

    Variables

    • Direction IC::PerturbedInterface::normal

    • Set::Scalar IC::PerturbedInterface::offset

    • amrex::Vector<std::complex<int> > IC::PerturbedInterface::wave_numbers - Store mode amplitudes .

    • amrex::Vector<Set::Scalar> IC::PerturbedInterface::wave_amplitudes

    • std::vector<Set::Scalar> IC::PerturbedInterface::phis

    • Mollifier IC::PerturbedInterface::mol

    • Set::Scalar IC::PerturbedInterface::eps

    • int IC::PerturbedInterface::reverse

IC::PNG

src/IC/PNG.H

Initialize a field using a PNG image. (2D only)

Parameter

Type

Values

channel

Color channel to use (options: r, R, g, G, b, B, a, A)

r g b a R G B A

API definitions in src/IC/PNG.H

Classes

  • IC::PNG

    Methods

    • ~PNG()

    • PNG(amrex::Vector< amrex::Geometry > &_geom)

    • PNG(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp, std::string name)

    • Add(const int &lev, Set::Field< Set::Scalar > &a_field, Set::Scalar)

    Variables

    • Util::PNG IC::PNG::png

    • Channel IC::PNG::channel

IC::Random

src/IC/Random.H

Set each point in the field to a random value between 0 and 1

Parameter

Type

Values

offset

offset from the [0,1] random number range

0.0

mult

multiplier for the [0,1] random number range

1.0

API definitions in src/IC/Random.H

Classes

  • IC::Random - each point to a random value.

    Methods

    • Random(amrex::Vector< amrex::Geometry > &_geom, Set::Scalar a_mult)

    • Random(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp, std::string name)

    • Add(const int &lev, Set::Field< Set::Scalar > &a_field, Set::Scalar)

    • Add(const int &lev, Set::Field< T > &field, Set::Scalar time)=0

    • Add(const int &lev, Set::Field< T > &field)

    Variables

    • Set::Scalar IC::Random::mult

    • Set::Scalar IC::Random::offset

IC::Sphere

src/IC/Sphere.H

Initialize a sphere region in which the field (eta=1). Can be a 3D sphere (xyz) or oriented around any of the three axes.

This functionality is replaced by IC::Expression.

Parameter

Type

Values

radius

Radius of the sphere

1.0

center

Vector location of the sphere center

inside

Value of the field inside the sphere

1.0

outside

Value of the field outside teh sphere

0.0

type

Type - can be cylinder oriented along the x, y, z directions or full sphere.

xyz yz zx xy

API definitions in src/IC/Sphere.H

Classes

  • IC::Sphere

    Methods

    • Sphere(amrex::Vector< amrex::Geometry > &_geom)

    • Sphere(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp)

    • Sphere(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp, std::string name)

    • Sphere(amrex::Vector< amrex::Geometry > &_geom, Set::Scalar _radius, Set::Vector _center, Type _type=Type::XYZ, Set::Scalar _alpha_in=1, Set::Scalar _alpha_out=0) - Constructor defining radius, center, dimension/orientation, and field values within and outside of the area.

    • Define(Set::Scalar a_radius, Set::Vector a_center, Type a_type, Set::Scalar a_alpha_in, Set::Scalar a_alpha_out)

    • Add(const int &lev, Set::Field< Set::Scalar > &a_field, Set::Scalar)

    Variables

    • Set::Vector IC::Sphere::center

    • Set::Scalar IC::Sphere::radius

    • Set::Scalar IC::Sphere::alpha_in

    • Set::Scalar IC::Sphere::alpha_out

    • Type IC::Sphere::type

IC::Trig

src/IC/Trig.H

This is an old-fashioned IC. It is kept because it is still used with the Trig regression test, but it is recommended to use IC::Expression instead.

Parameter

Type

Values

nr

Number of real (cosin) waves

ni

Number of imaginary (sin) waves

dim

Spatial dimension

alpha

Multiplier

API definitions in src/IC/Trig.H

Classes

  • IC::Trig - Initialize using a trigonometric series.

    Methods

    • Trig(amrex::Vector< amrex::Geometry > &_geom, Set::Scalar _alpha=1.0, AMREX_D_DECL(std::complex< int > _n1=0, std::complex< int > _n2=0, std::complex< int > _n3=0), int _dim=AMREX_SPACEDIM)

    • Trig(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp, std::string name)

    • Define(Set::Scalar _alpha=1.0, AMREX_D_DECL(std::complex< int > _n1=0, std::complex< int > _n2=0, std::complex< int > _n3=0), int _dim=AMREX_SPACEDIM)

    • Add(const int &lev, Set::Field< Set::Scalar > &a_field, Set::Scalar) override

    • Add(const int &lev, Set::Field< Set::Vector > &a_field, Set::Scalar) override

    • AMREX_D_DECL(n1, n2, n3)

    • AMREX_D_DECL(phi1=0.0, phi2=0.0, phi3=0.0)

    Variables

    • int IC::Trig::dim

    • Set::Scalar IC::Trig::alpha

IC::TabulatedInterface

src/IC/TabulatedInterface.H

Initialize a 2D interface in a 2 component field defind by (x,y) which are an array of points along the interface.

Parameter

Type

Values

xs

x location of points

ys

y location of points

API definitions in src/IC/TabulatedInterface.H

Classes

  • IC::TabulatedInterface - Initialize a perturbed interface using a linear interpolation.

    Methods

    • TabulatedInterface(amrex::Vector< amrex::Geometry > &_geom)

    • TabulatedInterface(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp)

    • TabulatedInterface(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp, std::string name)

    • TabulatedInterface(amrex::Vector< amrex::Geometry > &_geom, std::vector< Set::Scalar > a_xs, std::vector< Set::Scalar > a_ys)

    • TabulatedInterface(amrex::Vector< amrex::Geometry > &_geom, std::vector< Set::Scalar > a_xs, std::vector< Set::Scalar > a_ys, Set::Scalar a_alpha1, Set::Scalar a_alpha2, Type a_type=Type::Values)

    • Define(std::vector< Set::Scalar > a_xs, std::vector< Set::Scalar > a_ys, Type a_type=Type::Partition, Set::Scalar a_alpha1=1.0, Set::Scalar a_alpha2=1.0)

    • Add(const int &lev, Set::Field< Set::Scalar > &a_field, Set::Scalar) override

    Variables

    • Type IC::TabulatedInterface::type

    • std::vector<Set::Scalar> IC::TabulatedInterface::xs

    • std::vector<Set::Scalar> IC::TabulatedInterface::ys

    • Set::Scalar IC::TabulatedInterface::alpha1

    • Set::Scalar IC::TabulatedInterface::alpha2

IC::Trig2

src/IC/Trig2.H

This is an old IC that exist only to support some of the old operator tests. IC::Expression should be used instead. .. dropdown:: API definitions in src/IC/Trig2.H

Classes

  • IC::Trig2 - Initialize using a trigonometric series.

    Methods

    • Trig2(amrex::Vector< amrex::Geometry > &_geom, Set::Scalar _alpha=1.0, AMREX_D_DECL(Set::Scalar _theta1=0, Set::Scalar _theta2=0, Set::Scalar _theta3=0), AMREX_D_DECL(int _n1=0, int _n2=0, int _n3=0), int _dim=AMREX_SPACEDIM)

    • Define(Set::Scalar _alpha=1.0, AMREX_D_DECL(Set::Scalar _theta1=0, Set::Scalar _theta2=0, Set::Scalar _theta3=0), AMREX_D_DECL(int _n1=0, int _n2=0, int _n3=0), int _dim=AMREX_SPACEDIM)

    • Add(const int &lev, Set::Field< Set::Scalar > &field, Set::Scalar)

    • AMREX_D_DECL(n1, n2, n3)

    • AMREX_D_DECL(theta1, theta2, theta3)

    Variables

    • int IC::Trig2::dim

    • Set::Scalar IC::Trig2::alpha

IC::Voronoi

src/IC/Voronoi.H

Initialize an N component field with a Voronoi tessellation. (Mostly used by Integrator::PhaseFieldMicrostructure).

Parameter

Type

Values

number_of_grains

Number of grains

alpha

Value to take in the region [1.0]

seed

Random seed to use

API definitions in src/IC/Voronoi.H

Classes

  • IC::Voronoi

    Methods

    • Voronoi(amrex::Vector< amrex::Geometry > &_geom)

    • Voronoi(amrex::Vector< amrex::Geometry > &_geom, IO::ParmParse &pp, std::string name)

    • Voronoi(amrex::Vector< amrex::Geometry > &_geom, int _number_of_grains, Set::Scalar a_alpha)

    • Voronoi(amrex::Vector< amrex::Geometry > &a_geom, int a_number_of_grains)

    • Define(int a_number_of_grains, Set::Scalar a_alpha)

    • Define(int a_number_of_grains, std::vector< Set::Scalar > a_alpha, Type a_type=Type::Values)

    • Add(const int &lev, Set::Field< Set::Scalar > &a_field, Set::Scalar)

    Variables

    • int IC::Voronoi::number_of_grains

    • int IC::Voronoi::seed

    • std::vector<Set::Scalar> IC::Voronoi::alpha

    • std::vector<Set::Vector> IC::Voronoi::voronoi

    • Type IC::Voronoi::type


IO

IO::FileNameParse

src/IO/FileNameParse.cpp src/IO/FileNameParse.H

This manages the processing of the plot_file input, which defines the output file. Both variable substitution and time wildcards are supported.

Variable substitution: you can use braces to substitute variable names in the input file. For example, if your input file contains myinput.value = 3, then you can specify plot_file = output_{myinput.value} to substitute the input’s value.

Time and dimension wildcards: You can use the following strings:

  • %Y: 4-digit year

  • %m: 2-digit month (01-12)

  • %d: 2-digit day (00-31)

  • %H: 2 digit hour (00-23)

  • %M: 2 digit minute (00-59)

  • %S: 2 digit second (00-59)

  • %f: 2 digit microsecond (00-59)

  • %D: spatial dimension

So a plot_file = output_%Y%m%d_%H%M%S may resolve to output_20250307_211201 (etc) depending on the time the output was created. .. dropdown:: API definitions in src/IO/FileNameParse.H

Classes

IO::ParmParse

src/IO/ParmParse.cpp src/IO/ParmParse.H

This is a thin wrapper to the amrex::ParmParse class This class exists to add some additional parsing capability, e.g. parsing Set::Matrix and Set::Vector data types.

IO::ParmParse uses static Parse() functions to perform cascading class-based input parsing. See the Autodoc and Autotest section for instructions on adding documentation.

This is standard infrastructure code; make sure you know what you ard doing before you change it.

Query directives

Alamo uses different query directives to standardize reading inputs and automatic documentation. The type of query that is used (query vs query_required, etc) triggers different handlers and different automatic documentation procedures. For instance, the use of a query_default causes a default value to be set and added to the metadata file, and it also serves as a flag for the autodoc system to document that a default value is available. The following table is a reference for the different kinds of query directives.

BC Type

Description

query

Standard IO for bool, string, Set::Scalarthat does not enforce defaults or required values. Not recommended for general use.

query_required

Similar to query, but will abort if no value is specified. Required values are indicated by required.

query_default

Similar to query, but will fill with default value if no value is provided. Will also add default value to metadata. Default values are indicated by green badge values, e.g. 0.0.

query_validate

For strings, read in a value and enforce that the value is one of a supplied number of values. Optionally make required, or set the default value to the first supplied value. Acceptable options are indicated by blue badge values, e.g. 1.0, 2.0. If a default value is available, it is indicated by a green badge, e.g. 1.0.

query_file

Read in a string that defines a file name. Check to make sure that the file exists and is a regular file, and print an informative error message if not (this can be disabled). Also, copy the file to the output directory, with the full path preserved by replacing / with _. (This can also be disabled, but doing so is discouraged.) Default values are not allowed. File paths are indicated by file path.

queryarr

Read in an array of numbers into either a standard vector or into a Set::Vector or Set::Scalar. No defaults or existence checking is performed.

queryclass

Read a class object with a specified prefix. How that class is read in is determined by its Parse function.

Query macros

A set of preprocessor macros are defined so that you can call a query function using pp_ instead of pp.. For instance, the following two can be used interchangeably:

pp.query_required("myvar",myvar); /* function version */
pp_query_required("myvar",myvar); /* preprocessor macro version - preferred*/

Using the preprocessor macros enables code location information to be passed to the parser, so that more informative error messages will be printed out. Note that the ParmParse object must always be called pp for this to work.

API definitions in src/IO/ParmParse.H

Classes

  • IO::ParmParse

    Methods

    • Define()

    • ParmParse(std::string arg)

    • ParmParse()

    • getPrefix() const

    • ignore(std::string name)

    • forbid(std::string name, std::string explanation, std::string file="", std::string func="", int line=-1)

    • contains(std::string name)

    • query_required(std::string name, T &value, std::string file="", std::string func="", int line=-1)

    • query_default(std::string name, T &value, T defaultvalue, std::string="", std::string="", int=-1)

    • query_validate(std::string name, int &value, std::vector< int > possibleintvals, std::string file="", std::string func="", int line=-1)

    • query_validate(std::string name, std::string &value, std::vector< const char * > possiblecharvals, bool firstbydefault, std::string file="", std::string func="", int line=-1)

    • query_validate(std::string name, std::string &value, std::vector< const char * > possiblecharvals, std::string file="", std::string func="", int line=-1)

    • query_default(std::string name, std::string &value, const char *defaultvalue, std::string file="", std::string func="", int line=-1)

    • query_default(std::string name, int &value, bool defaultvalue, std::string file="", std::string func="query_default", int line=-1)

    • query_file(std::string name, std::string &value, bool copyfile, bool checkfile, std::string file="", std::string func="query_file", int line=-1)

    • query_file(std::string name, std::string &value, bool copyfile, std::string file="", std::string func="query_file", int line=-1)

    • query_file(std::string name, std::string &value, std::string file="", std::string func="query_file", int line=-1)

    • queryarr(std::string name, std::vector< T > &value, std::string, std::string, int)

    • queryarr(std::string name, Set::Vector &value, std::string file="", std::string func="queryarr", int line=-1)

    • queryarr(std::string name, Set::Matrix &value, std::string file="", std::string func="queryarr", int line=-1)

    • queryarr_required(std::string name, std::vector< T > &value, std::string file, std::string func, int line)

    • queryarr_default(std::string name, std::vector< std::string > &value, std::string defaultvalue, std::string="", std::string="", int=-1)

    • queryclass_enumerate(std::string a_name, std::vector< T > &value, int number=1, std::string file="", std::string func="", int line=__LINE__)

    • query_enumerate(std::string a_name, std::vector< T > &value, int number=1, std::string file="", std::string func="", int line=__LINE__)

    • AnyUnusedInputs()

    • GetUnusedInputs()

    • prefix()

    • full(std::string name)

    • queryclass(std::string name, T *value, std::string file="", std::string func="", int line=-1)

    • queryclass(std::string name, T &value, std::string file="", std::string func="", int line=__LINE__)

    • queryclass(T *value, std::string file="", std::string func="", int line=__LINE__)

    • queryclass(T &value, std::string file="", std::string func="", int line=__LINE__)

    • select(std::string name, PTRTYPE *&ic_eta, Args &&... args)

    • select_default(std::string name, PTRTYPE *&ic_eta, Args &&... args)

    • select_main(PTRTYPE *&ic_eta, Args &&... args)

    • select_only(PTRTYPE *&ic_eta, Args &&args)

    • select_only(PTRTYPE *&ic_eta)

    • query_exactly(std::vector< std::string > names, std::pair< std::string, Set::Scalar > values[N])

IO::WriteMetaData

src/IO/WriteMetaData.cpp src/IO/WriteMetaData.H

This provide an IO routine for generating run-specific output. Every Alamo run produces a metadata file and (if applicable) a diff.patch file that reflects the exact state when the simulation was run. Note that the file WriteMetaData.cpp file is _always_ recompiled upon make, in order to pull the latest information about the local state at build.

This is standard infrastructure code; make sure you know what you ard doing before you change it.

API definitions in src/IO/WriteMetaData.H

Classes


Integrator

Integrator::Integrator

src/Integrator/Integrator.cpp src/Integrator/Integrator.H

Pure abstract class for managing data structures, time integration (with substepping), mesh refinement, and I/O.

Native input file parameters:

max_step  = [maximum number of timesteps]
stop_time = [maximum simulation time]
timestep  = [time step for coarsest level]

amr.regrid_int = [number of timesteps between regridding]
amr.plot_int   = [number of timesteps between dumping output]
amr.plot_file  = [base name of output directory]

amr.nsubsteps  = [number of temporal substeps at each level. This can be
                  either a single int (which is then applied to every refinement
                  level) or an array of ints (equal to amr.max_level)
                  corresponding to the refinement for each level.]

Inherited input file parameters (from amrex AmrMesh class):

amr.v                  = [verbosity level]
amr.max_level          = [maximum level of refinement]
amr.n_proper           =
amr.grid_eff           =
amr.n_error_buff       =
amr.ref_ratio_vect     = [refinement ratios in each direction]
amr.ref_ratio          = [refinement ratio in all directions (cannot be used with ref_ratio_vect)]
amr.max_grid_x         =
amr.blocking_factor    =
amr.n_cell             = [number of cells on coarsest level]
amr.refine_grid_layout =
amr.check_input        =

Parameter

Type

Values

max_step

Number of iterations before ending (default is maximum possible int)

2147483647

stop_time

Simulation time before ending

required

timestep

Nominal timestep on amrlev = 0

required

restart

Name of restart file to READ from

restart_cell

Name of cell-fab restart file to read from

restart_node

Name of node-fab restart file to read from

ignore

Space-separated list of entries to ignore

regrid_int

Regridding interval in step numbers

2

base_regrid_int

Regridding interval based on coarse level only

0

plot_int

Interval (in timesteps) between plotfiles (Default negative value will cause the plot interval to be ignored.)

-1

plot_dt

Interval (in simulation time) between plotfiles (Default negative value will cause the plot dt to be ignored.)

-1.0

plot_file

Output file: see IO::FileNameParse for wildcards and variable substitution

output

cell.all

Turn on to write all output in cell fabs (default: off)

false

cell.any

Turn off to prevent any cell based output (default: on)

true

node.all

Turn on to write all output in node fabs (default: off)

false

node.any

Turn off to prevent any node based output (default: on)

true

abort_on_nan

Abort if a plotfile contains nan or inf.

true

max_plot_level

Specify a maximum level of refinement for output files (NO REFINEMENT)

-1

nsubsteps

Number of substeps to take on each level (default: 2)

nsubsteps

Number of substeps to take on each level (set all levels to this value)

required

on

activate dynamic CFL-based timestep

verbose

how much information to print

0 1

nprevious

number of previous timesteps for rolling average

5

cfl

dynamic teimstep CFL condition

1.0

min

minimum timestep size allowed shen stepping dynamically

timestep

max

maximum timestep size allowed shen stepping dynamically

timestep

int

Integration interval (1)

1

plot_int

Interval (in timesteps) between writing (Default negative value will cause the plot interval to be ignored.)

-1

plot_dt

Interval (in simulation time) between writing (Default negative value will cause the plot dt to be ignored.)

-1.0

on

Use explicit mesh instead of AMR

0

API definitions in src/Integrator/Integrator.H

Classes

  • Integrator::Integrator

    Methods

    • Integrator() - This is the constructor for the intetgrator class, which reads timestep information, simulation output and AMR, initialized time substep, and creates a new directory.

    • ~Integrator() - Virtual destructure; make sure delete any pointers that you create here.

    • InitData() - Front-end method to initialize simulation on all levels.

    • Restart(std::string restartfile, bool a_node=false) - Read in output from previous simulation and start simulation at that point - Not currently tested.

    • Evolve() - Front-end method to start simulation.

    • SetFilename(std::string _plot_file) - Simple setter to set filename.

    • GetFilename() - Simple getter to get filename.

    • regrid(int lbase, Set::Scalar time, bool initial=false) override - This overrides an AMReX method just to allow for explicit meshing when desired.

    • InitFromScratch(Set::Scalar time) - This creates a new levels that have not previously been used.

    • AddField(Set::Field< T > &new_field, BC::BC< T > *new_bc, int ncomp, int nghost, std::string name, bool writeout, bool evolving, std::vector< std::string >)

    • RegisterGeneralFab(Set::Field< T > &new_fab, int ncomp, int nghost, bool evolving)

    • RegisterGeneralFab(Set::Field< T > &new_fab, int ncomp, int nghost, std::string a_name, bool evolving)

    • RegisterGeneralFab(Set::Field< T > &new_fab, int ncomp, int nghost, bool writeout, std::string a_name, bool evolving)

    • Initialize(int lev)=0 - You must override this function to inherit this class; this function is called before the simulation begins, and is where initial conditions should be applied.

    • Advance(int lev, amrex::Real time, amrex::Real dt)=0 - You must override this function to inherit this class; Advance is called every time(sub)step, and implements the evolution of the system in time.

    • TagCellsForRefinement(int lev, amrex::TagBoxArray &tags, amrex::Real time, int ngrow)=0 - You must override this function to inherit this class; Advance is called every time(sub)step, and implements the evolution of the system in time.

    • TimeStepBegin(Set::Scalar, int) - This optional function is called at the beginning of every timestep, and can be used to complete additional global solves, e.g.

    • TimeStepComplete(Set::Scalar, int) - This optional function is called at the end of every timestep, and can be used to complete additional global solves, e.g.

    • Integrate(int, Set::Scalar, int, const amrex::MFIter &, const amrex::Box &) - This is a function that is called by to update the variables registered in RegisterIntegratedVariable; you can override this to do your integration.

    • Regrid(int, Set::Scalar) - An optionally overridable method to trigger behavior whenver a regrid occurs.

    • RegisterNewFab(Set::Field< Set::Scalar > &new_fab, BC::BC< Set::Scalar > *new_bc, int ncomp, int nghost, std::string name, bool writeout, std::vector< std::string > suffix={}) - Add a new cell-based scalar field.

    • RegisterNewFab(Set::Field< Set::Scalar > &new_fab, int ncomp, std::string name, bool writeout, std::vector< std::string > suffix={}) - Add a new cell-based scalar field (with additional arguments).

    • RegisterNodalFab(Set::Field< Set::Scalar > &new_fab, int ncomp, int nghost, std::string name, bool writeout, std::vector< std::string > suffix={}) - Add a new node-based scalar field.

    • RegisterNodalFab(Set::Field< Set::Scalar > &new_fab, BC::BC< Set::Scalar > *new_bc, int ncomp, int nghost, std::string name, bool writeout, std::vector< std::string > suffix={}) - Add a new node-based scalar field (wtih additional arguments)

    • RegisterGeneralFab(Set::Field< T > &new_fab, int ncomp, int nghost, bool evolving=true) - Add a templated nodal field.

    • RegisterGeneralFab(Set::Field< T > &new_fab, int ncomp, int nghost, std::string a_name, bool evolving=true) - Add a templated nodal field (additional arguments)

    • RegisterGeneralFab(Set::Field< T > &new_fab, int ncomp, int nghost, bool writeout, std::string a_name, bool evolving=true) - Add a templated nodal field (additional arguments)

    • AddField(Set::Field< T > &new_field, BC::BC< T > *new_bc, int ncomp, int nghost, std::string, bool writeout, bool evolving, std::vector< std::string > suffix={}) - Add a field with arbitrary type (templated with T) and grid location (templated with d).

    • SetFinestLevel(const int a_finestlevel) - Utility to ensure that all fields know what the finest level is.

    • RegisterIntegratedVariable(Set::Scalar *integrated_variable, std::string name, bool extensive=true) - Register a variable to be integrated over the spatial domain using the Integrate function.

    • SetTimestep(Set::Scalar _timestep) - Utility to set the coarse-grid timestep.

    • SetPlotInt(int plot_int) - Utility to set the frequency (in timesteps) of plotfile dumping.

    • SetThermoInt(int a_thermo_int) - Utility to set the frequency (in timesteps) of thermo data calculation.

    • SetThermoPlotInt(int a_thermo_plot_int) - Utility to set the frequency (in timesteps) of thermo data writing to file.

    • SetStopTime(Set::Scalar a_stop_time) - Utility to set the global stop time.

    • DynamicTimestep_SyncTimeStep(int lev, Set::Scalar dt_min) - Params for the dynamic timestp.

    • DynamicTimestep_Reset()

    • DynamicTimestep_Update()

    • IntegrateVariables(Set::Scalar cur_time, int step)

    • WritePlotFile(bool initial=false) const

    • WritePlotFile(std::string prefix, Set::Scalar time, int step) const

    • WritePlotFile(Set::Scalar time, amrex::Vector< int > iter, bool initial=false, std::string prefix="") const

    • MakeNewLevelFromScratch(int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm) override

    • MakeNewLevelFromCoarse(int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm) override - Wrapper to call FillCoarsePatch.

    • RemakeLevel(int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm) override - RESETS ALL MULTIFABS AT A GIVEN LEVEL.

    • ClearLevel(int lev) override

    • ErrorEst(int lev, amrex::TagBoxArray &tags, amrex::Real time, int ngrow) override

    • FillPatch(int lev, amrex::Real time, amrex::Vector< std::unique_ptr< amrex::MultiFab > > &source_mf, amrex::MultiFab &destination_multifab, BC::BC< Set::Scalar > &physbc, int icomp) - This is the function that is responsible for updating patch data.

    • CountCells(int lev) - Simple utility to count cells.

    • TimeStep(int lev, amrex::Real time, int iteration) - Timestep marching.

    • FillCoarsePatch(int lev, amrex::Real time, Set::Field< Set::Scalar > &mf, BC::BC< Set::Scalar > &physbc, int icomp, int ncomp) - Fill a fab at current level with the data from one level up.

    • GetData(const int lev, const amrex::Real time, amrex::Vector< amrex::MultiFab * > &data, amrex::Vector< amrex::Real > &datatime)

    • PlotFileName(int lev, std::string prefix="") const

    Variables

    • bool Integrator::Integrator::on

    • int Integrator::Integrator::verbose

    • int Integrator::Integrator::nprevious

    • Set::Scalar Integrator::Integrator::cfl

    • Set::Scalar Integrator::Integrator::min

    • Set::Scalar Integrator::Integrator::max

    • std::vector<Set::Scalar> Integrator::Integrator::dt_limit_min

    • std::vector<Set::Scalar> Integrator::Integrator::previous_timesteps

    • int Integrator::Integrator::number_of_fabs

    • std::vector<Set::Field<Set::Scalar>*> Integrator::Integrator::fab_array

    • std::vector<int> Integrator::Integrator::ncomp_array

    • std::vector<int> Integrator::Integrator::nghost_array

    • std::vector<std::vector<std::string> > Integrator::Integrator::name_array

    • std::vector<BC::BC<Set::Scalar>*> Integrator::Integrator::physbc_array

    • std::vector<bool> Integrator::Integrator::writeout_array

    • bool Integrator::Integrator::any

    • bool Integrator::Integrator::all

    • int Integrator::Integrator::interval

    • Set::Scalar Integrator::Integrator::dt

    • int Integrator::Integrator::plot_int - How frequently to dump plot file (default: never)

    • Set::Scalar Integrator::Integrator::plot_dt

    • int Integrator::Integrator::number

    • std::vector<Set::Scalar*> Integrator::Integrator::vars

    • std::vector<std::string> Integrator::Integrator::names

    • std::vector<bool> Integrator::Integrator::extensives

    • int Integrator::Integrator::on

    • std::vector<amrex::Box> Integrator::Integrator::box

    • struct Integrator::Integrator Integrator::Integrator::dynamictimestep

    • amrex::Vector<amrex::Real> Integrator::Integrator::t_new - Keep track of current old simulation time on each level.

    • amrex::Vector<int> Integrator::Integrator::istep - Keep track of where each level is.

    • std::string Integrator::Integrator::plot_file - Plotfile name.

    • amrex::Real Integrator::Integrator::timestep - Timestep for the base level of refinement.

    • amrex::Vector<amrex::Real> Integrator::Integrator::dt - Timesteps for each level of refinement.

    • amrex::Vector<int> Integrator::Integrator::nsubsteps - how many substeps on each level?

    • bool Integrator::Integrator::integrate_variables_before_advance

    • bool Integrator::Integrator::integrate_variables_after_advance

    • struct Integrator::Integrator Integrator::Integrator::node

    • struct Integrator::Integrator Integrator::Integrator::cell

    • std::vector<BaseField*> Integrator::Integrator::m_basefields

    • std::vector<BaseField*> Integrator::Integrator::m_basefields_cell

    • BC::Nothing Integrator::Integrator::bcnothing

    • struct Integrator::Integrator Integrator::Integrator::thermo

    • int Integrator::Integrator::regrid_int - Determine how often to regrid (default: 2)

    • int Integrator::Integrator::base_regrid_int - Determine how often to regrid based on coarse level only (default: 0)

    • std::string Integrator::Integrator::restart_file_cell

    • std::string Integrator::Integrator::restart_file_node

    • struct Integrator::Integrator Integrator::Integrator::explicitmesh

    • int Integrator::Integrator::abort_on_nan

    • int Integrator::Integrator::max_plot_level

    • amrex::Vector<amrex::Real> Integrator::Integrator::t_old - Keep track of current old simulation time on each level.

    • int Integrator::Integrator::max_step - Maximum allowable timestep.

    • amrex::Real Integrator::Integrator::tstart - Default start time (default: 0)

    • amrex::Real Integrator::Integrator::stop_time - Default stop time.

Integrator::AllenCahn

src/Integrator/AllenCahn.H

This is a simple implementation of an Allen-Cahn equation governed by

\[\frac{\partial\alpha}{\partial t} = - L \Big(\frac{\lambda}{\epsilon}(2.0\alpha - 6\alpha^2 + 4\alpha^3) + \epsilon\,\kappa\,\Delta \alpha \Big)\]

where \(\alpha(x,t)\) is the order parameter.

Parameter

Type

Values

refinement_threshold

Criterion for mesh refinement [0.01]

0.01

ch.L

Value for \(L\) (mobility)

1.0

ch.eps

Value for \(\epsilon\) (diffuse boundary width)

0.1

ch.grad

Value for \(\kappa\) (Interface energy parameter)

1.0

ch.chempot

Value for \(\lambda\) (Chemical potential coefficient)

1.0

ch.direction

Force directional growth: 0=no growth, 1=only positive, -1=only negative

0 1 -1

ch.direction_tstart

Time to start forcing directional growth

0.0

alpha.ic.type

Set the initial condition for the alpha field

sphere constant expression bmp png random psread

alpha.bc.type

Use a constant BC object for temperature value.bc = new BC::Constant(1); :ref:`BC::Constant` parameters

constant

API definitions in src/Integrator/AllenCahn.H

Classes

  • Integrator::AllenCahn - This is the definition of the Allen Cahn class.

    Methods

    • AllenCahn()

    • AllenCahn(IO::ParmParse &pp)

    • ~AllenCahn()

    • Initialize(int lev)

    • Advance(int lev, Set::Scalar time, Set::Scalar dt)

    • TagCellsForRefinement(int lev, amrex::TagBoxArray &a_tags, Set::Scalar, int)

    Variables

    • Set::Field<Set::Scalar> Integrator::AllenCahn::alpha_mf

    • Set::Field<Set::Scalar> Integrator::AllenCahn::alpha_old_mf - Temperature field variable (current timestep)

    • IC::IC<Set::Scalar>* Integrator::AllenCahn::ic - Temperature field variable (previous timestep)

    • Set::Field<Set::Scalar>& Integrator::AllenCahn::eta_mf - Object used to initialize temperature field.

    • Set::Field<Set::Scalar>& Integrator::AllenCahn::eta_old_mf

    • struct Integrator::AllenCahn Integrator::AllenCahn::ch

    • Set::Scalar Integrator::AllenCahn::L

    • Set::Scalar Integrator::AllenCahn::eps

    • Set::Scalar Integrator::AllenCahn::grad

    • Set::Scalar Integrator::AllenCahn::chempot

    • Set::Scalar Integrator::AllenCahn::direction_tstart

    • int Integrator::AllenCahn::direction

    • int Integrator::AllenCahn::number_of_components

    • int Integrator::AllenCahn::number_of_ghost_cells

    • Set::Scalar Integrator::AllenCahn::refinement_threshold

    • BC::BC<Set::Scalar>* Integrator::AllenCahn::bc

Integrator::BaseField

src/Integrator/BaseField.H

API definitions in src/Integrator/BaseField.H

Classes

  • Integrator::BaseField

    Methods

    • ~BaseField()=default

    • RemakeLevel(int lev, amrex::Real time, const amrex::BoxArray &cgrids, const amrex::DistributionMapping &dm)=0

    • MakeNewLevelFromCoarse(int lev, amrex::Real time, const amrex::BoxArray &cgrids, const amrex::DistributionMapping &dm)=0

    • MakeNewLevelFromScratch(int lev, amrex::Real t, const amrex::BoxArray &cgrids, const amrex::DistributionMapping &dm)=0

    • SetFinestLevel(const int a_finestlevel)=0

    • FillPatch(const int lev, const Set::Scalar time)=0

    • FillBoundary(const int lev, Set::Scalar time)=0

    • AverageDown(const int lev, amrex::IntVect refRatio)=0

    • NComp()=0

    • Copy(int, amrex::MultiFab &, int, int)=0

    • Name(int)=0

    • setName(std::string a_name)=0

    • setBC(void *a_bc)=0

    • getBC()=0

    Variables

    • bool Integrator::BaseField::writeout

    • bool Integrator::BaseField::evolving

    • Set::Hypercube Integrator::BaseField::m_gridtype

  • Integrator::Field

    Methods

    • Field(Set::Field< T > &a_field, const amrex::Vector< amrex::Geometry > &a_geom, const amrex::Vector< amrex::IntVect > &a_refRatio, int a_ncomp, int a_nghost)

    • FillPatch(int lev, amrex::Real time, amrex::Vector< std::unique_ptr< amrex::FabArray< amrex::BaseFab< T > > > > &source_mf, amrex::FabArray< amrex::BaseFab< T > > &destination_mf, int icomp)

    • FillPatch(int lev, amrex::Real time) override

    • FillCoarsePatch(int lev, amrex::Real time, int icomp, int ncomp)

    • RemakeLevel(int lev, amrex::Real time, const amrex::BoxArray &cgrids, const amrex::DistributionMapping &dm) override

    • MakeNewLevelFromCoarse(int lev, amrex::Real time, const amrex::BoxArray &cgrids, const amrex::DistributionMapping &dm) override

    • MakeNewLevelFromScratch(int lev, amrex::Real, const amrex::BoxArray &cgrids, const amrex::DistributionMapping &dm) override

    • SetFinestLevel(const int a_finestlevel) override

    • FillBoundary(const int lev, Set::Scalar time) override

    • AverageDown(const int lev, amrex::IntVect refRatio) override

    • NComp() override

    • Copy(int a_lev, amrex::MultiFab &a_dst, int a_dstcomp, int a_nghost) override

    • setName(std::string a_name) override

    • Name(int i) override

    • setBC(void *a_bc) override

    • getBC() override

    Variables

    • Set::Field<T>& Integrator::Field< T >::m_field

    • const amrex::Vector<amrex::Geometry>& Integrator::Field< T >::m_geom

    • const amrex::Vector<amrex::IntVect>& Integrator::Field< T >::m_refRatio

    • const int Integrator::Field< T >::m_ncomp

    • const int Integrator::Field< T >::m_nghost

    • BC::BC<T>* Integrator::Field< T >::m_bc

    • Numeric::Interpolator::NodeBilinear<T> Integrator::Field< T >::node_bilinear

  • Integrator::Field::EmptyBC

    Methods

    • operator()(amrex::FabArray< amrex::BaseFab< T > > &, int, int, amrex::IntVect const &, amrex::Real, int)

    • GetBCRec()

Integrator::CahnHilliard

src/Integrator/CahnHilliard.cpp src/Integrator/CahnHilliard.H

This implements a basic two-phase field model with Cahn-Hilliard kinetics.

The free energy is

\[F[\eta] = \int_\Omega \Big[\frac{1}{4}(\eta^2 - 1)^2 + \frac{1}{2}\gamma |\nabla\eta|^2\Big] d\mathbf{x}\]

The corresponding governing equation under conservative kinetics is

\[\frac{\partial\eta}{\partial t} = L\nabla^2\Big(\eta^3 - \eta - \gamma\nabla^2\eta\Big)\]

which is integrated using a forward Euler scheme.

This is tested in CahnHilliard

Parameter

Type

Values

gamma

Interface energy

0.0005

L

Mobility

1.0

refinement_threshold

Regridding criterion

1E100

eta.ic.type

initial condition for \(\eta\)

random

eta.bc.type

boundary condition for \(\eta\)

constant

method

Which method to use - realspace or spectral method.

realspace spectral

API definitions in src/Integrator/CahnHilliard.H

Classes

  • Integrator::CahnHilliard

    Methods

    • CahnHilliard() - Basic constructor (don’t use)

    • ~CahnHilliard() - Destroy pointers defined in Parse.

    • CahnHilliard(IO::ParmParse &pp) - Use this constructor.

    • Initialize(int lev) override - values in fields.

    • Advance(int lev, Set::Scalar time, Set::Scalar dt) override - Integrate eta over one timestep on lev.

    • AdvanceSpectral(int lev, Set::Scalar time, Set::Scalar dt) - spectral version of advance

    • AdvanceReal(int lev, Set::Scalar time, Set::Scalar dt) - realspace version of advance

    • TagCellsForRefinement(int lev, amrex::TagBoxArray &tags, amrex::Real time, int ngrow) override - Mark any cells that need to be refined.

    Variables

    • Set::Field<Set::Scalar> Integrator::CahnHilliard::etanew_mf

    • Set::Field<Set::Scalar> Integrator::CahnHilliard::etaold_mf - The new value for eta this timestep.

    • Set::Field<Set::Scalar> Integrator::CahnHilliard::intermediate - Last timestep’s value for eta.

    • BC::BC<Set::Scalar>* Integrator::CahnHilliard::bc - Intermediate field used for CH kinetics.

    • IC::IC<Set::Scalar>* Integrator::CahnHilliard::ic - eta’s bc object

    • Set::Scalar Integrator::CahnHilliard::gamma - eta’s ic object

    • Set::Scalar Integrator::CahnHilliard::L

    • Set::Scalar Integrator::CahnHilliard::refinement_threshold

    • std::string Integrator::CahnHilliard::method

Integrator::Dendrite

src/Integrator/Dendrite.H

This is a BASIC phase field method for dendritic growth as described in “A Numerical Approach to Three-Dimensional Dendritic Solidification” by Ryo Kobayashi (1994) Reference: https://doi.org/10.1080/10586458.1994.10504577

Parameter

Type

Values

alpha

Pre-multiplier of "m" barrier height

required

delta

Anisotropy factor

required

gamma

Anisotropic temperature coupling factor

required

diffusion

Thermal constant

1.0

eps

Diffuse boundary width

required

tau

Diffusive timescale

required

theta

Orientation about z axis (Deg)

0.0

heat.refinement_threshold

Refinement criteria for temperature

0.01

phi.refinement_threshold

Refinement criteria for phi

0.01

bc.temp.type

boundary conditions for temperature field

constant

bc.phi.type

boundary conditions for \(\phi\) field

constant

API definitions in src/Integrator/Dendrite.H

Classes

  • Integrator::Dendrite

    Methods

    • Dendrite()

    • Dendrite(IO::ParmParse &pp)

    • ~Dendrite()

    • Initialize(int lev)

    • Advance(int lev, Set::Scalar, Set::Scalar dt)

    • TagCellsForRefinement(int lev, amrex::TagBoxArray &a_tags, Set::Scalar, int)

    Variables

    • Set::Field<Set::Scalar> Integrator::Dendrite::temp_mf

    • Set::Field<Set::Scalar> Integrator::Dendrite::temp_old_mf

    • Set::Field<Set::Scalar> Integrator::Dendrite::phi_mf

    • Set::Field<Set::Scalar> Integrator::Dendrite::phi_old_mf

    • Set::Field<Set::Scalar>& Integrator::Dendrite::eta_mf

    • Set::Field<Set::Scalar>& Integrator::Dendrite::eta_old_mf

    • int Integrator::Dendrite::number_of_components

    • int Integrator::Dendrite::number_of_ghost_cells

    • Set::Scalar Integrator::Dendrite::alpha

    • Set::Scalar Integrator::Dendrite::delta

    • Set::Scalar Integrator::Dendrite::gamma

    • Set::Scalar Integrator::Dendrite::diffusion

    • Set::Scalar Integrator::Dendrite::eps

    • Set::Scalar Integrator::Dendrite::tau

    • Set::Scalar Integrator::Dendrite::theta

    • Set::Matrix Integrator::Dendrite::R

    • Set::Scalar Integrator::Dendrite::refinement_threshold_temp

    • Set::Scalar Integrator::Dendrite::refinement_threshold_phi

    • IC::IC<Set::Scalar>* Integrator::Dendrite::ic_temp

    • IC::IC<Set::Scalar> * Integrator::Dendrite::ic_phi

    • BC::BC<Set::Scalar>* Integrator::Dendrite::bc_temp

    • BC::BC<Set::Scalar> * Integrator::Dendrite::bc_phi

Integrator::Flame

src/Integrator/Flame.cpp src/Integrator/Flame.H

Parameter

Type

Values

plot_field

Whether to include extra fields (such as mdot, etc) in the plot output

true

timestep

Simulation timestep

1.0e-4

pf.eps

Burn width thickness

0.0

pf.kappa

Interface energy param

0.0

pf.gamma

Scaling factor for mobility

1.0

pf.lambda

Chemical potential multiplier

0.0

pf.w1

Unburned rest energy

0.0

pf.w12

Barrier energy

0.0

pf.w0

Burned rest energy

0.0

amr.ghost_cells

number of ghost cells in all fields

2

geometry.x_len

Domain x length

0.001

geometry.y_len

Domain y length

0.001

pf.eta.bc.type

Boundary conditions for phase field order params

constant

pf.eta.ic.type

phase field initial condition

laminate constant expression bmp png

thermal.on

IO::ParmParse pp("thermal"); Whether to use the Thermal Transport Model

false

elastic.on

Whether to use Neo-hookean Elastic model

0

thermal.bound

System Initial Temperature

0.0

elastic.traction

Body force

0.0

elastic.phirefinement

Phi refinement criteria

1

thermal.rho_ap

AP Density

required

thermal.rho_htpb

HTPB Density

required

thermal.k_ap

AP Thermal Conductivity

required

thermal.k_htpb

HTPB Thermal Conductivity

required

thermal.cp_ap

AP Specific Heat

required

thermal.cp_htpb

HTPB Specific Heat

required

thermal.q0

Baseline heat flux

0.0

thermal.m_ap

AP Pre-exponential factor for Arrhenius Law

required

thermal.m_htpb

HTPB Pre-exponential factor for Arrhenius Law

required

thermal.E_ap

AP Activation Energy for Arrhenius Law

required

thermal.E_htpb

HTPB Activation Energy for Arrhenius Law

required

thermal.hc

Used to change heat flux units

1.0

thermal.massfraction

Systen AP mass fraction

0.8

thermal.mlocal_ap

AP mass flux reference value

0.0

thermal.mlocal_htpb

HTPB mass flux reference value

0.0

thermal.mlocal_comb

AP/HTPB mass flux reference value

0.0

thermal.T_fluid

Temperature of the Standin Fluid

300.0

thermal.disperssion1

K; dispersion variables are use to set the outter field properties for the void grain case.

thermal.disperssion2

rho; dispersion variables are use to set the outter field properties for the void grain case.

thermal.disperssion3

cp; dispersion variables are use to set the outter field properties for the void grain case.

thermal.modeling_ap

Scaling factor for AP thermal conductivity (default = 1.0)

1.0

thermal.modeling_htpb

Scaling factor for HTPB thermal conductivity (default = 1.0)

1.0

thermal.temp.bc.type

Temperature boundary condition

constant

laser.ic.type

laser initial condition

constant expression

temp.ic.type

thermal initial condition

constant expression bmp png

pressure.P

Constant pressure value

1.0

pressure.a1

Surgate heat flux model paramater - AP

required

pressure.a2

Surgate heat flux model paramater - HTPB

required

pressure.a3

Surgate heat flux model paramater - Total

required

pressure.b1

Surgate heat flux model paramater - AP

required

pressure.b2

Surgate heat flux model paramater - HTPB

required

pressure.b3

Surgate heat flux model paramater - Total

required

pressure.c1

Surgate heat flux model paramater - Total

required

pressure.mob_ap

Whether to include pressure to the arrhenius law

0

pressure.dependency

Whether to use pressure to determined the reference Zeta

1

pressure.h1

Surgate heat flux model paramater - Homogenized

1.81

pressure.h2

Surgate heat flux model paramater - Homogenized

1.34

pressure.r_ap

AP power pressure law parameter (r*P^n)

required

pressure.r_htpb

HTPB power pressure law parameter (r*P^n)

required

pressure.r_comb

AP/HTPB power pressure law parameter (r*P^n)

required

pressure.n_ap

AP power pressure law parameter (r*P^n)

required

pressure.n_htpb

HTPB power pressure law parameter (r*P^n)

required

pressure.n_comb

AP/HTPB power pressure law parameter (r*P^n)

required

variable_pressure

Whether to compute the pressure evolution

0

homogeneousSystem

Whether to initialize Phi with homogenized properties

0

amr.refinement_criterion

Refinement criterion for eta field

0.001

amr.refinement_criterion_temp

Refinement criterion for temperature field

0.001

amr.refinament_restriction

Eta value to restrict the refinament for the temperature field

0.1

amr.phi_refinement_criterion

Refinement criterion for phi field [infinity]

1.0e100

small

Lowest value of Eta.

1.0e-8

phi.ic.type

IC type (psread, laminate, constant)

psread laminate expression constant bmp png

phi.ic.psread.eps

value.ic_phicell = new IC::PSRead(value.geom, pp, "phi.ic.psread"); AP/HTPB interface length

1.0e-5

phi.zeta_0

Reference interface length for heat integration

1.0e-5

phi.ic.laminate.eps

value.ic_phicell = new IC::Laminate(value.geom, pp, "phi.ic.laminate"); AP/HTPB interface length

1.0e-5

phi.zeta_0

Reference interface length for heat integration

1.0e-5

phi.zeta_0

value.ic_phicell = new IC::Expression(value.geom, pp, "phi.ic.expression"); Reference interface length for heat integration

1.0e-5

phi.zeta

AP/HTPB interface length

1.0e-5

phi.zeta_0

value.ic_phicell = new IC::Constant(value.geom, pp, "phi.ic.constant"); Reference interface length for heat integration

1.0e-5

phi.zeta

AP/HTPB interface length

1.0e-5

phi.zeta_0

value.ic_phicell = new IC::BMP(value.geom, pp, "phi.ic.bmp"); Reference interface length for heat integration

1.0e-5

phi.zeta

AP/HTPB interface length

1.0e-5

phi.zeta_0

Reference interface length for heat integration

1.0e-5

phi.zeta

AP/HTPB interface length

1.0e-5

Tref

Initial temperature for thermal expansion computation

300.0

allow_unused

Set this to true to allow unused inputs without error. (Not recommended.)

false

API definitions in src/Integrator/Flame.H

Classes

  • Integrator::Flame

    Methods

    • Flame()

    • Flame(IO::ParmParse &pp)

    • ~Flame()

    • Initialize(int lev) override

    • TimeStepBegin(Set::Scalar a_time, int a_iter) override

    • TimeStepComplete(Set::Scalar a_time, int a_iter) override

    • Advance(int lev, Set::Scalar time, Set::Scalar dt) override

    • TagCellsForRefinement(int lev, amrex::TagBoxArray &tags, amrex::Real, int) override

    • Regrid(int lev, Set::Scalar time) override

    • Integrate(int amrlev, Set::Scalar time, int step, const amrex::MFIter &mfi, const amrex::Box &box) override

    • UpdateModel(int a_step, Set::Scalar a_time) override

    Variables

    • Set::Field<Set::Scalar> Integrator::Flame::temp_mf

    • Set::Field<Set::Scalar> Integrator::Flame::temp_old_mf

    • Set::Field<Set::Scalar> Integrator::Flame::temps_mf

    • Set::Field<Set::Scalar> Integrator::Flame::temps_old_mf

    • Set::Field<Set::Scalar> Integrator::Flame::eta_mf

    • Set::Field<Set::Scalar> Integrator::Flame::eta_old_mf

    • Set::Field<Set::Scalar> Integrator::Flame::mob_mf

    • Set::Field<Set::Scalar> Integrator::Flame::mdot_mf

    • Set::Field<Set::Scalar> Integrator::Flame::phi_mf

    • Set::Field<Set::Scalar> Integrator::Flame::field

    • Set::Field<Set::Scalar> Integrator::Flame::alpha_mf

    • Set::Field<Set::Scalar> Integrator::Flame::heatflux_mf

    • Set::Field<Set::Scalar> Integrator::Flame::laser_mf

    • BC::BC<Set::Scalar>* Integrator::Flame::bc_temp

    • BC::BC<Set::Scalar>* Integrator::Flame::bc_eta

    • IC::IC<Set::Scalar>* Integrator::Flame::ic_phi

    • IC::IC<Set::Scalar>* Integrator::Flame::ic_laser

    • Set::Scalar Integrator::Flame::phi_refinement_criterion

    • Set::Scalar Integrator::Flame::m_refinement_criterion

    • Set::Scalar Integrator::Flame::t_refinement_criterion

    • Set::Scalar Integrator::Flame::t_refinement_restriction

    • Set::Scalar Integrator::Flame::zeta

    • Set::Scalar Integrator::Flame::zeta_0

    • Set::Scalar Integrator::Flame::small

    • Set::Scalar Integrator::Flame::base_time

    • IC::IC<Set::Scalar>* Integrator::Flame::ic_eta

    • int Integrator::Flame::ghost_count

    • int Integrator::Flame::homogeneousSystem

    • bool Integrator::Flame::plot_field

    • int Integrator::Flame::variable_pressure

    • struct Integrator::Flame Integrator::Flame::pf

    • struct Integrator::Flame Integrator::Flame::pressure

    • struct Integrator::Flame Integrator::Flame::thermal

    • struct Integrator::Flame Integrator::Flame::elastic

    • Set::Scalar Integrator::Flame::volume

    • Set::Scalar Integrator::Flame::area

    • Set::Scalar Integrator::Flame::chamber_area

    • Set::Scalar Integrator::Flame::chamber_pressure

    • Set::Scalar Integrator::Flame::massflux

    • Set::Scalar Integrator::Flame::x_len

    • Set::Scalar Integrator::Flame::y_len

    • BC::BC<Set::Scalar>* Integrator::Flame::bc_psi

    • Set::Scalar Integrator::Flame::gamma

    • Set::Scalar Integrator::Flame::eps

    • Set::Scalar Integrator::Flame::lambda

    • Set::Scalar Integrator::Flame::kappa

    • Set::Scalar Integrator::Flame::w1

    • Set::Scalar Integrator::Flame::w12

    • Set::Scalar Integrator::Flame::w0

    • Set::Scalar Integrator::Flame::min_eta

    • int Integrator::Flame::evolve

    • Set::Scalar Integrator::Flame::P

    • Set::Scalar Integrator::Flame::a1

    • Set::Scalar Integrator::Flame::a2

    • Set::Scalar Integrator::Flame::a3

    • Set::Scalar Integrator::Flame::b1

    • Set::Scalar Integrator::Flame::b2

    • Set::Scalar Integrator::Flame::b3

    • Set::Scalar Integrator::Flame::c1

    • int Integrator::Flame::mob_ap

    • int Integrator::Flame::dependency

    • Set::Scalar Integrator::Flame::h1

    • Set::Scalar Integrator::Flame::h2

    • struct Integrator::Flame Integrator::Flame::arrhenius

    • Set::Scalar Integrator::Flame::r_ap

    • Set::Scalar Integrator::Flame::r_htpb

    • Set::Scalar Integrator::Flame::r_comb

    • Set::Scalar Integrator::Flame::n_ap

    • Set::Scalar Integrator::Flame::n_htpb

    • Set::Scalar Integrator::Flame::n_comb

    • Set::Scalar Integrator::Flame::a_fit

    • Set::Scalar Integrator::Flame::b_fit

    • Set::Scalar Integrator::Flame::c_fit

    • struct Integrator::Flame Integrator::Flame::power

    • bool Integrator::Flame::on

    • Set::Scalar Integrator::Flame::rho_ap

    • Set::Scalar Integrator::Flame::rho_htpb

    • Set::Scalar Integrator::Flame::k_ap

    • Set::Scalar Integrator::Flame::k_htpb

    • Set::Scalar Integrator::Flame::cp_ap

    • Set::Scalar Integrator::Flame::cp_htpb

    • Set::Scalar Integrator::Flame::q0

    • Set::Scalar Integrator::Flame::bound

    • Set::Scalar Integrator::Flame::m_ap

    • Set::Scalar Integrator::Flame::m_htpb

    • Set::Scalar Integrator::Flame::m_comb

    • Set::Scalar Integrator::Flame::E_ap

    • Set::Scalar Integrator::Flame::E_htpb

    • Set::Scalar Integrator::Flame::hc

    • Set::Scalar Integrator::Flame::modeling_ap

    • Set::Scalar Integrator::Flame::modeling_htpb

    • Set::Scalar Integrator::Flame::mlocal_ap

    • Set::Scalar Integrator::Flame::mlocal_htpb

    • Set::Scalar Integrator::Flame::mlocal_comb

    • Set::Scalar Integrator::Flame::T_fluid

    • Set::Scalar Integrator::Flame::massfraction

    • Set::Scalar Integrator::Flame::disperssion1

    • Set::Scalar Integrator::Flame::disperssion2

    • Set::Scalar Integrator::Flame::disperssion3

    • IC::IC<Set::Scalar>* Integrator::Flame::ic_temp

    • int Integrator::Flame::on

    • Set::Scalar Integrator::Flame::Tref

    • model_type Integrator::Flame::model_ap

    • model_type Integrator::Flame::model_htpb

    • Set::Scalar Integrator::Flame::traction

    • int Integrator::Flame::phirefinement

Integrator::Fracture

src/Integrator/Fracture.H

Parameter

Type

Values

type

Type of crack {notch,ellipsoid}

API definitions in src/Integrator/Fracture.H

Classes

  • Integrator::Fracture

    Methods

    • Fracture()

    • Initialize(int ilev) override

    • TimeStepBegin(Set::Scalar, int) override

    • Advance(int lev, Set::Scalar, Set::Scalar dt) override

    • TagCellsForRefinement(int lev, amrex::TagBoxArray &a_tags, amrex::Real, int) override

    • Integrate(int amrlev, Set::Scalar, int, const amrex::MFIter &mfi, const amrex::Box &box) override

    • TimeStepComplete(amrex::Real, int) override

    Variables

    • int Integrator::Fracture::number_of_ghost_nodes - Number of ghost nodes.

    • int Integrator::Fracture::number_of_materials

    • int Integrator::Fracture::nlevels

    • struct Integrator::Fracture Integrator::Fracture::elastic

    • struct Integrator::Fracture Integrator::Fracture::crack

    • struct Integrator::Fracture Integrator::Fracture::material

    • struct Integrator::Fracture Integrator::Fracture::loading

    • Set::Field<Set::Scalar> Integrator::Fracture::disp_mf - displacement field

    • Set::Field<Set::Scalar> Integrator::Fracture::strain_mf - total strain field (gradient of displacement)

    • Set::Field<Set::Scalar> Integrator::Fracture::stress_mf - stress field

    • Set::Field<Set::Scalar> Integrator::Fracture::rhs_mf - rhs fab for elastic solution

    • Set::Field<Set::Scalar> Integrator::Fracture::residual_mf - residual field for solver

    • Set::Field<Set::Scalar> Integrator::Fracture::energy_mf - total elastic energy

    • Set::Field<Set::Scalar> Integrator::Fracture::energy_pristine_mf - energy of the prisitne material as if no crack is present

    • Set::Field<Set::Scalar> Integrator::Fracture::energy_pristine_old_mf - energy of the pristine material for previous time step.

    • Set::Scalar Integrator::Fracture::int_energy - integrated energy over the entire domain.

    • BC::Operator::Elastic::Constant Integrator::Fracture::brittlebc - elastic if using brittle fracture

    • Set::Scalar Integrator::Fracture::df_mult - mulitplier for elastic driving force.

    • bool Integrator::Fracture::do_solve_now

    • int Integrator::Fracture::interval

    • Set::Scalar Integrator::Fracture::omega

    • Set::Field<Set::Scalar> Integrator::Fracture::c_mf - crack field at current time step

    • Set::Field<Set::Scalar> Integrator::Fracture::c_old_mf - crack field at previous time step

    • Set::Field<Set::Scalar> Integrator::Fracture::driving_force_mf - crack driving forces.

    • Set::Scalar Integrator::Fracture::int_crack - integrated crack field over the entire domain.

    • Set::Scalar Integrator::Fracture::driving_force_reference

    • Set::Scalar Integrator::Fracture::driving_force_norm

    • Set::Scalar Integrator::Fracture::driving_force_norminf

    • Set::Scalar Integrator::Fracture::driving_force_tolerance_rel

    • Set::Scalar Integrator::Fracture::driving_force_tolerance_abs

    • Model::Interface::Crack::Constant Integrator::Fracture::cracktype - type of crack. See Crack/Constant or Crack/Sin

    • amrex::Vector<std::string> Integrator::Fracture::ic_type - crack type. See IC/Notch and IC/Ellipsoid

    • amrex::Vector<IC::IC<Set::Scalar>*> Integrator::Fracture::ic - crack . See IC/Notch and IC/Ellipsoid

    • bool Integrator::Fracture::is_ic

    • Set::Scalar Integrator::Fracture::scaleModulusMax - material modulus ratio inside crack (default = 0.02).

    • Set::Scalar Integrator::Fracture::refinement_threshold

    • Set::Scalar Integrator::Fracture::mult_df_Gc - Multiplier for Gc/zeta term.

    • Set::Scalar Integrator::Fracture::mult_df_lap - Multiplier for the laplacian term.

    • Set::Scalar Integrator::Fracture::beta

    • amrex::Vector<brittle_fracture_model_type_test> Integrator::Fracture::brittlemodeltype

    • Set::Field<Set::Scalar> Integrator::Fracture::material_mf

    • Set::Field<brittle_fracture_model_type_test> Integrator::Fracture::model_mf

    • std::string Integrator::Fracture::input_material

    • IC::IC<Set::Scalar>* Integrator::Fracture::ic

    • std::string Integrator::Fracture::ic_type

    • Set::Vector Integrator::Fracture::body_force

    • Set::Scalar Integrator::Fracture::val

Integrator::Hydro

src/Integrator/Hydro.cpp src/Integrator/Hydro.H

Parameter

Type

Values

eta_refinement_criterion

eta-based refinement

0.01

omega_refinement_criterion

vorticity-based refinement

0.01

gradu_refinement_criterion

velocity gradient-based refinement

0.01

p_refinement_criterion

pressure-based refinement

1e100

rho_refinement_criterion

density-based refinement

1e100

gamma

gamma for gamma law

required

cfl

cfl condition

required

cfl_v

cfl condition

1E100

mu

linear viscosity coefficient

required

pref

pp_query_default("Pfactor", value.Pfactor,1.0); // (to be removed) test factor for viscous source reference pressure for Roe solver

1.0

density.bc.type

Boundary condition for density

constant expression

energy.bc.type

Boundary condition for energy

constant expression

momentum.bc.type

Boundary condition for momentum

constant expression

pf.eta.bc.type

Boundary condition for phase field order parameter

constant expression

small

small regularization value

1E-8

cutoff

cutoff value

-1E100

lagrange

lagrange no-penetration factor

0.0

eta.ic.type

eta initial condition

constant laminate expression bmp png

velocity.ic.type

velocity initial condition

constant expression

pressure.ic.type

solid pressure initial condition

constant expression

density.ic.type

density initial condition type

constant expression

solid.momentum.ic.type

solid momentum initial condition

constant expression

solid.density.ic.type

solid density initial condition

constant expression

solid.energy.ic.type

solid energy initial condition

constant expression

m0.ic.type

diffuse boundary prescribed mass flux

constant expression

u0.ic.type

diffuse boundary prescribed velocity

constant expression

q.ic.type

diffuse boundary prescribed heat flux

constant expression

solver.type

Riemann solver

roe

API definitions in src/Integrator/Hydro.H

Classes

Integrator::HeatConduction

src/Integrator/HeatConduction.H

This implements a basic heat conduction method in Alamo. The partial differential equation to be solved is

\[\frac{\partial T}{\partial t} = \alpha\,\Delta T\]

where \(T\) is temperature, \(t\) is time, and \(alpha\) is the thermal diffusivity. Integration is performed explicitly in time using forward Euler, and differentiation is performed using the finite difference method.

Parameter

Type

Values

heat.alpha

Diffusion coefficient \(\alpha\). *This is an example of a required input variable - - program will terminate unless it is provided.*

required

heat.refinement_threshold

Criterion for mesh refinement. *This is an example of a default input variable. The default value is provided here, not in the definition of the variable.*

0.01

ic.type

Initial condition type.

constant sphere expression

bc.temp.type

Select BC object for temperature

constant expression

method

Select between using a realspace solve or the spectral method

realspace spectral

API definitions in src/Integrator/HeatConduction.H

Classes

  • Integrator::HeatConduction

    Methods

    • HeatConduction(int a_nghost=2)

    • HeatConduction(IO::ParmParse &pp)

    • ~HeatConduction()

    • Initialize(int lev)

    • Advance(int lev, Set::Scalar time, Set::Scalar dt)

    • AdvanceSpectral(int, Set::Scalar, Set::Scalar)

    • TagCellsForRefinement(int lev, amrex::TagBoxArray &a_tags, Set::Scalar, int)

    Variables

    • Set::Field<Set::Scalar> Integrator::HeatConduction::temp_mf

    • Set::Field<Set::Scalar> Integrator::HeatConduction::temp_old_mf

    • std::string Integrator::HeatConduction::method

    • const int Integrator::HeatConduction::number_of_components

    • const int Integrator::HeatConduction::number_of_ghost_cells

    • Set::Scalar Integrator::HeatConduction::alpha

    • Set::Scalar Integrator::HeatConduction::refinement_threshold

    • IC::IC<Set::Scalar>* Integrator::HeatConduction::ic

    • BC::BC<Set::Scalar>* Integrator::HeatConduction::bc

Integrator::Mechanics

src/Integrator/Mechanics.H

This is a general purpose integrator that focuses on solving elasticity/mechanics equations in the absence of other multiphysics simulations. It is enabled by alamo.program=mechanics if used on its own, in which case there is no prefix. If it is being used by another integrator, see that integrator to determine the value of [prefix] (often equal to elastic).

This integrator inherits from Integrator::Base::Mechanics; see documentation for that integrator for additional parameters.

Model setup There are two basic tools for setting up a mechanics problem in this integrator.

  1. The eta field: this is used to mix models of different types. Use nmodels to specify how many material models to use, and then specify each model as model1, model2, etc. The type of moel is specified using the alamo.program.mechanics.model input.

    Once you have done this, you must determine the spatial distribution of each model. This is done by choosing an IC for the eta field with ic.type. The IC::Expression is the most general and recommended. The models are then mixed linearly, i.e.

    \[W_{\textrm{eff}} = \sum_{i=1}^N W_i\,\eta_i(\mathbf{x})\]

    See the Eshelby test for an example of model mixing.

  2. The psi field: this is used specifically for cases where a “void” region is desired. Its usage is similar to the eta case, and is conceptually similar in that it scales the model field to near-zero in order to mimic the (lack of) mechanical behavior in an empty region. It is important to use psi here, for reasons that are discussed in detail in this paper. The initialization of psi is similar to that for eta.

    See the PlateHole and RubberPlateHole for canonical exmaples. The Integrator::Fracture and Integrator::TopOp integrators are examples of integrators that leverage the psi property.

Body forces currently have limited support due to the relatively low number of times they are needed. See the Integrator::Base::Mechanics documentation for detail. See the TrigTest test for examples of current body force implementation.

Boundary conditions are implemented using the BC::Operator::Elastic classes. See the documentation on these classes for more detail. See any of the mechanics-based tests for examples of boundary condition application.

Parameter

Type

Values

nmodels

Number of elastic model varieties

1

eta_ref_threshold

Refinement threshold for eta field

0.01

ref_threshold

Refinement threshold for strain gradient

0.01

model_neumann_boundary

Explicity impose neumann condition on model at domain boundaries (2d only)

false

ic.type

Select the initial condition for eta

constant ellipse voronoi bmp png expression psread

eta.reset_on_regrid

Whether to re-initialize eta when re-gridding occurs. Default is false unless eta ic is set, then default is. true.

true

psi.ic.type

Select initial condition for psi field

ellipse constant expression psread png

psi.reset_on_regrid

Whether to re-initialize psi when re-gridding occurs. Default is false unless a psi ic is set, then default is true.

true

trac_normal.ic.type

Read in IC for the "normal traction" field (applied at diffuse boundaries)

ellipse constant expression psread

API definitions in src/Integrator/Mechanics.H

Classes

  • Integrator::Mechanics

    Methods

    • Mechanics()

    • Mechanics(IO::ParmParse &pp)

    • ~Mechanics()

    • Initialize(int lev) override

    • UpdateModel(int a_step, Set::Scalar time) override

    • TagCellsForRefinement(int lev, amrex::TagBoxArray &a_tags, Set::Scalar a_time, int a_ngrow) override

    • Regrid(int lev, Set::Scalar time) override

    Variables

    • Set::Field<Set::Scalar> Integrator::Mechanics< MODEL >::eta_mf

    • Set::Scalar Integrator::Mechanics< MODEL >::m_eta_ref_threshold

    • std::vector<MODEL> Integrator::Mechanics< MODEL >::models

    • IC::IC<Set::Scalar>* Integrator::Mechanics< MODEL >::ic_eta

    • IC::IC<Set::Scalar>* Integrator::Mechanics< MODEL >::ic_psi

    • IC::IC<Set::Scalar>* Integrator::Mechanics< MODEL >::ic_trac_normal

    • BC::BC<Set::Scalar>* Integrator::Mechanics< MODEL >::bc_psi

    • BC::BC<Set::Scalar>* Integrator::Mechanics< MODEL >::bc_trac_normal

    • bool Integrator::Mechanics< MODEL >::psi_reset_on_regrid

    • bool Integrator::Mechanics< MODEL >::eta_reset_on_regrid

    • bool Integrator::Mechanics< MODEL >::model_neumann_boundary

    • Set::Field<Set::Scalar> Integrator::Mechanics< MODEL >::trac_normal_mf

Integrator::PFC

src/Integrator/PFC.cpp src/Integrator/PFC.H

Basic implementation of the phase field crystal model of Elder et al, 2002.

Free energy functional is:

\[\mathcal{F} = \int \Big[ \frac{1}{2}\eta\Big((q^2+\nabla^2)^2 - \epsilon\Big)\eta + \frac{1}{4}\eta^4 \Big]d\mathbf{x}\]

Order parameter evolves with Cahn-Hilliard kinetics:

\[\frac{\partial \eta}{\partial t} = \nabla^2 \frac{\delta\mathcal{F}}{\delta\eta}\]

The variational derivative is

\[\frac{\delta\mathcal{F}}{\delta\eta} = \eta^3 + (q^4-\epsilon)\eta + 2q^2\nabla^2\eta + \nabla^4\eta\]

The semi-implicit spectral update is

\[\eta_{n+1} = \frac{\hat{\eta}_n - dt\,\mathbf{\omega}^2 \mathcal{F}[\eta^3_n]} {1 + dt\,[(q^4-\epsilon)\mathbf{\omega}^2 - 2q^2\mathbf{\omega}^4 + \mathbf{\omega}^6]}\]

Parameter

Type

Values

q0

frequency term

required

eps

chemical potential width

required

eta.ic.type

initial condition for \(\eta\)

random

eta.bc.type

boundary condition for \(\eta\)

constant

API definitions in src/Integrator/PFC.H

Classes

  • Integrator::PFC

    Methods

    • PFC() - Basic constructor (don’t use)

    • ~PFC() - Destroy pointers defined in Parse.

    • PFC(IO::ParmParse &pp) - Use this constructor.

    • Initialize(int lev) override - values in fields.

    • Advance(int lev, Set::Scalar time, Set::Scalar dt) override - Integrate eta over one timestep on lev.

    • TagCellsForRefinement(int lev, amrex::TagBoxArray &tags, amrex::Real time, int ngrow) override - Mark any cells that need to be refined.

    Variables

    • Set::Field<Set::Scalar> Integrator::PFC::eta_mf

    • Set::Field<Set::Scalar> Integrator::PFC::grad_chempot_mf - Order parameter field.

    • BC::BC<Set::Scalar>* Integrator::PFC::bc - to calculate FFT of nonlinar part.

    • IC::IC<Set::Scalar>* Integrator::PFC::ic - eta’s bc object

    • Set::Scalar Integrator::PFC::q0 - eta’s ic object

    • Set::Scalar Integrator::PFC::eps

Integrator::PhaseFieldMicrostructure

src/Integrator/PhaseFieldMicrostructure.cpp src/Integrator/PhaseFieldMicrostructure.H

file PhaseFieldMicrostructure.H

Parameter

Type

Values

pf.number_of_grains

Number of grain fields (may be more if using different IC)

2

pf.M

Mobility

required

pf.gamma

Phase field \(\gamma\)

required

pf.sigma0

Initial GB energy if not using anisotropy

required

pf.l_gb

Mobility

required

pf.elastic_df

Determine whether to use elastic driving force

false

pf.elastic_mult

Multiplier of elastic energy

1.0

pf.threshold.value

Value used for thresholding kinetic relation

0.0

pf.threshold.chempot

Whether to include chemical potential in threshold

false

pf.threshold.boundary

Whether to include boundary energy in threshold

false

pf.threshold.corner

Whether to include corner regularization in threshold

false

pf.threshold.lagrange

Whether to include lagrange multiplier in threshold

false

pf.threshold.mechanics

Whether to include mechanical driving force in threshold

false

pf.threshold.type

Type of thresholding to use

continuous chop

amr.max_level

Maximum AMR level

required

amr.ref_threshold

Phase field refinement threshold

0.1

mechanics.type

Reading this is redundant but necessary because of the way the code was originally structured (need to fix eventually)

disable static dynamic

mechanics.tstart

Elasticity

0.0

mechanics.mix_order

Mixing order

1 2

mechanics.model_neuman_boundary

Force Neumann BCs on the model

false

lagrange.on

Lagrange multiplier method for enforcing volumes

false

lagrange.lambda

Lagrange multiplier value

required

lagrange.vol0

Prescribed volume

required

lagrange.tstart

Lagrange multipler start time

0.0

sdf.on

synthetic driving force (SDF)

false

sdf.val

value of SDF for each grain

sdf.tstart

time to begin applying SDF

0.0

anisotropy.on

Turn on

false

anisotropy.beta

Regularization para m

required

anisotropy.tstart

Time to turn on anisotropy

required

anisotropy.timestep

Modify timestep when turned on

required

anisotropy.plot_int

Modify plot_int when turned on

-1

anisotropy.plot_dt

Modify plot_dt when turned on

-1.0

anisotropy.thermo_int

Modify thermo int when turned on

-1

anisotropy.thermo_plot_int

Modify thermo plot int when turned on

-1

anisotropy.elastic_int

Frequency of elastic calculation

-1

anisotropy.regularization

Type of regularization to use

k12 wilmore

anisotropy.type

Type of GB to use

abssin sin read sh

fluctuation.on

Thermal fluctuations

fluctuation.amp

fluctuation amplitude

fluctuation.sd

fluctuation stadard deviation

fluctuation.tstart

time to start applying fluctuation

disconnection.on

Disconnection generation

shearcouple.on

Shear coupling matrices

false

bc.eta.type

Boundary condition for eta

constant

ic.type

Initial condition for the order parameter eta

constant perturbedinterface voronoi expression sphere ellipse random

anisotropic_kinetics.on

Anisotropic mobility

0

anisotropic_kinetics.tstart

simulation time when anisotropic kinetics is activated

0.0

anisotropic_kinetics.mobility

file containing anisotropic mobility data

file path

anisotropic_kinetics.threshold

file containing anisotropic mobility data

file path

API definitions in src/Integrator/PhaseFieldMicrostructure.H

Classes

  • Integrator::PhaseFieldMicrostructure - Solve the Allen-Cahn evolution equation for microstructure with parameters , where n corresponds to the number of grains.

    Methods

    • PhaseFieldMicrostructure()

    • PhaseFieldMicrostructure(IO::ParmParse &pp)

    • ~PhaseFieldMicrostructure()

    • Advance(int lev, Real time, Real dt) override - Evolve phase field in time.

    • Initialize(int lev) override

    • TagCellsForRefinement(int lev, amrex::TagBoxArray &tags, amrex::Real time, int ngrow) override

    • TimeStepBegin(amrex::Real time, int iter) override

    • TimeStepComplete(amrex::Real time, int iter) override

    • Integrate(int amrlev, Set::Scalar time, int step, const amrex::MFIter &mfi, const amrex::Box &box) override

    • UpdateEigenstrain(int lev)

    • UpdateEigenstrain()

    • UpdateModel(int, Set::Scalar) override

    Variables

    • const std::string Integrator::PhaseFieldMicrostructure< model_type >::name

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::M

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::L

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::mu

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::gamma

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::sigma0

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::l_gb

    • bool Integrator::PhaseFieldMicrostructure< model_type >::elastic_df

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::elastic_mult

    • bool Integrator::PhaseFieldMicrostructure< model_type >::on

    • bool Integrator::PhaseFieldMicrostructure< model_type >::chempot

    • bool Integrator::PhaseFieldMicrostructure< model_type >::boundary

    • bool Integrator::PhaseFieldMicrostructure< model_type >::corner

    • bool Integrator::PhaseFieldMicrostructure< model_type >::lagrange

    • bool Integrator::PhaseFieldMicrostructure< model_type >::mechanics

    • bool Integrator::PhaseFieldMicrostructure< model_type >::sdf

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::value

    • ThresholdType Integrator::PhaseFieldMicrostructure< model_type >::type

    • struct Integrator::PhaseFieldMicrostructure Integrator::PhaseFieldMicrostructure< model_type >::threshold

    • int Integrator::PhaseFieldMicrostructure< model_type >::on

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::tstart

    • Numeric::Interpolator::Linear<Set::Scalar> Integrator::PhaseFieldMicrostructure< model_type >::mobility

    • Numeric::Interpolator::Linear<Set::Scalar> Integrator::PhaseFieldMicrostructure< model_type >::threshold

    • Set::Field<Set::Scalar> Integrator::PhaseFieldMicrostructure< model_type >::L_mf

    • Set::Field<Set::Scalar> Integrator::PhaseFieldMicrostructure< model_type >::threshold_mf

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::beta

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::timestep

    • int Integrator::PhaseFieldMicrostructure< model_type >::plot_int

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::plot_dt

    • int Integrator::PhaseFieldMicrostructure< model_type >::thermo_int

    • int Integrator::PhaseFieldMicrostructure< model_type >::thermo_plot_int

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::theta0

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::sigma1

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::phi0

    • int Integrator::PhaseFieldMicrostructure< model_type >::elastic_int

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::vol0

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::lambda

    • std::vector<Numeric::Interpolator::Linear<Set::Scalar> > Integrator::PhaseFieldMicrostructure< model_type >::val

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::amp

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::sd

    • std::normal_distribution<double> Integrator::PhaseFieldMicrostructure< model_type >::norm_dist

    • std::default_random_engine Integrator::PhaseFieldMicrostructure< model_type >::rand_num_gen

    • Model::Defect::Disconnection Integrator::PhaseFieldMicrostructure< model_type >::model

    • std::vector<Set::Matrix> Integrator::PhaseFieldMicrostructure< model_type >::Fgb

    • std::vector<model_type> Integrator::PhaseFieldMicrostructure< model_type >::model

    • int Integrator::PhaseFieldMicrostructure< model_type >::model_mix_order

    • bool Integrator::PhaseFieldMicrostructure< model_type >::model_neumann_boundary

    • int Integrator::PhaseFieldMicrostructure< model_type >::number_of_grains

    • int Integrator::PhaseFieldMicrostructure< model_type >::number_of_ghost_cells

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::ref_threshold

    • Set::Field<Set::Scalar> Integrator::PhaseFieldMicrostructure< model_type >::eta_mf

    • Set::Field<Set::Scalar> Integrator::PhaseFieldMicrostructure< model_type >::eta_old_mf

    • Set::Field<Set::Scalar> Integrator::PhaseFieldMicrostructure< model_type >::driving_force_mf

    • Set::Field<Set::Scalar> Integrator::PhaseFieldMicrostructure< model_type >::driving_force_threshold_mf

    • Set::Field<Set::Scalar> Integrator::PhaseFieldMicrostructure< model_type >::fluct_mf

    • Set::Field<Set::Scalar> Integrator::PhaseFieldMicrostructure< model_type >::totaldf_mf

    • BC::BC<Set::Scalar>* Integrator::PhaseFieldMicrostructure< model_type >::mybc

    • RegularizationType Integrator::PhaseFieldMicrostructure< model_type >::regularization

    • struct Integrator::PhaseFieldMicrostructure Integrator::PhaseFieldMicrostructure< model_type >::pf

    • struct Integrator::PhaseFieldMicrostructure Integrator::PhaseFieldMicrostructure< model_type >::anisotropic_kinetics

    • struct Integrator::PhaseFieldMicrostructure Integrator::PhaseFieldMicrostructure< model_type >::anisotropy

    • struct Integrator::PhaseFieldMicrostructure Integrator::PhaseFieldMicrostructure< model_type >::lagrange

    • struct Integrator::PhaseFieldMicrostructure Integrator::PhaseFieldMicrostructure< model_type >::sdf

    • struct Integrator::PhaseFieldMicrostructure Integrator::PhaseFieldMicrostructure< model_type >::fluctuation

    • struct Integrator::PhaseFieldMicrostructure Integrator::PhaseFieldMicrostructure< model_type >::disconnection

    • struct Integrator::PhaseFieldMicrostructure Integrator::PhaseFieldMicrostructure< model_type >::shearcouple

    • std::string Integrator::PhaseFieldMicrostructure< model_type >::gb_type

    • std::string Integrator::PhaseFieldMicrostructure< model_type >::filename

    • Model::Interface::GB::GB* Integrator::PhaseFieldMicrostructure< model_type >::boundary

    • IC::IC<Set::Scalar>* Integrator::PhaseFieldMicrostructure< model_type >::ic

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::volume

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::area

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::gbenergy

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::realgbenergy

    • Set::Scalar Integrator::PhaseFieldMicrostructure< model_type >::regenergy

    • struct Integrator::PhaseFieldMicrostructure Integrator::PhaseFieldMicrostructure< model_type >::mechanics

Integrator::SFI

src/Integrator/SFI.H

Parameter

Type

Values

tstart

time to activate hydro integrator

0.0

invert

If true, set hydro_eta to 1-pf_eta

false

API definitions in src/Integrator/SFI.H

Classes

Integrator::SutureCrack

src/Integrator/SutureCrack.H

Parameter

Type

Values

type

Crack type to use {notch}

API definitions in src/Integrator/SutureCrack.H

Classes

  • Integrator::SutureCrack

    Methods

    • SutureCrack()

    • Initialize(int ilev) override

    • TimeStepBegin(Set::Scalar, int iter) override

    • Advance(int lev, Set::Scalar, Set::Scalar dt) override

    • TagCellsForRefinement(int lev, amrex::TagBoxArray &a_tags, amrex::Real, int) override

    • Integrate(int amrlev, Set::Scalar, int, const amrex::MFIter &mfi, const amrex::Box &box)

    • TimeStepComplete(amrex::Real, int)

    Variables

    • int Integrator::SutureCrack::number_of_ghost_nodes - Number of ghost nodes.

    • int Integrator::SutureCrack::number_of_materials

    • int Integrator::SutureCrack::nlevels

    • struct Integrator::SutureCrack Integrator::SutureCrack::elastic

    • struct Integrator::SutureCrack Integrator::SutureCrack::crack

    • struct Integrator::SutureCrack Integrator::SutureCrack::material

    • struct Integrator::SutureCrack Integrator::SutureCrack::sol

    • struct Integrator::SutureCrack Integrator::SutureCrack::loading

    • Set::Field<Set::Scalar> Integrator::SutureCrack::disp - displacement field

    • Set::Field<Set::Scalar> Integrator::SutureCrack::strain - total strain field (gradient of displacement)

    • Set::Field<Set::Scalar> Integrator::SutureCrack::stress - stress field

    • Set::Field<Set::Scalar> Integrator::SutureCrack::rhs - rhs fab for elastic solution

    • Set::Field<Set::Scalar> Integrator::SutureCrack::residual - residual field for solver

    • Set::Field<Set::Scalar> Integrator::SutureCrack::energy - total elastic energy

    • Set::Field<Set::Scalar> Integrator::SutureCrack::energy_pristine - energy of the prisitne material as if no crack is present

    • Set::Field<Set::Scalar> Integrator::SutureCrack::energy_pristine_old - energy of the pristine material for previous time step.

    • BC::Operator::Elastic::Constant Integrator::SutureCrack::brittlebc - elastic if using brittle fracture

    • Set::Scalar Integrator::SutureCrack::df_mult - mulitplier for elastic driving force.

    • bool Integrator::SutureCrack::do_solve_now

    • Set::Field<Set::Scalar> Integrator::SutureCrack::field - crack field at current time step

    • Set::Field<Set::Scalar> Integrator::SutureCrack::field_old - crack field at previous time step

    • Set::Field<Set::Scalar> Integrator::SutureCrack::driving_force - crack driving forces.

    • Set::Scalar Integrator::SutureCrack::driving_force_reference

    • Set::Scalar Integrator::SutureCrack::driving_force_norm

    • Set::Scalar Integrator::SutureCrack::driving_force_tolerance_rel

    • Set::Scalar Integrator::SutureCrack::driving_force_tolerance_abs

    • Model::Interface::Crack::Crack* Integrator::SutureCrack::cracktype - type of crack. See Crack/Constant or Crack/Sin

    • std::string Integrator::SutureCrack::ic_type - crack type. See IC/Notch and IC/Ellipsoid

    • IC::IC* Integrator::SutureCrack::ic - crack . See IC/Notch and IC/Ellipsoid

    • bool Integrator::SutureCrack::is_ic

    • Set::Scalar Integrator::SutureCrack::scaleModulusMax - material modulus ratio inside crack (default = 0.02).

    • Set::Scalar Integrator::SutureCrack::refinement_threshold

    • Set::Scalar Integrator::SutureCrack::mult_df_Gc - Multiplier for Gc/zeta term.

    • Set::Scalar Integrator::SutureCrack::mult_df_lap - Multiplier for the laplacian term.

    • suture_fracture_model_type Integrator::SutureCrack::brittlemodeltype

    • Set::Field<Set::Scalar> Integrator::SutureCrack::modulus_field

    • Set::Field<suture_fracture_model_type> Integrator::SutureCrack::brittlemodel

    • std::string Integrator::SutureCrack::input_material

    • Set::Scalar Integrator::SutureCrack::bottom_tol

    • int Integrator::SutureCrack::interval

    • std::string Integrator::SutureCrack::type

    • int Integrator::SutureCrack::max_iter

    • int Integrator::SutureCrack::max_fmg_iter

    • int Integrator::SutureCrack::bottom_max_iter

    • int Integrator::SutureCrack::max_fixed_iter

    • int Integrator::SutureCrack::verbose

    • int Integrator::SutureCrack::cgverbose

    • Set::Scalar Integrator::SutureCrack::tol_rel

    • Set::Scalar Integrator::SutureCrack::tol_abs

    • Set::Scalar Integrator::SutureCrack::cg_tol_rel

    • Set::Scalar Integrator::SutureCrack::cg_tol_abs

    • Set::Scalar Integrator::SutureCrack::tstart

    • Set::Scalar Integrator::SutureCrack::tend

    • std::string Integrator::SutureCrack::bottom_solver

    • int Integrator::SutureCrack::linop_maxorder

    • bool Integrator::SutureCrack::use_fsmooth

    • int Integrator::SutureCrack::max_coarsening_level

    • bool Integrator::SutureCrack::agglomeration

    • bool Integrator::SutureCrack::consolidation

    • int Integrator::SutureCrack::pre_smooth

    • int Integrator::SutureCrack::post_smooth

    • Set::Vector Integrator::SutureCrack::body_force

    • Set::Scalar Integrator::SutureCrack::val

Integrator::TopOp

src/Integrator/TopOp.H

Parameter

Type

Values

psi.ic.type

Initial condition for psi field

ellipse constant

eta_ref_threshold

Refinement threshold based on eta

0.01

alpha

\(\alpha\) parameter

1.0

beta

\(\beta\) parameter

1.0

gamma

\(\gamma\) parameter

1.0

volume0frac

Prescribed volume fraction

0.5

volume0

Prescribed total vlume

0.5

API definitions in src/Integrator/TopOp.H

Classes

  • Integrator::TopOp

    Methods

    • TopOp()

    • TopOp(IO::ParmParse &pp)

    • ~TopOp()

    • Initialize(int lev) override

    • UpdateModel(int a_step, Set::Scalar) override

    • Advance(int lev, Set::Scalar time, Set::Scalar dt) override

    • Integrate(int amrlev, Set::Scalar time, int step, const amrex::MFIter &mfi, const amrex::Box &box) override

    • TagCellsForRefinement(int lev, amrex::TagBoxArray &a_tags, Set::Scalar a_time, int a_ngrow) override

    Variables

    • MODEL Integrator::TopOp< MODEL >::model

    • IC::IC<Set::Scalar>* Integrator::TopOp< MODEL >::ic_psi

    • BC::BC<Set::Scalar>* Integrator::TopOp< MODEL >::bc_psi

    • Set::Scalar Integrator::TopOp< MODEL >::m_eta_ref_threshold

    • Set::Field<Set::Scalar> Integrator::TopOp< MODEL >::psi_old_mf

    • Set::Scalar Integrator::TopOp< MODEL >::alpha

    • Set::Scalar Integrator::TopOp< MODEL >::beta

    • Set::Scalar Integrator::TopOp< MODEL >::gamma

    • Numeric::Interpolator::Linear<Set::Scalar> Integrator::TopOp< MODEL >::L

    • Set::Scalar Integrator::TopOp< MODEL >::volume0

    • Numeric::Interpolator::Linear<Set::Scalar> Integrator::TopOp< MODEL >::lambda

    • Set::Scalar Integrator::TopOp< MODEL >::volume

    • Set::Scalar Integrator::TopOp< MODEL >::w_chem_potential

    • Set::Scalar Integrator::TopOp< MODEL >::w_bndry

    • Set::Scalar Integrator::TopOp< MODEL >::w_elastic

Integrator::ThermoElastic

src/Integrator/ThermoElastic.H

Parameter

Type

Values

alpha

Diffusion coefficient

API definitions in src/Integrator/ThermoElastic.H

Classes

  • Integrator::ThermoElastic

    Methods

    • ThermoElastic()

    • ~ThermoElastic()=default

    • ThermoElastic(IO::ParmParse &pp)

    • Initialize(int lev) override

    • UpdateModel(int a_step, Set::Scalar a_time) override

    • TimeStepBegin(Set::Scalar a_time, int a_step) override

    • Advance(int a_lev, amrex::Real a_time, amrex::Real a_dt) override

    • TagCellsForRefinement(int a_lev, amrex::TagBoxArray &a_tags, Set::Scalar a_time, int a_ngrow) override

    Variables

    • std::vector<Set::Scalar> Integrator::ThermoElastic::alpha

Integrator::Base

Integrator::Base::Mechanics

src/Integrator/Base/Mechanics.H

Parameter

Type

Values

type

Type of mecahnics to use. Static: do full implicit solve. Dynamic: evolve dynamic equations with explicit dynamics Disable: do nothing.

disable static dynamic

time_evolving

Treat mechanics fields as changing in time. [false] You should use this if you care about other physics driven by the output of this integrator.

false

plot_disp

Include displacement field in output

true

plot_rhs

Include right-hand side in output

true

plot_psi

Include \(\psi\) field in output

true

plot_stress

Include stress in output

true

plot_strain

Include strain in output

true

viscous.mu_dashpot

Dashpot damping (damps velocity)

0.0

viscous.mu_newton

Newtonian viscous damping (damps velocity gradient)

0.0

velocity.ic.type

Initializer for RHS

none expression

bc.type

Select the mechanical boundary conditions

constant tensiontest expression

print_model

Print out model variables (if enabled by model)

false

rhs.type

initial condition for right hand side (body force)

constant expression trig

interval

Timestep interval for elastic solves (default - solve every time)

0

max_coarsening_level

Maximum multigrid coarsening level (default - none, maximum coarsening)

-1

print_residual

Whether to include residual output field

false

elastic_ref_threshold

Whether to refine based on elastic solution

0.01

zero_out_displacement

Set this to true to zero out the displacement before each solve. (This is a temporary fix - we need to figure out why this is needed.)

false

tstart

Time to start doing the elastic solve (by default, start immediately)

-1.0

API definitions in src/Integrator/Base/Mechanics.H

Classes

  • Integrator::Base::Mechanics

    Methods

    • Mechanics()

    • ~Mechanics()

    • Initialize(int lev) override - Use the #ic object to initialize::Temp.

    • UpdateModel(int a_step, Set::Scalar a_time)=0

    • TimeStepBegin(Set::Scalar a_time, int a_step) override

    • Advance(int lev, Set::Scalar time, Set::Scalar dt) override

    • Integrate(int amrlev, Set::Scalar, int, const amrex::MFIter &mfi, const amrex::Box &a_box) override

    • TagCellsForRefinement(int lev, amrex::TagBoxArray &a_tags, Set::Scalar, int) override

    Variables

    • Set::Field<MODEL> Integrator::Base::Mechanics< MODEL >::model_mf

    • Set::Field<MATRIX4> Integrator::Base::Mechanics< MODEL >::ddw_mf

    • Set::Field<Set::Scalar> Integrator::Base::Mechanics< MODEL >::psi_mf

    • bool Integrator::Base::Mechanics< MODEL >::psi_on

    • int Integrator::Base::Mechanics< MODEL >::m_interval

    • Type Integrator::Base::Mechanics< MODEL >::m_type

    • Set::Field<Set::Vector> Integrator::Base::Mechanics< MODEL >::disp_mf

    • Set::Field<Set::Vector> Integrator::Base::Mechanics< MODEL >::rhs_mf

    • Set::Field<Set::Vector> Integrator::Base::Mechanics< MODEL >::res_mf

    • Set::Field<Set::Matrix> Integrator::Base::Mechanics< MODEL >::stress_mf

    • Set::Field<Set::Matrix> Integrator::Base::Mechanics< MODEL >::strain_mf

    • Set::Field<Set::Vector> Integrator::Base::Mechanics< MODEL >::disp_old_mf

    • Set::Field<Set::Vector> Integrator::Base::Mechanics< MODEL >::vel_mf

    • Set::Field<Set::Vector> Integrator::Base::Mechanics< MODEL >::vel_old_mf

    • Set::Scalar Integrator::Base::Mechanics< MODEL >::rho

    • Set::Scalar Integrator::Base::Mechanics< MODEL >::mu_dashpot

    • Set::Scalar Integrator::Base::Mechanics< MODEL >::mu_newton

    • Set::Vector Integrator::Base::Mechanics< MODEL >::trac_hi[AMREX_SPACEDIM]

    • Set::Vector Integrator::Base::Mechanics< MODEL >::disp_hi[AMREX_SPACEDIM]

    • IC::IC<Set::Vector>* Integrator::Base::Mechanics< MODEL >::ic_rhs

    • IC::IC<Set::Vector>* Integrator::Base::Mechanics< MODEL >::velocity_ic

    • Solver::Nonlocal::Newton<MODEL> Integrator::Base::Mechanics< MODEL >::solver

    • BC::Operator::Elastic::Elastic* Integrator::Base::Mechanics< MODEL >::bc

    • Set::Scalar Integrator::Base::Mechanics< MODEL >::m_elastic_ref_threshold

    • bool Integrator::Base::Mechanics< MODEL >::m_print_model

    • bool Integrator::Base::Mechanics< MODEL >::m_print_residual

    • bool Integrator::Base::Mechanics< MODEL >::m_time_evolving

    • int Integrator::Base::Mechanics< MODEL >::m_max_coarsening_level

    • bool Integrator::Base::Mechanics< MODEL >::m_zero_out_displacement

    • bool Integrator::Base::Mechanics< MODEL >::plot_disp

    • bool Integrator::Base::Mechanics< MODEL >::plot_stress

    • bool Integrator::Base::Mechanics< MODEL >::plot_strain

    • bool Integrator::Base::Mechanics< MODEL >::plot_psi

    • bool Integrator::Base::Mechanics< MODEL >::plot_rhs

    • Set::Scalar Integrator::Base::Mechanics< MODEL >::tstart


Model

Model::Model

src/Model/Model.H

In Alamo, any type of constitutive behavior is encapsulated in a “Model”. There is a broad range of model types, and so there is no abstract Model class. Rather, the base Model classes are stored in subsets of Model.

API definitions in src/Model/Model.H

Classes

Model::Defect

Model::Defect::Disconnection

src/Model/Defect/Disconnection.H

This simulates the creation of “disconnection pairs” at a GB by perturbing the order parameter \(\eta\) with a gaussian.

Disconnections can be nucleated randomly, or they can be added in a controlled way through the “fixed” option.

See the following reference for further details

[GR21]

Mahi Gokuli and Brandon Runnels. Multiphase field modeling of grain boundary migration mediated by emergent disconnections. Acta Materialia, 217:117149, 2021.

Parameter

Type

Values

tstart

time to start applying disconnections

0.0

nucleation_energy

nucleation energy

0.0

tau_vol

characteristic time

1.0

temp

temperature

0.0

box_size

characteristic size

0.0

interval

interval between generation events

required

epsilon

regularization epsilon

1E-20

disconnection.fixed.on

whether to manually specify disconnection nucleation points

fixed.sitex

array of x locations

fixed.sitey

array of y locations

fixed.phases

array of order parameter number

fixed.time

time to appear

verbose

verbosity

false

API definitions in src/Model/Defect/Disconnection.H

Classes

  • Model::Defect::Disconnection

    Methods

    • Disconnection()

    • ~Disconnection()

    • Nucleate(Set::Field< Set::Scalar > &eta_mf, std::vector< amrex::Geometry > &geom, Set::Scalar timestep, Set::Scalar time, int iter) - This operates on an entire field, and manages all of the MPI communication necessary for consistent nucleation.

    Variables

    • bool Model::Defect::Disconnection::verbose

    • Set::Scalar Model::Defect::Disconnection::tstart

    • Set::Scalar Model::Defect::Disconnection::nucleation_energy

    • Set::Scalar Model::Defect::Disconnection::tau_vol

    • Set::Scalar Model::Defect::Disconnection::temp

    • Set::Scalar Model::Defect::Disconnection::box_size

    • Set::Scalar Model::Defect::Disconnection::epsilon

    • int Model::Defect::Disconnection::interval

    • std::uniform_real_distribution<double> Model::Defect::Disconnection::unif_dist

    • std::uniform_int_distribution<int> Model::Defect::Disconnection::int_dist - random number distribution for spatial location

    • std::default_random_engine Model::Defect::Disconnection::rand_num_gen - random number generator for phase

    • struct Model::Defect::Disconnection Model::Defect::Disconnection::fixed - generator object

    • const Set::Scalar Model::Defect::Disconnection::K_b - list of nucleation site phases (up or down)

    • int Model::Defect::Disconnection::on

    • std::vector< Set::Scalar > Model::Defect::Disconnection::sitex

    • std::vector< Set::Scalar > Model::Defect::Disconnection::sitey - list of nucleation site x coordinates

    • std::vector< int > Model::Defect::Disconnection::phases - list of nucleation stie y coordinates

    • std::vector<Set::Scalar> Model::Defect::Disconnection::time

    • std::vector<bool> Model::Defect::Disconnection::done

Model::Interface

Model::Interface::Crack

Model::Interface::Crack::Crack

src/Model/Interface/Crack/Crack.H

API definitions in src/Model/Interface/Crack/Crack.H

Classes

  • Model::Interface::Crack::Crack

    Methods

    • Crack()

    • w_phi(Set::Scalar c, Set::Scalar)

    • g_phi(Set::Scalar c, Set::Scalar p=0.)

    • Dw_phi(Set::Scalar c, Set::Scalar)

    • Dg_phi(Set::Scalar c, Set::Scalar p=0.)

    • Gc(Set::Scalar theta)=0

    • DGc(Set::Scalar theta)=0

    • DDGc(Set::Scalar theta)=0

    • Zeta(Set::Scalar theta)=0

    • Mobility(Set::Scalar theta)=0

    • DrivingForceThreshold(Set::Scalar theta)=0

    • ExportToFile(std::string filename, amrex::Real dTheta)

    • SetGType(const GType a_type)

    • SetWType(const WType a_type)

    • SetDuctileExponent(const Set::Scalar m)

    Variables

    • GType Model::Interface::Crack::Crack::g_type

    • WType Model::Interface::Crack::Crack::w_type

    • Set::Scalar Model::Interface::Crack::Crack::m_d_exponent

Model::Interface::Crack::Constant

src/Model/Interface/Crack/Constant.H

Parameter

Type

Values

G_c

Fracture energy

zeta

Lengthscale regularization

mobility

Mobility (speed)

threshold

Threshold

gtype

Type of g function to use {square, multiwell, 4c3, squarep, squarepexp, cubicm}

wtype

Type o w function to use {square, multiwell, multiwell2, 4c3}

API definitions in src/Model/Interface/Crack/Constant.H

Classes

  • Model::Interface::Crack::Constant

    Methods

    • Constant()

    • Gc(Set::Scalar)

    • DGc(Set::Scalar)

    • DDGc(Set::Scalar)

    • Zeta(Set::Scalar)

    • Mobility(Set::Scalar)

    • DrivingForceThreshold(Set::Scalar)

    Variables

    • Set::Scalar Model::Interface::Crack::Constant::_Gc

    • Set::Scalar Model::Interface::Crack::Constant::zeta

    • Set::Scalar Model::Interface::Crack::Constant::mobility

    • Set::Scalar Model::Interface::Crack::Constant::threshold

Model::Interface::Crack::Sin

src/Model/Interface/Crack/Sin.H

Parameter

Type

Values

Gc0

Min Gc (fracture energy) value

Gc1

Max Gc (fracture energy)value

theta0

Angle offset

zeta

Regularization

mobility

Crack mobiilty

threshold

Threshold for kinetics

gtype

Type of g function to use {square, multiwell, 4c3, squarep, squarepexp, cubicm}

wtype

Type o w function to use {square, multiwell, multiwell2, 4c3}

API definitions in src/Model/Interface/Crack/Sin.H

Classes

  • Model::Interface::Crack::Sin

    Methods

    • Sin()

    • Gc(Set::Scalar theta)

    • DGc(Set::Scalar theta)

    • DDGc(Set::Scalar theta)

    • Zeta(Set::Scalar)

    • Mobility(Set::Scalar)

    • DrivingForceThreshold(Set::Scalar)

    Variables

    • Set::Scalar Model::Interface::Crack::Sin::zeta

    • Set::Scalar Model::Interface::Crack::Sin::mobility

    • Set::Scalar Model::Interface::Crack::Sin::Gc0

    • Set::Scalar Model::Interface::Crack::Sin::Gc1

    • Set::Scalar Model::Interface::Crack::Sin::theta0

    • Set::Scalar Model::Interface::Crack::Sin::threshold

Model::Interface::GB

Model::Interface::GB::GB

src/Model/Interface/GB/GB.H

API definitions in src/Model/Interface/GB/GB.H

Classes

  • Model::Interface::GB::GB

    Methods

    • GB()

    • ~GB()

    • W(const Set::Scalar theta) const =0

    • DW(const Set::Scalar theta) const =0

    • DDW(const Set::Scalar theta) const =0

    • W(const Set::Vector &a_n) const

    • DW(const Set::Vector &, const Set::Vector &) const

    • DDW(const Set::Vector &, const Set::Vector &) const

    • ExportToFile(std::string filename, amrex::Real dTheta)

    • DrivingForce(const Set::Vector &Deta, const Set::Matrix &DDeta, const Set::Matrix4< AMREX_SPACEDIM, Set::Sym::Full > &DDDDeta)

    Variables

    • Regularization Model::Interface::GB::GB::regularization

Model::Interface::GB::AbsSin

src/Model/Interface/GB/AbsSin.H

Parameter

Type

Values

theta0

Angle offset (degrees)

sigma0

Minimum energy

sigma1

Energy multiplier

API definitions in src/Model/Interface/GB/AbsSin.H

Classes

  • Model::Interface::GB::AbsSin

    Methods

    • AbsSin()

    • AbsSin(IO::ParmParse &pp)

    • AbsSin(IO::ParmParse &pp, std::string name)

    • AbsSin(amrex::Real _theta0, amrex::Real _sigma0, amrex::Real _sigma1)

    • Define(amrex::Real _theta0, amrex::Real _sigma0, amrex::Real _sigma1)

    • Randomize()

    • W(const Set::Scalar theta) const

    • DW(const Set::Scalar theta) const

    • DDW(const Set::Scalar theta) const

    Variables

    • Set::Scalar Model::Interface::GB::AbsSin::theta0

    • Set::Scalar Model::Interface::GB::AbsSin::sigma0

    • Set::Scalar Model::Interface::GB::AbsSin::sigma1

Model::Interface::GB::Read

src/Model/Interface/GB/Read.H

Parameter

Type

Values

filename

Filename containing GB data

file path

API definitions in src/Model/Interface/GB/Read.H

Classes

  • Model::Interface::GB::Read - Reads the data from a file and computes energies and its derivates.

    Methods

    • Read() - in data.

    • Read(IO::ParmParse &pp)

    • Read(IO::ParmParse &pp, std::string name)

    • Read(std::string filename)

    • Define(std::string filename)

    • W(const Set::Scalar theta) const

    • DW(const Set::Scalar theta) const

    • DDW(const Set::Scalar theta) const

    Variables

    • Numeric::Interpolator::Linear<Set::Scalar> Model::Interface::GB::Read::m_w

    • Numeric::Interpolator::Linear<Set::Scalar> Model::Interface::GB::Read::m_dw

    • Numeric::Interpolator::Linear<Set::Scalar> Model::Interface::GB::Read::m_ddw

Model::Interface::GB::SH

src/Model/Interface/GB/SH.H

Parameter

Type

Values

theta0

Theta offset (degrees)

phi0

Phi offset (radians)

sigma0

Minimum energy value

sigma1

Energy multiplier

regularization

Type of regularization to use: {wilhelm,k23}

API definitions in src/Model/Interface/GB/SH.H

Classes

  • Model::Interface::GB::SH - A 2D interface model class.

    Methods

    • SH()

    • SH(IO::ParmParse &pp)

    • SH(IO::ParmParse &pp, std::string name)

    • SH(const amrex::Real a_theta0, const amrex::Real a_phi0, const amrex::Real a_sigma0, const amrex::Real a_sigma1)

    • Define(const amrex::Real a_theta0, const amrex::Real a_phi0, const amrex::Real a_sigma0, const amrex::Real a_sigma1)

    • Randomize()

    • W(const Set::Scalar a_theta, const Set::Scalar a_phi) const

    • DW(const Set::Scalar a_theta, const Set::Scalar a_phi) const

    • W(const Set::Vector &a_n) const override

    • DW(const Set::Vector &a_n, const Set::Vector &t_n) const override

    • DDW(const Set::Vector &a_n, const Set::Vector &t_n) const override

    • W(const Set::Scalar) const override

    • DW(const Set::Scalar) const override

    • DDW(const Set::Scalar) const override

    Variables

    • Set::Scalar Model::Interface::GB::SH::theta0

    • Set::Scalar Model::Interface::GB::SH::phi0

    • Set::Scalar Model::Interface::GB::SH::sigma0

    • Set::Scalar Model::Interface::GB::SH::sigma1

Model::Interface::GB::Sin

src/Model/Interface/GB/Sin.H

Parameter

Type

Values

theta0

Theta offset (degrees)

sigma0

Minimum energy

sigma1

Energy multiplier

n

Frequency number (integer)

API definitions in src/Model/Interface/GB/Sin.H

Classes

  • Model::Interface::GB::Sin

    Methods

    • Sin()

    • Sin(IO::ParmParse &pp)

    • Sin(IO::ParmParse &pp, std::string name)

    • Sin(amrex::Real _theta0, amrex::Real _sigma0, amrex::Real _sigma1)

    • Define(amrex::Real _theta0, amrex::Real _sigma0, amrex::Real _sigma1)

    • Randomize()

    • W(const Set::Scalar theta) const

    • DW(const Set::Scalar theta) const

    • DDW(const Set::Scalar theta) const

    Variables

    • Set::Scalar Model::Interface::GB::Sin::theta0

    • Set::Scalar Model::Interface::GB::Sin::sigma0

    • Set::Scalar Model::Interface::GB::Sin::sigma1

    • Set::Scalar Model::Interface::GB::Sin::n

Model::Solid

Model::Solid::Solid

src/Model/Solid/Solid.H

Solid models are used with the Integrator::Mechanics integrator, which implements the Solver::Nonlocal::Newton elasticity solver. All solid models inherit from the Model::Solid base class, which requires all of the necessary components to be used in a mechanics solve. Model classes have basically two functions:

  1. Provide energy (W), stress (DW), and modulus (DDW) based on a kinematic variable

  2. Evolve internal variables in time.

API definitions in src/Model/Solid/Solid.H

Classes

  • Model::Solid::Solid

    Methods

    • Solid()

    • ~Solid()

    • W(const Set::Matrix &) const

    • DW(const Set::Matrix &) const

    • DDW(const Set::Matrix &) const

    • Advance(Set::Scalar, Set::Matrix, Set::Matrix, Set::Scalar)

    • ContainsNan()

    • Print(std::ostream &out) const

Model::Solid::ExtClassOperators

src/Model/Solid/ExtClassOperators.H

API definitions in src/Model/Solid/ExtClassOperators.H

Classes

Model::Solid::InClassOperators

src/Model/Solid/InClassOperators.H

API definitions in src/Model/Solid/InClassOperators.H

Classes

Model::Solid::Affine

Model::Solid::Affine::Affine

src/Model/Solid/Affine/Affine.H

“Affine” generally means “linear with an offset”. Here we use “affine” to refer to models that are elastic with an eigenstrain, i.e.

\[\sigma = \mathbb{C}(\varepsilon - \varepsilon_0)\]

The quantity \(\varepsilon_0\) is any kind of eigenstrain - examples include thermal strain, plastic strain, or viscous strain. This class can be used directly, where the eigenstrain is read in or set by the integrator. There are also classes (particularly visco/plastic models) that inherit from this type of model.

API definitions in src/Model/Solid/Affine/Affine.H

Classes

  • Model::Solid::Affine::Affine

    Methods

    • SetF0(Set::Matrix a_F0)

    Variables

    • Set::Matrix4<AMREX_SPACEDIM,SYM> Model::Solid::Affine::Affine< SYM >::ddw

    • Set::Matrix Model::Solid::Affine::Affine< SYM >::F0

Model::Solid::Affine::Cubic

src/Model/Solid/Affine/Cubic.H

This class extends Model::Solid::Linear::Cubic by adding an eigenstrain \(\mathbf{F}_0\).

Parameter

Type

Values

F0

Eigenstrain

API definitions in src/Model/Solid/Affine/Cubic.H

Classes

  • Model::Solid::Affine::Cubic

    Methods

    • Cubic()

    • Cubic(Linear::Cubic base)

    • ~Cubic()

    • 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())

    • Define(Set::Scalar C11, Set::Scalar C12, Set::Scalar C44, Eigen::Matrix3d R, Set::Matrix a_F0=Set::Matrix::Zero())

    • W(const Set::Matrix &gradu) const override

    • DW(const Set::Matrix &gradu) const override

    • DDW(const Set::Matrix &gradu) const override

    • Print(std::ostream &out) const override

    • SetF0(Set::Matrix &a_F0)

    Variables

    • Set::Matrix Model::Solid::Affine::Cubic::F0

Model::Solid::Affine::Hexagonal

src/Model/Solid/Affine/Hexagonal.H

This model implements an affine hexagonal material:

\[W_{aff}(\nabla\mathbf{u}) = W_{lin}(\nabla\mathbf{u} - \mathbf{F}_0)\]

where \(W_{aff}\) is the present model, \(\mathbf{F}_0\) is the eigenstrain, and \(W_{lin}\) is the cubic model defined in Model::Solid::Linear::Hexagonal.

Parameter

Type

Values

F0

Eigenstrain matrix. Can be defined in 2D or 3D.

API definitions in src/Model/Solid/Affine/Hexagonal.H

Classes

  • Model::Solid::Affine::Hexagonal

    Methods

    • Hexagonal()

    • Hexagonal(Linear::Hexagonal base)

    • ~Hexagonal()

    • Define(Set::Scalar C11, Set::Scalar C12, Set::Scalar C13, Set::Scalar C33, Set::Scalar C44, Set::Scalar phi1, Set::Scalar Phi, Set::Scalar phi2, Set::Matrix a_F0=Set::Matrix::Zero())

    • Define(Set::Scalar C11, Set::Scalar C12, Set::Scalar C13, Set::Scalar C33, Set::Scalar C44, Eigen::Matrix3d R, Set::Matrix a_F0=Set::Matrix::Zero())

    • W(const Set::Matrix &gradu) const override

    • DW(const Set::Matrix &gradu) const override

    • DDW(const Set::Matrix &gradu) const override

    • Print(std::ostream &out) const override

    • SetF0(Set::Matrix &a_F0)

    Variables

    • Set::Matrix Model::Solid::Affine::Hexagonal::F0

Model::Solid::Affine::Isotropic

src/Model/Solid/Affine/Isotropic.H

Parameter

Type

Values

F0

Eigendeformation gradient

API definitions in src/Model/Solid/Affine/Isotropic.H

Classes

  • Model::Solid::Affine::Isotropic

    Methods

    • Isotropic()

    • Isotropic(Affine< Set::Sym::Isotropic > base)

    • Isotropic(Set::Scalar a_mu, Set::Scalar a_lambda, Set::Matrix a_F0=Set::Matrix::Zero())

    • Define(Set::Scalar a_mu, Set::Scalar a_lambda, Set::Matrix a_F0)

    • Define(Set::Scalar a_mu, Set::Scalar a_lambda)

    • W(const Set::Matrix &F) const override

    • DW(const Set::Matrix &F) const override

    • DDW(const Set::Matrix &) const override

    • Print(std::ostream &out) const override

    • ContainsNan() override

Model::Solid::Affine::J2Plastic

src/Model/Solid/Affine/J2Plastic.H

Parameter

Type

Values

lambda

Lame constant

mu

Shear modulus

E

Young's modulus

nu

Poisson's ratio

yield

Yield strength

hardening

Hardening constant

theta

Hardening theta

API definitions in src/Model/Solid/Affine/J2Plastic.H

Classes

  • Model::Solid::Affine::J2Plastic

    Methods

    • J2Plastic()

    • J2Plastic(Solid< Set::Sym::Isotropic > base)

    • J2Plastic(Set::Scalar a_mu, Set::Scalar a_lambda, Set::Scalar a_yield, Set::Scalar a_hardening, Set::Scalar a_theta=1.0)

    • Define(Set::Scalar a_mu, Set::Scalar a_lambda, Set::Scalar a_yield, Set::Scalar a_hardening, Set::Scalar a_theta)

    • YieldSurface()

    • PlasticEnergy()

    • EvolvePlasticStrain(Set::Matrix sigma, Set::Matrix strain, Set::Scalar)

    • SetPlasticStrains()

    • SetPlasticStrains(PlasticState &a_state)

    • GetPlasticState()

    • operator+=(const J2Plastic &rhs)

    • operator*(const Set::Scalar alpha) const

    Variables

    • PlasticState Model::Solid::Affine::J2Plastic::curr

    • PlasticState Model::Solid::Affine::J2Plastic::prev

    • Set::Scalar Model::Solid::Affine::J2Plastic::theta

    • Set::Scalar Model::Solid::Affine::J2Plastic::yield_strength

    • Set::Scalar Model::Solid::Affine::J2Plastic::hardening_modulus

    • Set::Scalar Model::Solid::Affine::J2Plastic::m_mu

Model::Solid::Affine::J2

src/Model/Solid/Affine/J2.H

This models an isotropic elastic-perfectly-plastic, non-time-dependent solid model.

The energy and derivatives are:

\begin{gather} W = \frac{1}{2}(\varepsilon - \varepsilon_p):\mathbb{C}(\varepsilon-\varepsilon_p) \\ DW = \mathbb{C}(\varepsilon-\varepsilon_p) \\ DDW = \mathbb{C} \end{gather}

where \(\mathbb{C}\) is an isotropic Set::Matrix4 and \(\varepsilon_p\) is is stored in the F0 eigenstrain.

The plastic strain is evolved according to the following:

  1. Calculate the deviatoric stress \(\sigma_v=\sigma - \frac{1}{3}tr(\sigma)\mathbf{I}\)

  2. Calculate \(J_2=\sqrt{\frac{3}{2}\sigma_v:\sigma_v}\)

  3. If \(J_2<\sigma_0\) then quit - no plasticity occurs

  4. Calculate \(\Delta\sigma = (1-\frac{\sigma_0}{J_2})\), which projects the stress back on the yield surface.

  5. Convert to change in plastic strain, \(\Delta\varepsilon=\mathbb{C}^{-1}\Delta\sigma\)

  6. Update plastic strain: \(\varepsilon_p += \Delta\varepsilon\)

Notes:

  • This does not implement any kind of hardening model. Rate hardening, isotropic hardening, and kinematic hardening have yet to be implemneted.

Parameter

Type

Values

sigma0

J2 Yield criterion

1.0

hardening

Hardening coefficient (negative value disables rate hardening)

-1.0

ratecoeff

Rate coefficient (negative value disables rate hardening)

-1.0

API definitions in src/Model/Solid/Affine/J2.H

Classes

  • Model::Solid::Affine::J2

    Methods

    • J2()

    • Advance(Set::Scalar dt, Set::Matrix eps, Set::Matrix, Set::Scalar) override

    Variables

    • Set::Scalar Model::Solid::Affine::J2::sigma0

    • Set::Scalar Model::Solid::Affine::J2::hardening

    • Set::Scalar Model::Solid::Affine::J2::ratecoeff

    • Set::Scalar Model::Solid::Affine::J2::alpha

Model::Solid::Finite

Model::Solid::Finite::CrystalPlastic

src/Model/Solid/Finite/CrystalPlastic.H

A basic and relatively untested implementation of finite-deformation FCC crystal plasticity. Use with caution.

Inherits from Model::Solid::Finite::PseudoLinear::Cubic to provide elastic response.

Plastic flow modeled as:

\[\mathbf{F}^p\mathbf{F}^{p-1} = \sum \dot{\gamma}_n \mathbf{a}_n\otimes\mathbf{N}_n\]

where \(\mathbf{F}=\mathbf{F}^e\mathbf{F}^p\) and \(\gamma_n\) are slips on system \(n\).

Power law rate hardening is used in the integration of slips:

\[\dot{\gamma}_n = \dot{\gamma}_0 \Big(\frac{\tau}{\tau_{crss}}\Big)^m \operatorname{sign}(\tau)\]

Parameter

Type

Values

tau_crss

Critical resolved shear stress \(\tau_{crss}\)

gammadot0

Rate hardening coefficient \(\dot{\gamma}_0\)

1.0

m_rate_inv

Inverse of the hardening exponent \(\frac{1}{m}\)

0.5

tstart

Time to activate plastic slip

0.0

API definitions in src/Model/Solid/Finite/CrystalPlastic.H

Classes

  • Model::Solid::Finite::CrystalPlastic

    Methods

    • CrystalPlastic()

    • ~CrystalPlastic()

    • W(const Set::Matrix &F) const override

    • DW(const Set::Matrix &F) const override

    • DDW(const Set::Matrix &F) const override

    • Advance(Set::Scalar dt, Set::Matrix, Set::Matrix P, Set::Scalar time) override

    Variables

    • Set::Matrix3d Model::Solid::Finite::CrystalPlastic::Fp

    • Eigen::Matrix<Set::Scalar,12,1> Model::Solid::Finite::CrystalPlastic::gamma

    • Set::Scalar Model::Solid::Finite::CrystalPlastic::m_rate_inv

    • Eigen::Matrix<Set::Scalar,12,1> Model::Solid::Finite::CrystalPlastic::tau_crss

    • Set::Scalar Model::Solid::Finite::CrystalPlastic::gammadot0

    • Set::Scalar Model::Solid::Finite::CrystalPlastic::tstart

Model::Solid::Finite::NeoHookeanPredeformed

src/Model/Solid/Finite/NeoHookeanPredeformed.H

Parameter

Type

Values

F0

Large-deformation eigendeformation (Identity = no deformation)

eps0

Small-deformation eigendeformation (Zero = no deformation)

API definitions in src/Model/Solid/Finite/NeoHookeanPredeformed.H

Classes

  • Model::Solid::Finite::NeoHookeanPredeformed

    Methods

    • NeoHookeanPredeformed()

    • NeoHookeanPredeformed(NeoHookean base)

    • ~NeoHookeanPredeformed()

    • W(const Set::Matrix &F) const override

    • DW(const Set::Matrix &F) const override

    • DDW(const Set::Matrix &F) const override

    • Print(std::ostream &out) const override

    Variables

    • Set::Matrix Model::Solid::Finite::NeoHookeanPredeformed::F0

Model::Solid::Finite::NeoHookean

src/Model/Solid/Finite/NeoHookean.H

Parameter

Type

Values

API definitions in src/Model/Solid/Finite/NeoHookean.H

Classes

  • Model::Solid::Finite::NeoHookean

    Methods

    • NeoHookean()

    • NeoHookean(Solid< Set::Sym::Major > base)

    • ~NeoHookean()

    • W(const Set::Matrix &a_F) const override

    • DW(const Set::Matrix &a_F) const override

    • DDW(const Set::Matrix &a_F) const override

    • Print(std::ostream &out) const override

    Variables

    • Set::Scalar Model::Solid::Finite::NeoHookean::mu

    • Set::Scalar Model::Solid::Finite::NeoHookean::kappa

Model::Solid::Finite::PseudoAffine
Model::Solid::Finite::PseudoAffine::Cubic

src/Model/Solid/Finite/PseudoAffine/Cubic.H

Parameter

Type

Values

F0

Large-strain eigendeformation (Identity = no deformation)

eps0

Small-strain eigendeformation (Zero = no deformation)

API definitions in src/Model/Solid/Finite/PseudoAffine/Cubic.H

Classes

  • Model::Solid::Finite::PseudoAffine::Cubic

    Methods

    • Cubic()

    • Cubic(PseudoLinear::Cubic base)

    • ~Cubic()

    • W(const Set::Matrix &F) const override

    • DW(const Set::Matrix &F) const override

    • DDW(const Set::Matrix &F) const override

    Variables

    • Set::Matrix Model::Solid::Finite::PseudoAffine::Cubic::F0

Model::Solid::Finite::PseudoLinear
Model::Solid::Finite::PseudoLinear::Cubic

src/Model/Solid/Finite/PseudoLinear/Cubic.H

Parameter

Type

Values

C11

Elastic constant

1.68

C12

Elastic constant

1.21

C44

Elastic constant

0.75

phi1

Bunge Euler angle \(\phi_1\)

0.0

Phi

Bunge Euler angle \(\Phi\)

0.0

phi2

Bunge Euler angle \(\phi_2\)

0.0

API definitions in src/Model/Solid/Finite/PseudoLinear/Cubic.H

Classes

  • Model::Solid::Finite::PseudoLinear::Cubic

    Methods

    • Cubic()

    • ~Cubic()

    • W(const Set::Matrix &F) const override

    • DW(const Set::Matrix &F) const override

    • DDW(const Set::Matrix &F) const override

    • Print(std::ostream &out) const override

    Variables

    • Set::Scalar Model::Solid::Finite::PseudoLinear::Cubic::C11

    • Set::Scalar Model::Solid::Finite::PseudoLinear::Cubic::C12

    • Set::Scalar Model::Solid::Finite::PseudoLinear::Cubic::C44

    • Set::Quaternion Model::Solid::Finite::PseudoLinear::Cubic::q

Model::Solid::Linear

Model::Solid::Linear::Cubic

src/Model/Solid/Linear/Cubic.H

This class implements basic cubic elasticity. For a discussion on cubic elasticity, please see this link.

Parameter

Type

Values

C11

Elastic constant

1.68

C12

Elastic constant

1.21

C44

Elastic constant

0.75

anglefmt

specify whether using radians or degrees

radians degrees

phi1

Bunge Euler angle \(\phi_1\) about x axis

0.0

Phi

Bunge Euler angle \(\Phi\) about z axis

0.0

phi2

Bunge Euler angle \(\phi_2\) about x axis

0.0

API definitions in src/Model/Solid/Linear/Cubic.H

Classes

  • Model::Solid::Linear::Cubic

    Methods

    • Cubic()

    • Cubic(Solid< Set::Sym::MajorMinor > base)

    • ~Cubic()

    • Define(Set::Scalar C11, Set::Scalar C12, Set::Scalar C44, Set::Scalar phi1, Set::Scalar Phi, Set::Scalar phi2)

    • Define(Set::Scalar C11, Set::Scalar C12, Set::Scalar C44, Eigen::Matrix3d R)

    • W(const Set::Matrix &gradu) const override

    • DW(const Set::Matrix &gradu) const override

    • DDW(const Set::Matrix &) const override

    • Print(std::ostream &out) const override

    Variables

    • Set::Matrix4<AMREX_SPACEDIM,Set::Sym::MajorMinor> Model::Solid::Linear::Cubic::ddw

Model::Solid::Linear::Hexagonal

src/Model/Solid/Linear/Hexagonal.H

This class implements elasticity for a linear material with hexagonal symmetry. The elastic modulus tensor \(\mathbb{C}\) has major and minor symmetry but not cubic symmetry, so the symmetry class for this material is MajorMinor The five elastic constants in the unrotated system are \(C_{11},C_{12},C_{13},C_{33},C_{44}\), and the resulting elastic modulus tensor is

\[\begin{split}\mathbb{C} &= \begin{bmatrix} C_{0000} & C_{0011} & C_{0022} & C_{0012} & C_{0020} & C_{0001} \\ C_{1100} & C_{1111} & C_{1122} & C_{1112} & C_{1120} & C_{1101} \\ C_{2200} & C_{2211} & C_{2222} & C_{2212} & C_{2220} & C_{2201} \\ C_{1200} & C_{1211} & C_{1222} & C_{1212} & C_{1220} & C_{1201} \\ C_{2000} & C_{2011} & C_{2022} & C_{2012} & C_{2020} & C_{2001} \\ C_{0100} & C_{0111} & C_{0122} & C_{0112} & C_{0120} & C_{0101} \end{bmatrix} \\ &= \begin{bmatrix} C_{11} & C_{12} & C_{12} & & & \\ C_{12} & C_{11} & C_{13} & & & \\ C_{12} & C_{13} & C_{33} & & & \\ & & & C_{44} & & \\ & & & & 0.5(C_{11}-C_{12}) & \\ & & & & & 0.5(C_{11}-C_{12}) \end{bmatrix}\end{split}\]

Rotations can be specified using Bunge euler angles to generate a rotation matrix \(\mathbf{R}\). The rotated modulus tensor \(\mathbb{C}^{rot}\) is then

\[\mathbb{C}^{rot}_{psqt} = \mathbb{C}_{ijkl}R_{pi}R_{qj}R_{sk}R_{tl}\]

Parameter

Type

Values

C11

Elastic constant

required

C12

Elastic constant

required

C13

Elastic constant

required

C33

Elastic constant

required

C44

Elastic constant

required

phi1

Bunge Euler angle \(\phi_1\)

0.0

Phi

Bunge Euler angle \(\Phi\)

0.0

phi2

Bunge Euler angle \(\phi_2\)

0.0

API definitions in src/Model/Solid/Linear/Hexagonal.H

Classes

  • Model::Solid::Linear::Hexagonal

    Methods

    • Hexagonal()

    • Hexagonal(Solid< Set::Sym::MajorMinor > base)

    • ~Hexagonal()

    • Define(Set::Scalar C11, Set::Scalar C12, Set::Scalar C13, Set::Scalar C33, Set::Scalar C44, Set::Scalar phi1, Set::Scalar Phi, Set::Scalar phi2)

    • Define(Set::Scalar C11, Set::Scalar C12, Set::Scalar C13, Set::Scalar C33, Set::Scalar C44, Eigen::Matrix3d R)

    • W(const Set::Matrix &gradu) const override

    • DW(const Set::Matrix &gradu) const override

    • DDW(const Set::Matrix &) const override

    • Print(std::ostream &out) const override

    Variables

    • Set::Matrix4<AMREX_SPACEDIM,Set::Sym::MajorMinor> Model::Solid::Linear::Hexagonal::ddw

Model::Solid::Linear::Isotropic

src/Model/Solid/Linear/Isotropic.H

This model implements an isotropic linear elastic material. See this link for more information about the theory.

Free energy for a linear material is defined as

\[W(\nabla\mathbf{u}) = \frac{1}{2}\nabla\mathbf{u}\cdot\mathbb{C}\,\nabla\mathbf{u}\]

For an isotropic material, stress and strain are related through

\[\mathbb{C}_{ijkl} = \lambda \delta_{ij}\varepsilon_{kk} + 2\mu\varepsilon_{ij}\]

where \(\lambda\) and \(\mu\) are the Lame constant and shear modulus, respectively. Users can specify these either through (lame and shear) OR (lambda and mu) OR (E and nu).

Class methods:

  1. Isotropic(): Basic constructor. Does nothing, and leaves all values initiated as NAN.

  2. Isotropic(Solid<Set::Sym::Isotropic> base) Basic constructor. Does nothing gut allows for inheritance.

  3. Isotropic(Set::Scalar a_mu, Set::Scalar a_lambda) BAD old-fashioned constructor. Do not use!

  4. ~Isotropic() Simple destructor. Don’t need to change it.

  5. void Define(Set::Scalar a_mu, Set::Scalar a_lambda) BAD old-fashioned way of doing things. Use Parse instead.

  6. Set::Scalar W(const Set::Matrix & gradu) const override Returns elastic free energy density

  7. Set::Matrix DW(const Set::Matrix & gradu) const override Returns first derivative of free energy, the stress tensor

  8. Set::Matrix4<...> DDW(const Set::Matrix & ) const override Returns second derivative of free energy, the modulus tensor

  9. virtual void Print(std::ostream &out) const override Prints the modulus tensor object to output stream (usually the terminal)

  10. static Isotropic Random() Static method that generates a random yet acceptable model.

  11. static Isotropic Zero() Static method that generates a “zero” element (so that there is no effect under addition)

  12. static void Parse(Isotropic & value, IO::ParmParse & pp) Parser where all the IO occurs

Parameter

Type

Values

planestress

Whether or not to use the `plane stress `_ approximation.

false

API definitions in src/Model/Solid/Linear/Isotropic.H

Classes

  • Model::Solid::Linear::Isotropic

    Methods

    • Isotropic()

    • Isotropic(Solid< Set::Sym::Isotropic > base)

    • Isotropic(Set::Scalar a_mu, Set::Scalar a_lambda)

    • ~Isotropic()

    • Define(Set::Scalar a_mu, Set::Scalar a_lambda)

    • W(const Set::Matrix &gradu) const override

    • DW(const Set::Matrix &gradu) const override

    • DDW(const Set::Matrix &) const override

    • Print(std::ostream &out) const override

    Variables

    • Set::Matrix4<AMREX_SPACEDIM,Set::Sym::Isotropic> Model::Solid::Linear::Isotropic::ddw

Model::Solid::Linear::Laplacian

src/Model/Solid/Linear/Laplacian.H

Parameter

Type

Values

alpha

Coefficient for the Laplacian

1.0

API definitions in src/Model/Solid/Linear/Laplacian.H

Classes

  • Model::Solid::Linear::Laplacian - implements the following elastic model.

    Methods

    • Laplacian()

    • Laplacian(Set::Scalar alpha)

    • Laplacian(Solid< Set::Sym::Diagonal > base)

    • ~Laplacian()

    • Define(Set::Scalar alpha=1.0)

    • W(const Set::Matrix &gradu) const override

    • DW(const Set::Matrix &gradu) const override

    • DDW(const Set::Matrix &) const override

    Variables

    • Set::Matrix4<AMREX_SPACEDIM,Set::Sym::Diagonal> Model::Solid::Linear::Laplacian::ddw


Numeric

Numeric::Function

src/Numeric/Function.H

API definitions in src/Numeric/Function.H

Classes

  • Numeric::Function::Polynomial

  • Numeric::Function::Polynomial< 3 >

    Methods

    • Polynomial(Set::Scalar a0, Set::Scalar a1, Set::Scalar a2, Set::Scalar a3)

    • operator()(const Set::Scalar x) const

    Variables

    • std::array<Set::Scalar, 4> Numeric::Function::Polynomial< 3 >::a

  • Numeric::Function::Polynomial< 4 >

    Methods

    • Polynomial(Set::Scalar a0, Set::Scalar a1, Set::Scalar a2, Set::Scalar a3, Set::Scalar a4)

    • operator()(const Set::Scalar x) const

    • D() const

    Variables

    • std::array<Set::Scalar, 5> Numeric::Function::Polynomial< 4 >::a

Numeric::Stencil

src/Numeric/Stencil.H

API definitions in src/Numeric/Stencil.H

Classes

  • Numeric::Interpolate

  • Numeric::Stencil

  • Numeric::Stencil< T, 0, 0, 1 >

  • Numeric::Stencil< T, 0, 0, 2 >

  • Numeric::Stencil< T, 0, 0, 4 >

  • Numeric::Stencil< T, 0, 1, 0 >

  • Numeric::Stencil< T, 0, 1, 1 >

  • Numeric::Stencil< T, 0, 1, 3 > - Compute.

  • Numeric::Stencil< T, 0, 2, 0 >

  • Numeric::Stencil< T, 0, 2, 2 > - Compute.

  • Numeric::Stencil< T, 0, 3, 1 > - Compute.

  • Numeric::Stencil< T, 0, 4, 0 >

  • Numeric::Stencil< T, 1, 0, 0 >

  • Numeric::Stencil< T, 1, 0, 1 >

  • Numeric::Stencil< T, 1, 0, 3 > - Compute.

  • Numeric::Stencil< T, 1, 1, 0 >

  • Numeric::Stencil< T, 1, 1, 2 > - Compute.

  • Numeric::Stencil< T, 1, 2, 1 > - Compute.

  • Numeric::Stencil< T, 1, 3, 0 > - Compute.

  • Numeric::Stencil< T, 2, 0, 0 >

  • Numeric::Stencil< T, 2, 0, 2 > - Compute.

  • Numeric::Stencil< T, 2, 1, 1 > - Compute.

  • Numeric::Stencil< T, 2, 2, 0 > - Compute.

  • Numeric::Stencil< T, 3, 0, 1 > - Compute.

  • Numeric::Stencil< T, 3, 1, 0 > - Compute.

  • Numeric::Stencil< T, 4, 0, 0 >

Numeric::Interpolator

Numeric::Interpolator::Interpolator

src/Numeric/Interpolator/Interpolator.H

This namespace has evolved to contain some general Interpolator routines that are actually unrelated. The Numeric::Interpolator::Linear is an I/O utility. The Numeric::Interpolator::NodeBilinear is a low-level AMReX override that the average user (or even coder) will probably not need to touch.

API definitions in src/Numeric/Interpolator/Interpolator.H

Classes

  • Numeric::Interpolator::Interpolator

    Methods

    • Interpolator()

Numeric::Interpolator::Linear

src/Numeric/Interpolator/Linear.H

This is a general-purpose routine for specifying time-interpolated quantities in an input file. Interpolators obey the following syntax:

(t1,t2,..,tn;v1,v2,...,vn)

where tn are times and vn are values at those times.

Note: do not include whitespace in an interpolator, this will mess with the parser.

Interpolators can usually be used in place of regular numbers, but only when supported by the calling parse function.

For instance, the BC::Operator::Elastic::TensionTest allows the user to specify fixed displacement; for instance, to specify a value of 0.1:

bc.tenstion_test.disp = 0.1

However, it may be desirable to change the value over time. In this case, one may specify an interpolator string instead:

bc.tenstion_test.disp = (1.0,1.5,2.0;0.0,0.1,0.0)

This will cause the displacement value to be zero for t<1.0; ramp to 0.1 as 1.0<t<2.0; ramp back to 0.0 as 2.0<t<3.0; and then remain at the constant value of 3.0 for t>3.0.

Parameter

Type

Values

str

Interpolator string used when Parsed from queryclass.

API definitions in src/Numeric/Interpolator/Linear.H

Classes

  • Numeric::Interpolator::Linear

    Methods

    • Linear()

    • ~Linear()

    • Linear(const Set::Scalar &a_val)

    • Linear(const std::string a_str)

    • Linear(const std::vector< T > _data_points, const std::vector< Set::Scalar > _interval_points)

    • define(const std::string a_str)

    • define(const std::vector< T > _data_points, const std::vector< Set::Scalar > _interval_points)

    • operator()(const Set::Scalar point) const

    • Read(std::string filename, int derivative)

    Variables

    • std::vector<T> Numeric::Interpolator::Linear< T >::data_points

    • std::vector<Set::Scalar> Numeric::Interpolator::Linear< T >::interval_points

    • bool Numeric::Interpolator::Linear< T >::uniform

Numeric::Interpolator::NodeBilinear

src/Numeric/Interpolator/NodeBilinear.H

Provide an interpolator function that can work with templated fields.

Warning: This is a low-level class used to add templating functionality to unerlying AMReX classes. Edit at your own risk!

API definitions in src/Numeric/Interpolator/NodeBilinear.H

Classes

  • Numeric::Interpolator::NodeBilinear

    Methods

    • interp(const amrex::BaseFab< T > &crse, int crse_comp, amrex::BaseFab< T > &fine, int fine_comp, int ncomp, const amrex::Box &fine_region, const amrex::IntVect &ratio, const amrex::Geometry &, const amrex::Geometry &, amrex::Vector< amrex::BCRec > const &, int, int, amrex::RunOn runon)

    • interp_face(const amrex::BaseFab< T > &, const int, amrex::BaseFab< T > &, const int, const int, const amrex::Box &, const amrex::IntVect &, const amrex::IArrayBox &, const amrex::Geometry &, const amrex::Geometry &, amrex::Vector< amrex::BCRec > const &, const int, amrex::RunOn)

Numeric::Interpolator::Test

src/Numeric/Interpolator/Test.cpp src/Numeric/Interpolator/Test.H

API definitions in src/Numeric/Interpolator/Test.H

Classes

  • Numeric::Interpolator::Test

    Methods

    • Match(int)

    • Match(int verbose)


Operator

Operator::Operator

src/Operator/Operator.cpp src/Operator/Operator.H

API definitions in src/Operator/Operator.H

Classes

  • Operator::Operator

  • Operator::Operator< Grid::Cell >

    Methods

    • Operator()

    • ~Operator()

    • Operator(const Operator &)=delete

    • Operator(Operator &&)=delete

    • operator=(const Operator &)=delete

    • operator=(Operator &&)=delete

    • define(amrex::Vector< amrex::Geometry > a_geom, const amrex::Vector< amrex::BoxArray > &a_grids, const amrex::Vector< amrex::DistributionMapping > &a_dmap, BC::BC< Set::Scalar > &a_bc, const amrex::LPInfo &a_info=amrex::LPInfo(), const amrex::Vector< amrex::FabFactory< amrex::FArrayBox > const * > &a_factory={})

    • updateSolBC(int amrlev, const amrex::MultiFab &crse_bcdata) const

    • updateCorBC(int amrlev, const amrex::MultiFab &crse_bcdata) const

    • prepareForSolve() override

    • Fapply(int amrlev, int mglev, amrex::MultiFab &out, const amrex::MultiFab &in) const override=0

    • Fsmooth(int amrlev, int mglev, amrex::MultiFab &sol, const amrex::MultiFab &rsh, int redblack) const override=0

    • FFlux(int amrlev, const MFIter &mfi, const Array< FArrayBox *, AMREX_SPACEDIM > &flux, const FArrayBox &sol, Location loc, const int face_only=0) const override=0

    • RegisterNewFab(amrex::Vector< amrex::MultiFab > &input)

    • RegisterNewFab(amrex::Vector< std::unique_ptr< amrex::MultiFab > > &input)

    • GetFab(const int num, const int amrlev, const int mglev, const amrex::MFIter &mfi)

    • isSingular(int) const final

    • isBottomSingular() const final

    • getAScalar() const final

    • getBScalar() const final

    • getACoeffs(int, int) const final

    • getBCoeffs(int, int) const final

    • makeNLinOp(int) const final

    • averageDownCoeffs()

    • averageDownCoeffsSameAmrLevel(amrex::Vector< amrex::MultiFab > &)

    • GetFab(const int num, const int amrlev, const int mglev, const amrex::MFIter &mfi) const

    Variables

    • BC::BC<Set::Scalar>* Operator::Operator< Grid::Cell >::m_bc

    • amrex::Vector<std::unique_ptr<amrex::MLMGBndry> > Operator::Operator< Grid::Cell >::m_bndry_sol

    • amrex::Vector<std::unique_ptr<amrex::BndryRegister> > Operator::Operator< Grid::Cell >::m_crse_sol_br

    • amrex::Vector<std::unique_ptr<amrex::MLMGBndry> > Operator::Operator< Grid::Cell >::m_bndry_cor

    • amrex::Vector<std::unique_ptr<amrex::BndryRegister> > Operator::Operator< Grid::Cell >::m_crse_cor_br

    • amrex::Vector<amrex::Vector<std::unique_ptr<BndryCondLoc> > > Operator::Operator< Grid::Cell >::m_bcondloc

    • amrex::Vector<amrex::Vector<amrex::BndryRegister> > Operator::Operator< Grid::Cell >::m_undrrelxr

    • amrex::Vector<amrex::Vector<std::array<amrex::MultiMask,2*AMREX_SPACEDIM> > > Operator::Operator< Grid::Cell >::m_maskvals

    • int Operator::Operator< Grid::Cell >::m_num_a_fabs

    • amrex::Vector<amrex::Vector<amrex::Vector<amrex::MultiFab> > > Operator::Operator< Grid::Cell >::m_a_coeffs

  • Operator::Operator< Grid::Cell >::BndryCondLoc

    Methods

    • BndryCondLoc(const amrex::BoxArray &ba, const amrex::DistributionMapping &dm)

    • setLOBndryConds(const amrex::Geometry &geom, const amrex::Real *dx, const amrex::Array< BCType, AMREX_SPACEDIM > &lobc, const amrex::Array< BCType, AMREX_SPACEDIM > &hibc, int ratio, const amrex::RealVect &a_loc)

    • bndryConds(const amrex::MFIter &mfi) const

    • bndryLocs(const amrex::MFIter &mfi) const

    Variables

    • amrex::LayoutData<BCTuple> Operator::Operator< Grid::Cell >::BndryCondLoc::bcond

    • amrex::LayoutData<RealTuple> Operator::Operator< Grid::Cell >::BndryCondLoc::bcloc

  • Operator::Operator< Grid::Node >

    Methods

    • 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={})

    • ~Operator()

    • Operator(const Operator &)=delete

    • Operator(Operator &&)=delete

    • operator=(const Operator &)=delete

    • operator=(Operator &&)=delete

    • 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={})

    • Geom(int amr_lev, int mglev=0) const noexcept

    • Reflux(int crse_amrlev, MultiFab &res, const MultiFab &crse_sol, const MultiFab &crse_rhs, MultiFab &fine_res, MultiFab &fine_sol, const MultiFab &fine_rhs)

    • Apply(int amrlev, int mglev, MultiFab &out, const MultiFab &in) const

    • SetOmega(Set::Scalar a_omega)

    • SetAverageDownCoeffs(bool)

    • SetNormalizeDDW(bool a_normalize_ddw)

    • RegisterNewFab(amrex::Vector< amrex::MultiFab > &input)

    • RegisterNewFab(amrex::Vector< std::unique_ptr< amrex::MultiFab > > &input)

    • GetFab(const int num, const int amrlev, const int mglev, const amrex::MFIter &mfi) const

    • SetHomogeneous(bool)

    • getNGrow(int=0, int=0) const override final

    • solutionResidual(int amrlev, MultiFab &resid, MultiFab &x, const MultiFab &b, const MultiFab *crse_bcdata=nullptr) override final

    • correctionResidual(int amrlev, int mglev, MultiFab &resid, MultiFab &x, const MultiFab &b, BCMode bc_mode, const MultiFab *crse_bcdata=nullptr) override final

    • Fapply(int amrlev, int mglev, MultiFab &out, const MultiFab &in) const override=0

    • averageDownCoeffs()=0

    • Diagonal(bool recompute=false)

    • Diagonal(int amrlev, int mglev, amrex::MultiFab &diag)

    • Fsmooth(int amrlev, int mglev, MultiFab &x, const MultiFab &b) const override

    • normalize(int amrlev, int mglev, MultiFab &mf) const override

    • 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

    • restriction(int amrlev, int cmglev, MultiFab &crse, MultiFab &fine) const final

    • interpolation(int amrlev, int fmglev, MultiFab &fine, const MultiFab &crse) const override final

    • averageDownSolutionRHS(int camrlev, MultiFab &crse_sol, MultiFab &crse_rhs, const MultiFab &fine_sol, const MultiFab &fine_rhs) final

    • prepareForSolve() override

    • isSingular(int amrlev) const final

    • isBottomSingular() const final

    • applyBC(int amrlev, int mglev, MultiFab &phi, BCMode bc_mode, amrex::MLLinOp::StateMode, bool skip_fillboundary=false) const final

    • fixUpResidualMask(int amrlev, iMultiFab &resmsk) final

    Variables

    • bool Operator::Operator< Grid::Node >::m_is_bottom_singular

    • bool Operator::Operator< Grid::Node >::m_masks_built

    • int Operator::Operator< Grid::Node >::m_num_a_fabs

    • bool Operator::Operator< Grid::Node >::m_diagonal_computed

    • amrex::Vector<amrex::Vector<amrex::Vector<amrex::MultiFab> > > Operator::Operator< Grid::Node >::m_a_coeffs

    • amrex::Vector<amrex::Vector<std::unique_ptr<amrex::MultiFab> > > Operator::Operator< Grid::Node >::m_diag

    • Set::Scalar Operator::Operator< Grid::Node >::m_omega

    • bool Operator::Operator< Grid::Node >::m_normalize_ddw

Operator::Diagonal

src/Operator/Diagonal.cpp src/Operator/Diagonal.H

API definitions in src/Operator/Diagonal.H

Classes

  • Operator::Diagonal

    Methods

    • Diagonal()

    • Diagonal(const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info)

    • ~Diagonal()

    • Diagonal(const Diagonal &)=delete

    • Diagonal(Diagonal &&)=delete

    • operator=(const Diagonal &)=delete

    • operator=(Diagonal &&)=delete

    • Fapply(int amrlev, int mglev, MultiFab &out, const MultiFab &in) const override final

    • Fsmooth(int amrlev, int mglev, MultiFab &sol, const MultiFab &rsh) const override final

    • getNComp() const override

    • normalize(int, int, MultiFab &) const override final

    • reflux(int, MultiFab &, const MultiFab &, const MultiFab &, MultiFab &, MultiFab &, const MultiFab &) const override

Operator::Elastic

src/Operator/Elastic.cpp src/Operator/Elastic.H

Parameter

Type

Values

small

Regularization offset value used in near-singular elastic solves. It should be small - if it is too large, you will get better convergence but less correct values!

API definitions in src/Operator/Elastic.H

Classes

  • Operator::Elastic

    Methods

    • Elastic()

    • Elastic(const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info)

    • ~Elastic()

    • Elastic(const Elastic &)=delete

    • Elastic(Elastic &&)=delete

    • operator=(const Elastic &)=delete

    • operator=(Elastic &&)=delete

    • 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={})

    • SetHomogeneous(bool a_homogeneous) override

    • SetModel(Set::Matrix4< AMREX_SPACEDIM, SYM > &a_model)

    • SetModel(int amrlev, const MultiTab &a_model)

    • SetModel(const amrex::Vector< MultiTab > &a_model)

    • SetModel(const Set::Field< Set::Matrix4< AMREX_SPACEDIM, SYM > > &a_model)

    • SetPsi(int amrlev, const amrex::MultiFab &a_psi)

    • SetPsi(int amrlev, const amrex::MultiFab &a_psi, const Set::Scalar &a_psi_small)

    • SetBC(::BC::Operator::Elastic::Elastic *a_bc) - The different types of Boundary Condtiions are listed in the documentation.

    • GetBC()

    • Strain(int amrlev, amrex::MultiFab &epsfab, const amrex::MultiFab &ufab, bool voigt=false) const - Compute strain given the displacement field by.

    • Stress(int amrlev, amrex::MultiFab &sigmafab, const amrex::MultiFab &ufab, bool voigt=false, bool a_homogeneous=false) - Compute stress given the displacement field by.

    • Energy(int amrlev, amrex::MultiFab &energy, const amrex::MultiFab &u, bool a_homogeneous=false) - Compute energy density given the displacement field by.

    • 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) - This function is depricated and should not be used.

    • Error0x(int amrlev, int mglev, MultiFab &R0x, const MultiFab &x) const

    • SetTesting(bool a_testing)

    • SetUniform(bool a_uniform)

    • SetAverageDownCoeffs(bool a_average_down_coeffs) override

    • Diagonal(int amrlev, int mglev, amrex::MultiFab &diag) override

    • Fapply(int amrlev, int mglev, MultiFab &out, const MultiFab &in) const override final

    • FFlux(int amrlev, const MFIter &mfi, const std::array< FArrayBox *, AMREX_SPACEDIM > &flux, const FArrayBox &sol, const int face_only=0) const final

    • getNComp() const override

    • isCrossStencil() const

    • prepareForSolve() override

    • averageDownCoeffs() override

    • averageDownCoeffsDifferentAmrLevels(int fine_amrlev)

    • averageDownCoeffsSameAmrLevel(int amrlev) - Update coarse-level AMR coefficients with data from fine level.

    • FillBoundaryCoeff(MultiTab &sigma, const Geometry &geom)

    • FillBoundaryCoeff(MultiFab &psi, const Geometry &geom)

    Variables

    • std::array<std::array<BC,AMREX_SPACEDIM>, AMREX_SPACEDIM> Operator::Elastic< SYM >::m_bc_lo - Simple arrays storing boundary conditions for each component and each face.

    • std::array<std::array<BC,AMREX_SPACEDIM>, AMREX_SPACEDIM> Operator::Elastic< SYM >::m_bc_hi

    • amrex::Vector<Set::Field<Set::Matrix4<AMREX_SPACEDIM,SYM> > > Operator::Elastic< SYM >::m_ddw_mf - This is a multifab-type object containing objects of type Model::Solid::Elastic::Isotropic::Isotropic (or some other model type).

    • amrex::Vector<Set::Field<Set::Scalar> > Operator::Elastic< SYM >::m_psi_mf

    • Set::Scalar Operator::Elastic< SYM >::m_psi_small

    • bool Operator::Elastic< SYM >::m_psi_set

    • bool Operator::Elastic< SYM >::m_testing

    • bool Operator::Elastic< SYM >::m_uniform

    • bool Operator::Elastic< SYM >::m_homogeneous

    • bool Operator::Elastic< SYM >::m_average_down_coeffs

    • ::BC::Operator::Elastic::Elastic* Operator::Elastic< SYM >::m_bc

    • bool Operator::Elastic< SYM >::m_model_set

    • bool Operator::Elastic< SYM >::m_bc_set

Operator::Implicit

Operator::Implicit::Implicit

src/Operator/Implicit/Implicit.cpp src/Operator/Implicit/Implicit.H

API definitions in src/Operator/Implicit/Implicit.H

Classes

  • Operator::Implicit::Implicit

    Methods

    • Implicit()

    • Implicit(const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, BC::BC< Set::Scalar > &a_bc, const LPInfo &a_info)

    • ~Implicit()

    • Implicit(const Implicit &)=delete

    • Implicit(Implicit &&)=delete

    • operator=(const Implicit &)=delete

    • operator=(Implicit &&)=delete

    • Fapply(int amrlev, int mglev, MultiFab &out, const MultiFab &in) const final

    • Fsmooth(int amrlev, int mglev, MultiFab &sol, const MultiFab &rsh, int redblack) const final

    • FFlux(int amrlev, const MFIter &mfi, const Array< FArrayBox *, AMREX_SPACEDIM > &flux, const FArrayBox &sol, Location loc, const int face_only=0) const

    • getNComp() const

    • isCrossStencil() const


Set

Set::Set

src/Set/Set.cpp src/Set/Set.H

The Set namespace defines the Alamo datatypes. This includes scalars (Set::Scalar), vectors (Set::Vector), and nD tensors (Set::Tensor). Scalars are an alias for AMReX Real. Vectors and tensors are an alias for the Tuxfamily Eigen vectors and matrices, and so you can use Eigen operations on them (like A.determinant(), etc.) See the Eigen documentation for more.

The Set namespace defines the Matrix4 datatype for fourth order tensors. These can have isotropic, major, minor, majorminor, etc., symmetries.

The Set namespace also defines the Field datatype, which is where most data is stored. It is templated so that Set::Field<Set::Scalar> is a field of scalars, Set::Field<Set::Vector> is a vector field, etc. One can also have, for instance, a field of models, like Set::Field<Model::Solid::Linear::Iostropic>.

API definitions in src/Set/Set.H

Classes

  • Set::Field

    Methods

    • Field()

    • Field(int a_levs, const amrex::Vector< amrex::BoxArray > &a_grids, const amrex::Vector< amrex::DistributionMapping > &a_dmap, int a_ncomp, int a_nghost)

    • Field(int size)

    • Define(int a_levs, const amrex::Vector< amrex::BoxArray > &a_grids, const amrex::Vector< amrex::DistributionMapping > &a_dmap, int a_ncomp, int a_nghost)

    • Define(int a_lev, const amrex::BoxArray &a_grid, const amrex::DistributionMapping &a_dmap, int a_ncomp, int a_nghost)

    • Copy(int, amrex::MultiFab &, int, int) const

    • CopyFrom(int, amrex::MultiFab &, int, int) const

    • Add(int, amrex::MultiFab &, int, int) const

    • AddFrom(int, amrex::MultiFab &, int, int) const

    • NComp() const

    • Name(int) const

    • Patch(int lev, amrex::MFIter &mfi) const &

    • NComp() const

    • Name(int i) const

    • Copy(int a_lev, amrex::MultiFab &a_dst, int a_dstcomp, int a_nghost) const

    • NComp() const

    • Name(int i) const

    • Copy(int a_lev, amrex::MultiFab &a_dst, int a_dstcomp, int a_nghost) const

    • NComp() const

    • Name(int i) const

    • Copy(int a_lev, amrex::MultiFab &a_dst, int a_dstcomp, int a_nghost) const

    • NComp() const

    • Name(int i) const

    • Copy(int a_lev, amrex::MultiFab &a_dst, int a_dstcomp, int a_nghost) const

    • NComp() const

    • Name(int i) const

    • Copy(int a_lev, amrex::MultiFab &a_dst, int a_dstcomp, int a_nghost) const

    • NComp() const

    • Name(int i) const

    • Copy(int a_lev, amrex::MultiFab &a_dst, int a_dstcomp, int a_nghost) const

    • NComp() const

    • Name(int i) const

    • Copy(int a_lev, amrex::MultiFab &a_dst, int a_dstcomp, int a_nghost) const

    • Copy(int a_lev, amrex::MultiFab &a_dst, int a_dstcomp, int a_nghost) const

    • CopyFrom(int a_lev, amrex::MultiFab &a_src, int a_dstcomp, int a_nghost) const

    • Add(int a_lev, amrex::MultiFab &a_dst, int a_dstcomp, int a_nghost) const

    • AddFrom(int a_lev, amrex::MultiFab &a_src, int a_srccomp, int a_nghost) const

    • NComp() const

    • Name(int i) const

    • Copy(int a_lev, amrex::MultiFab &a_dst, int a_dstcomp, int a_nghost) const

    • NComp() const

    • Name(int i) const

    Variables

    • int Set::Field< T >::finest_level

    • std::string Set::Field< T >::name

    • amrex::Array4<T> Set::Field< T >::empty

  • Set::Field< Set::Scalar >

    Methods

    • Field()

    • Field(int size)

    • Define(int a_levs, const amrex::Vector< amrex::BoxArray > &a_grids, const amrex::Vector< amrex::DistributionMapping > &a_dmap, int a_ncomp, int a_nghost)

    • Define(int a_lev, const amrex::BoxArray &a_grid, const amrex::DistributionMapping &a_dmap, int a_ncomp, int a_nghost)

    • Copy(int, amrex::MultiFab &, int, int) const

    • NComp() const

    • Patch(int lev, amrex::MFIter &mfi) const &

    Variables

    • int Set::Field< Set::Scalar >::finest_level

    • amrex::Array4<Set::Scalar> Set::Field< Set::Scalar >::empty

Set::Base

src/Set/Base.H

API definitions in src/Set/Base.H

Classes

  • Set::Matrix4

  • Set::Quaternion

    Methods

    • Quaternion()

    • Quaternion(Set::Scalar w, Set::Scalar x, Set::Scalar y, Set::Scalar z)

    • Quaternion(const Eigen::Matrix3d &R)

    • Quaternion(Eigen::Quaterniond &q)

    • operator=(const Eigen::Quaterniond &rhs)

    • operator+=(const Quaternion &rhs)

Set::Eigen_Amrex

src/Set/Eigen_Amrex.H

API definitions in src/Set/Eigen_Amrex.H

Classes

Set::Matrix4

src/Set/Matrix4.H

API definitions in src/Set/Matrix4.H

Classes

Set::Matrix4_MajorMinor

src/Set/Matrix4_MajorMinor.H

API definitions in src/Set/Matrix4_MajorMinor.H

Classes

  • Set::Matrix4< 2, Sym::MajorMinor > - Data structure for a 4th order 3D tensor with major and minor symmetry.

    Methods

    • Matrix4()

    • operator()(const int i, const int j, const int k, const int l) const

    • operator()(const int i, const int j, const int k, const int l)

    • Print(std::ostream &os)

    • Norm()

    • contains_nan() const

    • operator+=(Matrix4< 2, Sym::MajorMinor > a)

    • operator-=(Matrix4< 2, Sym::MajorMinor > a)

    • operator*=(Matrix4< 2, Sym::MajorMinor > a)

    • operator/=(Matrix4< 2, Sym::MajorMinor > a)

    • operator*=(Set::Scalar alpha)

    • operator/=(Set::Scalar alpha)

    Variables

    • Scalar Set::Matrix4< 2, Sym::MajorMinor >::data[6]

  • Set::Matrix4< 3, Sym::MajorMinor > - Data structure for a 4th order 3D tensor with major and minor symmetry.

    Methods

    • Matrix4()

    • operator()(const int i, const int j, const int k, const int l) const

    • operator()(const int i, const int j, const int k, const int l)

    • Print(std::ostream &os)

    • Norm()

    • contains_nan() const

    • operator+=(Matrix4< 3, Sym::MajorMinor > a)

    • operator-=(Matrix4< 3, Sym::MajorMinor > a)

    • operator*=(Matrix4< 3, Sym::MajorMinor > a)

    • operator/=(Matrix4< 3, Sym::MajorMinor > a)

    • operator*=(Set::Scalar alpha)

    • operator/=(Set::Scalar alpha)

    Variables

    • Scalar Set::Matrix4< 3, Sym::MajorMinor >::data[21]

Set::Matrix4_Diagonal

src/Set/Matrix4_Diagonal.H

API definitions in src/Set/Matrix4_Diagonal.H

Classes

  • Set::Matrix4< AMREX_SPACEDIM, Sym::Diagonal >

    Methods

    • Matrix4()

    • Matrix4(Set::Matrix a_A)

    • operator()(const int i, const int j, const int k, const int l) const

    • Randomize()

    • Print(std::ostream &os)

    • operator+=(const Matrix4< AMREX_SPACEDIM, Sym::Diagonal > &a)

    • operator-=(const Matrix4< AMREX_SPACEDIM, Sym::Diagonal > &a)

    • operator*=(const Set::Scalar &alpha)

    • operator/=(const Set::Scalar &alpha)

    • Norm()

    • contains_nan() const

    Variables

    • Set::Matrix Set::Matrix4< AMREX_SPACEDIM, Sym::Diagonal >::A

Set::Matrix4_Full

src/Set/Matrix4_Full.H

API definitions in src/Set/Matrix4_Full.H

Classes

  • Set::Matrix4< 2, Sym::Full > - Data structure for a symmetrix 4th order 3D tensor.

    Methods

    • Matrix4()

    • operator()(const int i, const int j, const int k, const int l)

    • operator()(const int i, const int j, const int k, const int l) const

    • Print(std::ostream &)

    • contains_nan() const

    Variables

    • Scalar Set::Matrix4< 2, Sym::Full >::data[5]

  • Set::Matrix4< 3, Sym::Full >

    Methods

    • Matrix4()

    • operator()(const int i, const int j, const int k, const int l)

    • operator()(const int i, const int j, const int k, const int l) const

    • Print(std::ostream &os)

    • contains_nan() const

    Variables

    • Scalar Set::Matrix4< 3, Sym::Full >::data[15]

Set::Matrix3

src/Set/Matrix3.H

API definitions in src/Set/Matrix3.H

Classes

  • Set::Matrix3

    Methods

    • operator()(const int i, const int j, const int k)

    • operator()(const int i, const int j, const int k) const

    • operator[](const int i)

    • norm()

    • operator+=(Matrix3 a)

    • operator-=(Matrix3 a)

    • operator*=(Set::Scalar alpha)

    • operator/=(Set::Scalar alpha)

    Variables

    • Set::Matrix Set::Matrix3::data[AMREX_SPACEDIM]

Set::Matrix4_Isotropic

src/Set/Matrix4_Isotropic.H

The isotropic tensor is defined to be

\[C_{ijkl} = \mu(d_{il}d_{jk} + d_{ik}d_{jl}) + \lambda d_{ij} d_{kl}\]

The inverse (“compliance”) tensor is

\[S_{ijkl} = ((1+\nu)/2E)(d_{il}d_{jl} + d_{ik}d_{jl}) - (\nu/E)d_{ij}d_{kl}\]

Replacing E, nu with Lame constants gives:

\[S_{ijkl} = (1/(4 \mu))(d_{il}d_{jl} + d_{ik}d_{jl}) + (\lambda/(2*\mu*(3\lambda+2\mu))) * d_{ij} * d_{kl}\]
For reference: http://solidmechanics.org/text/Chapter3_2/Chapter3_2.htm

https://en.wikipedia.org/wiki/Lam%C3%A9_parameters

API definitions in src/Set/Matrix4_Isotropic.H

Classes

  • Set::Matrix4< AMREX_SPACEDIM, Sym::Isotropic >

    Methods

    • Matrix4()

    • Matrix4(Set::Scalar a_lambda, Set::Scalar a_mu)

    • operator()(const int i, const int j, const int k, const int l) const - Note: for the Isotropic this routine works for ! If you try to assign a value using this with, say.

    • Randomize()

    • Print(std::ostream &os)

    • Lambda() const

    • Mu() const

    • Inverse() const

    • operator+=(const Matrix4< AMREX_SPACEDIM, Sym::Isotropic > &a)

    • operator-=(const Matrix4< AMREX_SPACEDIM, Sym::Isotropic > &a)

    • operator*=(const Matrix4< AMREX_SPACEDIM, Sym::Isotropic > &a)

    • operator/=(const Matrix4< AMREX_SPACEDIM, Sym::Isotropic > &a)

    • operator*=(const Set::Scalar &alpha)

    • operator/=(const Set::Scalar &alpha)

    • Norm()

    • contains_nan() const

    Variables

    • Set::Scalar Set::Matrix4< AMREX_SPACEDIM, Sym::Isotropic >::lambda

    • Set::Scalar Set::Matrix4< AMREX_SPACEDIM, Sym::Isotropic >::mu

Set::Matrix4_Major

src/Set/Matrix4_Major.H

API definitions in src/Set/Matrix4_Major.H

Classes

  • Set::Matrix4< 2, Sym::Major >

    Methods

    • Matrix4()

    • operator()(const int i, const int j, const int k, const int l) const

    • operator()(const int i, const int j, const int k, const int l)

    • Print(std::ostream &os)

    • operator+=(const Matrix4< 2, Sym::Major > &a)

    • operator-=(const Matrix4< 2, Sym::Major > &a)

    • operator*=(const Matrix4< 2, Sym::Major > &a)

    • operator/=(const Matrix4< 2, Sym::Major > &a)

    • operator*=(const Set::Scalar &alpha)

    • operator/=(const Set::Scalar &alpha)

    • Norm()

    • contains_nan() const

    Variables

    • Scalar Set::Matrix4< 2, Sym::Major >::data[10]

  • Set::Matrix4< 3, Sym::Major >

    Methods

    • Matrix4()

    • operator()(const int i, const int j, const int k, const int l)

    • operator()(const int i, const int j, const int k, const int l) const

    • Norm()

    • Print(std::ostream &os)

    • operator+=(const Matrix4< 3, Sym::Major > &a)

    • operator-=(const Matrix4< 3, Sym::Major > &a)

    • operator*=(const Matrix4< 3, Sym::Major > &a)

    • operator/=(const Matrix4< 3, Sym::Major > &a)

    • operator*=(const Set::Scalar &alpha)

    • operator/=(const Set::Scalar &alpha)

    • norm()

    • contains_nan() const

    Variables

    • Scalar Set::Matrix4< 3, Sym::Major >::data[45]


Solver

Solver::Local

Solver::Local::CG

src/Solver/Local/CG.H

API definitions in src/Solver/Local/CG.H

Classes

Solver::Local::Riemann

Solver::Local::Riemann::Riemann

src/Solver/Local/Riemann/Riemann.H

API definitions in src/Solver/Local/Riemann/Riemann.H

Classes

  • Solver::Local::Riemann::Flux

    Methods

    • Flux()

    • Flux(Set::Scalar a_mass, Set::Scalar a_momentum_normal, Set::Scalar a_momentum_tangent, Set::Scalar a_energy)

    • operator+=(const Flux &a)

    • operator-=(const Flux &a)

    • operator*=(const Set::Scalar alpha)

    • operator/=(const Set::Scalar alpha)

    Variables

    • Set::Scalar Solver::Local::Riemann::Flux::mass

    • Set::Scalar Solver::Local::Riemann::Flux::momentum_normal

    • Set::Scalar Solver::Local::Riemann::Flux::momentum_tangent

    • Set::Scalar Solver::Local::Riemann::Flux::energy

  • Solver::Local::Riemann::State

    Methods

    • State()

    • State(Set::Scalar a_rho, Set::Scalar a_M_normal, Set::Scalar a_M_tangent, Set::Scalar a_E)

    • State(Set::Patch< const Set::Scalar > density_mf, Set::Patch< const Set::Scalar > momentum_mf, Set::Patch< const Set::Scalar > energy_mf, int i, int j, int k, int direction)

    • operator+=(const State &a)

    • operator-=(const State &a)

    • operator*=(const Set::Scalar alpha)

    • operator/=(const Set::Scalar alpha)

    Variables

    • Set::Scalar Solver::Local::Riemann::State::rho

    • Set::Scalar Solver::Local::Riemann::State::M_normal

    • Set::Scalar Solver::Local::Riemann::State::M_tangent

    • Set::Scalar Solver::Local::Riemann::State::E

Solver::Local::Riemann::Roe

src/Solver/Local/Riemann/Roe.H

This implements the Riemann Roe solver.

Notation and algorithm follow the presentation in Section 5.3.3 of Computational Gasdynamics by Culbert B. Laney (page 88)

This solver uses an optional entropy fix

Option 1: chimeracfd method https://chimeracfd.com/programming/gryphon/fluxroe.html Option 2: Eq. 4.3.67 in Computational Fluid Dynamics for Engineers and Scientists by Sreenivas Jayanti

Parameter

Type

Values

verbose

enable to dump diagnostic data if the roe solver fails

1

entropy_fix

apply entropy fix if tru

false

API definitions in src/Solver/Local/Riemann/Roe.H

Classes

  • Solver::Local::Riemann::Roe - based on Gas Dynamics - Culbert B. Laney.

    Methods

    • Roe(IO::ParmParse &pp, std::string name)

    • Roe(IO::ParmParse &pp)

    • Roe()

    • Solve(State lo, State hi, Set::Scalar gamma, Set::Scalar p_ref, Set::Scalar small)

    Variables

    • int Solver::Local::Riemann::Roe::verbose

    • int Solver::Local::Riemann::Roe::entropy_fix

Solver::Nonlocal

Solver::Nonlocal::Linear

src/Solver/Nonlocal/Linear.H

Parameter

Type

Values

max_iter

Max number of iterations to perform before erroring out

bottom_max_iter

Max number of iterations on the bottom solver

max_fmg_iter

Max number of F-cycle iterations to perform

fixed_iter

Number of fixed iterations to perform before exiting gracefully

verbose

Verbosity of the solver (1-5)

pre_smooth

Number of smoothing operations before bottom solve (2)

post_smooth

Number of smoothing operations after bottom solve (2)

final_smooth

Number of final smoothing operations when smoother is used as bottom solver (8)

bottom_smooth

Additional smoothing after bottom CG solver (0)

bottom_solver

The method that is used for the multigrid bottom solve (cg, bicgstab, smoother)

bottom_tol_rel

Relative tolerance on bottom solver

bottom_tol_abs

Absolute tolerance on bottom solver

tol_rel

Relative tolerance

tol_abs

Absolute tolerance

omega

Omega (used in gauss-seidel solver)

average_down_coeffs

Whether to average down coefficients or use the ones given. (Setting this to true is important for fracture.)

normalize_ddw

Whether to normalize DDW when calculating the diagonal. This is primarily used when DDW is near-singular - like when there is a "void" region or when doing phase field fracture.

dump_on_fail

If set to true, output diagnostic multifab information whenever the MLMG solver fails to converge. (Note: you must also set amrex.signalhandling=0 and amrex.throw_exception=1 for this to work.)

abort_on_fail

If set to false, MLMG will not die if convergence criterion is not reached. (Note: you must also set amrex.signalhandling=0 and amrex.throw_exception=1 for this to work.)

API definitions in src/Solver/Nonlocal/Linear.H

Classes

  • Solver::Nonlocal::Linear - Multigrid solver for multicomponent, multi-level operators.

    Methods

    • Linear()

    • Linear(Operator::Operator< Grid::Node > &a_lp)

    • ~Linear()

    • Define(Operator::Operator< Grid::Node > &a_lp)

    • Clear()

    • solveaffine(amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_sol, amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_rhs, Real a_tol_rel, Real a_tol_abs, bool copyrhs=false, const char *checkpoint_file=nullptr)

    • solve(amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_sol, amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_rhs, Real a_tol_rel, Real a_tol_abs, const char *checkpoint_file=nullptr)

    • solve(amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_sol, amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_rhs)

    • apply(amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_rhs, amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_sol)

    • setMaxIter(const int a_max_iter)

    • setBottomMaxIter(const int a_bottom_max_iter)

    • setMaxFmgIter(const int a_max_fmg_iter)

    • setFixedIter(const int a_fixed_iter)

    • setVerbose(const int a_verbose)

    • setPreSmooth(const int a_pre_smooth)

    • setPostSmooth(const int a_post_smooth)

    • dumpOnConvergenceFail(const amrex::Vector< amrex::MultiFab * > &a_sol_mf, const amrex::Vector< amrex::MultiFab const * > &a_rhs_mf)

    • PrepareMLMG(amrex::MLMG &mlmg)

    Variables

    • int Solver::Nonlocal::Linear::max_iter

    • int Solver::Nonlocal::Linear::bottom_max_iter

    • int Solver::Nonlocal::Linear::max_fmg_iter

    • int Solver::Nonlocal::Linear::fixed_iter

    • int Solver::Nonlocal::Linear::verbose

    • int Solver::Nonlocal::Linear::pre_smooth

    • int Solver::Nonlocal::Linear::post_smooth

    • int Solver::Nonlocal::Linear::final_smooth

    • int Solver::Nonlocal::Linear::bottom_smooth

    • std::string Solver::Nonlocal::Linear::bottom_solver

    • Set::Scalar Solver::Nonlocal::Linear::cg_tol_rel

    • Set::Scalar Solver::Nonlocal::Linear::cg_tol_abs

    • Set::Scalar Solver::Nonlocal::Linear::bottom_tol_rel

    • Set::Scalar Solver::Nonlocal::Linear::bottom_tol_abs

    • Set::Scalar Solver::Nonlocal::Linear::tol_rel

    • Set::Scalar Solver::Nonlocal::Linear::tol_abs

    • Set::Scalar Solver::Nonlocal::Linear::omega

    • bool Solver::Nonlocal::Linear::average_down_coeffs

    • bool Solver::Nonlocal::Linear::normalize_ddw

    • Operator::Operator<Grid::Node>* Solver::Nonlocal::Linear::linop

    • amrex::MLMG* Solver::Nonlocal::Linear::mlmg

    • bool Solver::Nonlocal::Linear::m_defined

    • bool Solver::Nonlocal::Linear::m_dump_on_fail

    • bool Solver::Nonlocal::Linear::m_abort_on_fail

Solver::Nonlocal::Newton

src/Solver/Nonlocal/Newton.H

Parameter

Type

Values

nriters

Number of newton-raphson iterations.

nrtolerance

Tolerance to use for newton-raphson convergence

API definitions in src/Solver/Nonlocal/Newton.H

Classes

  • Solver::Nonlocal::Newton

    Methods

    • Newton()

    • Newton(Operator::Elastic< T::sym > &a_op)

    • ~Newton()

    • Define(Operator::Elastic< T::sym > &a_op)

    • Clear()

    • setNRIters(int a_nriters)

    • setPsi(Set::Field< Set::Scalar > &a_psi)

    • solve(const Set::Field< Set::Vector > &a_u_mf, const Set::Field< Set::Vector > &a_b_mf, Set::Field< T > &a_model_mf, Real a_tol_rel, Real a_tol_abs, const char *checkpoint_file=nullptr)

    • solve(const Set::Field< Set::Scalar > &a_u_mf, const Set::Field< Set::Scalar > &a_b_mf, Set::Field< T > &a_model_mf, Real a_tol_rel, Real a_tol_abs, const char *checkpoint_file=nullptr)

    • solve(const Set::Field< Set::Scalar > &a_u_mf, const Set::Field< Set::Scalar > &a_b_mf, Set::Field< T > &a_model_mf)

    • compResidual(Set::Field< Set::Scalar > &a_res_mf, Set::Field< Set::Scalar > &a_u_mf, Set::Field< Set::Scalar > &a_b_mf, Set::Field< T > &a_model_mf)

    • compResidual(Set::Field< Set::Vector > &a_res_mf, Set::Field< Set::Vector > &a_u_mf, Set::Field< Set::Vector > &a_b_mf, Set::Field< T > &a_model_mf)

    • compLinearSolverResidual(Set::Field< Set::Vector > &a_res_mf, Set::Field< Set::Vector > &a_u_mf, Set::Field< Set::Vector > &a_b_mf)

    • W(Set::Field< Set::Scalar > &a_w_mf, Set::Field< Set::Scalar > &a_u_mf, Set::Field< T > &a_model_mf)

    • DW(Set::Field< Set::Scalar > &a_dw_mf, Set::Field< Set::Scalar > &a_u_mf, Set::Field< T > &a_model_mf)

    • prepareForSolve(const Set::Field< Set::Scalar > &a_u_mf, const Set::Field< Set::Scalar > &a_b_mf, Set::Field< Set::Scalar > &a_rhs_mf, Set::Field< Set::Matrix > &a_dw_mf, Set::Field< Set::Matrix4< AMREX_SPACEDIM, T::sym > > &a_ddw_mf, Set::Field< T > &a_model_mf)

    • prepareForSolve(const Set::Field< Set::Vector > &a_u_mf, const Set::Field< Set::Vector > &a_b_mf, Set::Field< Set::Scalar > &a_rhs_mf, Set::Field< Set::Matrix > &a_dw_mf, Set::Field< Set::Matrix4< AMREX_SPACEDIM, T::sym > > &a_ddw_mf, Set::Field< T > &a_model_mf)

    Variables

    • int Solver::Nonlocal::Newton< T >::m_nriters

    • Set::Scalar Solver::Nonlocal::Newton< T >::m_nrtolerance

    • Operator::Elastic<T::sym>* Solver::Nonlocal::Newton< T >::m_elastic

    • Set::Field<Set::Scalar>* Solver::Nonlocal::Newton< T >::m_psi


Test

Test::Model

Test::Model::Interface

Test::Model::Interface::GB
Test::Model::Interface::GB::GB

src/Test/Model/Interface/GB/GB.H

API definitions in src/Test/Model/Interface/GB/GB.H

Classes

  • Test::Model::Interface::GB::GB

    Methods

    • GB()

    • DerivativeTest1(int verbose)

    • DerivativeTest2(int verbose)

Test::Numeric

Test::Numeric::Stencil

src/Test/Numeric/Stencil.H

API definitions in src/Test/Numeric/Stencil.H

Classes

  • Test::Numeric::Stencil

    Methods

    • Stencil()

    • ~Stencil()

    • Define(amrex::IntVect _ncells)

    • Define(int _ncells)

    • Derivative(int verbose, std::string plotfile="")

    • WritePlotFile(std::string plotfile)

    Variables

    • amrex::IntVect Test::Numeric::Stencil::ncells

    • const Set::Scalar Test::Numeric::Stencil::L

    • const int Test::Numeric::Stencil::ncomp

    • const int Test::Numeric::Stencil::nghost

    • amrex::Vector<amrex::Geometry> Test::Numeric::Stencil::geom

    • amrex::Vector<amrex::BoxArray> Test::Numeric::Stencil::grids

    • amrex::Vector<amrex::DistributionMapping> Test::Numeric::Stencil::dmap

    • Set::Field<Set::Scalar> Test::Numeric::Stencil::phi

    • Set::Field<Set::Scalar> Test::Numeric::Stencil::DphiExact

    • Set::Field<Set::Scalar> Test::Numeric::Stencil::DphiNumeric

    • amrex::Vector<std::string> Test::Numeric::Stencil::varnames

Test::Set

Test::Set::Matrix4

src/Test/Set/Matrix4.H

API definitions in src/Test/Set/Matrix4.H

Classes

  • Test::Set::Matrix4

    Methods

    • SymmetryTest(int)


Util

Util::Util

src/Util/Util.cpp src/Util/Util.H

Parameter

Type

Values

plot_file

Name of directory containing all output data

API definitions in src/Util/Util.H

Classes

Util::BMP

src/Util/BMP.H

API definitions in src/Util/BMP.H

Classes

  • Util::BMP

    Methods

    • BMP()

    • Define(std::string filename)

    • operator()(int i, int j)

    • min()

    • max()

    Variables

    • int Util::BMP::nx

    • int Util::BMP::ny

    • std::vector<std::array<int,3> > Util::BMP::data

Util::Color

src/Util/Color.H

API definitions in src/Util/Color.H

Classes

Util::MPI

src/Util/MPI.H

API definitions in src/Util/MPI.H

Classes

Util::PNG

src/Util/PNG.H

Parameter

Type

Values

filename

BMP filename.

file path

fit

how to position the image

stretch fitheight fitwidth coord

coord.lo

Lower-left coordinates of image in domain

coord.hi

Upper-right coordinates of image in domain

min

Desired minimum value to scale pixels by

0.0

max

Desired maximum value to scale pixels by

255.0

API definitions in src/Util/PNG.H

Classes

  • Util::PNG

    Methods

    • PNG()

    • PNG(IO::ParmParse &pp, std::string name)

    • ~PNG()

    • setDomain(Set::Vector &_lo, Set::Vector &_hi)

    • operator()(int I, int J)

    • operator()(Set::Vector &x)

    Variables

    • int Util::PNG::png_width

    • int Util::PNG::png_height

    • png_byte Util::PNG::color_type

    • png_byte Util::PNG::bit_depth

    • png_bytep* Util::PNG::row_pointers

    • Set::Vector Util::PNG::coord_lo

    • Set::Vector Util::PNG::coord_hi

    • Fit Util::PNG::fit

    • Set::Scalar Util::PNG::min

    • Set::Scalar Util::PNG::max

    • bool Util::PNG::domain_defined

    • Set::Vector Util::PNG::domain_lo

    • Set::Vector Util::PNG::domain_hi

Util::Hash

Util::Hash::Hash

src/Util/Hash/Hash.H

API definitions in src/Util/Hash/Hash.H

Classes

  • Util::Hash::SHA256

    Methods

    • SHA256()

    • update(const uint8_t *data, size_t length)

    • update(const std::string &data)

    • final()

    • reset()

    • transform()

    • pad()

    Variables

    • std::array<uint32_t, 8> Util::Hash::SHA256::state_

    • uint8_t Util::Hash::SHA256::data_[64]

    • uint32_t Util::Hash::SHA256::datalen_

    • uint64_t Util::Hash::SHA256::bitlen_

    • const std::array<uint32_t, 64> Util::Hash::SHA256::k_