|
Alamo
|
Go to the documentation of this file.
15 #ifndef INTEGRATOR_HEATCONDUCTION_H // Include guards
16 #define INTEGRATOR_HEATCONDUCTION_H //
25 #include "AMReX_ParallelDescriptor.H"
26 #include "AMReX_ParmParse.H"
37 #include "Numeric/Stencil.H"
89 if (type ==
"sphere") value.
ic =
new IC::Sphere(value.geom, pp,
"ic.sphere");
90 else if (type ==
"constant") value.
ic =
new IC::Constant(value.geom, pp,
"ic.constant");
91 else if (type ==
"expression") value.
ic =
new IC::Expression(value.geom, pp,
"ic.expression");
97 if (bc_type ==
"expression") value.
bc =
new BC::Expression(1, pp,
"bc.temp.expression");
98 else if (bc_type ==
"constant") value.
bc =
new BC::Constant(1, pp,
"bc.temp");
125 for (amrex::MFIter mfi(*
temp_mf[lev], amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi)
128 const amrex::Box& bx = mfi.tilebox();
137 amrex::ParallelFor(bx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k)
153 Set::Scalar dr = sqrt(AMREX_D_TERM(DX[0] * DX[0], +DX[1] * DX[1], +DX[2] * DX[2]));
156 for (amrex::MFIter mfi(*
temp_mf[lev], amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi)
159 const amrex::Box& bx = mfi.tilebox();
160 amrex::Array4<char>
const& tags = a_tags.array(mfi);
161 amrex::Array4<Set::Scalar>
const& temp = (*
temp_mf[lev]).array(mfi);
164 amrex::ParallelFor(bx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k)
172 tags(i, j, k) = amrex::TagBox::SET;
BC::BC< Set::Scalar > * bc
void Initialize(const int &a_lev, Set::Field< Set::Scalar > &a_field, Set::Scalar a_time=0.0)
Pure abstract IC object from which all other IC objects inherit.
virtual ~HeatConduction()
void TagCellsForRefinement(int lev, amrex::TagBoxArray &a_tags, Set::Scalar, int)
HeatConduction(int a_nghost=2)
Eigen::Matrix< amrex::Real, AMREX_SPACEDIM, 1 > Vector
AMREX_FORCE_INLINE Set::Vector Gradient(const amrex::Array4< const Set::Scalar > &f, const int &i, const int &j, const int &k, const int &m, const Set::Scalar dx[AMREX_SPACEDIM], std::array< StencilType, AMREX_SPACEDIM > stencil=DefaultType)
void RegisterNewFab(Set::Field< Set::Scalar > &new_fab, BC::BC< Set::Scalar > *new_bc, int ncomp, int nghost, std::string name, bool writeout)
AMREX_FORCE_INLINE Set::Scalar Laplacian(const amrex::Array4< const Set::Scalar > &f, const int &i, const int &j, const int &k, const int &m, const Set::Scalar dx[AMREX_SPACEDIM])
void Advance(int lev, Set::Scalar, Set::Scalar dt)
Set::Field< Set::Scalar > temp_mf
#define pp_query_default(...)
void Abort(const char *msg)
Collection of numerical integrator objects.
#define pp_query_validate(...)
const int number_of_ghost_cells
#define pp_query_required(...)
Set::Scalar refinement_threshold
amrex::Array4< T > const & Patch
Set::Field< Set::Scalar > temp_old_mf
HeatConduction(IO::ParmParse &pp)
amrex::Vector< amrex::Real > dt
Timesteps for each level of refinement.
amrex::Array4< Set::Scalar > Patch(int lev, amrex::MFIter &mfi) const &
const int number_of_components
static void Parse(HeatConduction &value, IO::ParmParse &pp)