#include <SLM.H>
|
using | FabPtr = std::shared_ptr< amrex::MultiFab > |
|
◆ FabPtr
◆ SLM()
◆ ~SLM()
◆ Advance()
void SLM::Advance |
( |
const amrex::Real & |
dt | ) |
|
|
inlineoverridevirtual |
Reimplemented from NullSurf.
void ComputeTsurf()
Definition: SLM.cpp:63
amrex::Real m_dt
Definition: SLM.H:126
void ComputeFluxes()
Definition: SLM.cpp:82
void AdvanceSLM()
Definition: SLM.cpp:107
◆ AdvanceSLM()
114 auto box3d = mfi.tilebox();
119 ParallelFor( box3d, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
121 theta_array(i,j,k) += dt * ( theta_flux(i,j,k+1) - theta_flux(i,j,k) ) * dzInv;
amrex::Array< FabPtr, LsmVar_SLM::NumVars > lsm_fab_flux
Definition: SLM.H:141
amrex::Array< FabPtr, LsmVar_SLM::NumVars > lsm_fab_vars
Definition: SLM.H:138
amrex::Geometry m_lsm_geom
Definition: SLM.H:123
@ theta
Definition: SLM.H:20
Referenced by Advance().
◆ ComputeFluxes()
void SLM::ComputeFluxes |
( |
| ) |
|
90 auto box3d = mfi.tilebox();
93 if (box3d.bigEnd(2) == khi+1) box3d.setBig(2,khi);
98 ParallelFor( box3d, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
100 theta_flux(i,j,k) = Dsoil * ( theta_array(i,j,k) - theta_array(i,j,k-1) ) * dzInv;
int khi_lsm
Definition: SLM.H:129
amrex::Real m_d_soil
Definition: SLM.H:161
Referenced by Advance().
◆ ComputeTsurf()
void SLM::ComputeTsurf |
( |
| ) |
|
69 auto box2d = mfi.tilebox(); box2d.makeSlab(2,khi);
73 ParallelFor( box2d, [=] AMREX_GPU_DEVICE (
int i,
int j,
int )
75 theta_array(i,j,khi+1) = 1.5*theta_array(i,j,khi) - 0.5*theta_array(i,j,khi-1);
Referenced by Advance().
◆ Define()
◆ Init()
void SLM::Init |
( |
const amrex::MultiFab & |
cons_in, |
|
|
const amrex::Geometry & |
geom, |
|
|
const amrex::Real & |
dt |
|
) |
| |
|
overridevirtual |
Reimplemented from NullSurf.
14 Box domain = geom.Domain();
15 khi_lsm = domain.smallEnd(2) - 1;
29 BoxArray ba = cons_in.boxArray();
30 DistributionMapping dm = cons_in.DistributionMap();
31 BoxList bl_lsm = ba.boxList();
32 for (
auto& b : bl_lsm) {
36 BoxArray ba_lsm(std::move(bl_lsm));
39 const RealBox& dom_rb =
m_geom.ProbDomain();
40 const Real* dom_dx =
m_geom.CellSize();
41 RealBox lsm_rb = dom_rb;
42 Real lsm_dx[AMREX_SPACEDIM] = {AMREX_D_DECL(dom_dx[0],dom_dx[1],
m_dz_lsm)};
43 Real lsm_z_hi = dom_rb.lo(2);
44 Real lsm_z_lo = lsm_z_hi - Real(
m_nz_lsm)*lsm_dx[2];
45 lsm_rb.setHi(2,lsm_z_hi); lsm_rb.setLo(2,lsm_z_lo);
52 lsm_fab_vars[ivar] = std::make_shared<MultiFab>(ba_lsm, dm, 1, ng);
56 lsm_fab_flux[ivar] = std::make_shared<MultiFab>(convert(ba_lsm, IntVect(0,0,1)), dm, 1, IntVect(0,0,0));
amrex::Vector< std::string > LsmVarName
Definition: SLM.H:117
int m_lsm_size
Definition: SLM.H:111
amrex::Real m_dz_lsm
Definition: SLM.H:149
amrex::Geometry m_geom
Definition: SLM.H:120
int m_nz_lsm
Definition: SLM.H:146
amrex::Vector< int > LsmVarMap
Definition: SLM.H:114
amrex::Real m_theta_dir
Definition: SLM.H:158
@ NumVars
Definition: SLM.H:21
◆ Lsm_Data_Ptr()
amrex::MultiFab* SLM::Lsm_Data_Ptr |
( |
const int & |
varIdx | ) |
|
|
inlineoverridevirtual |
Reimplemented from NullSurf.
79 AMREX_ALWAYS_ASSERT(lsmIdx < SLM::m_lsm_size && lsmIdx>=0);
◆ Lsm_Data_Size()
int SLM::Lsm_Data_Size |
( |
| ) |
|
|
inlineoverridevirtual |
◆ Lsm_Flux_Ptr()
amrex::MultiFab* SLM::Lsm_Flux_Ptr |
( |
const int & |
varIdx | ) |
|
|
inlineoverridevirtual |
Reimplemented from NullSurf.
88 AMREX_ALWAYS_ASSERT(lsmIdx < SLM::m_lsm_size && lsmIdx>=0);
◆ Lsm_Geom()
amrex::Geometry SLM::Lsm_Geom |
( |
| ) |
|
|
inlineoverridevirtual |
◆ Lsm_VarName()
std::string SLM::Lsm_VarName |
( |
const int & |
varIdx | ) |
|
|
inlineoverridevirtual |
Reimplemented from NullSurf.
105 AMREX_ALWAYS_ASSERT(lsmIdx < SLM::m_lsm_size && lsmIdx>=0);
◆ khi_lsm
◆ lsm_fab_flux
◆ lsm_fab_vars
◆ LsmVarMap
amrex::Vector<int> SLM::LsmVarMap |
|
private |
◆ LsmVarName
amrex::Vector<std::string> SLM::LsmVarName |
|
private |
◆ m_cp_soil
amrex::Real SLM::m_cp_soil = 1.26e6 |
|
private |
◆ m_d_soil
◆ m_dt
◆ m_dz_lsm
amrex::Real SLM::m_dz_lsm = 0.1 |
|
private |
◆ m_geom
amrex::Geometry SLM::m_geom |
|
private |
◆ m_k_soil
amrex::Real SLM::m_k_soil = 0.2 |
|
private |
◆ m_lsm_geom
amrex::Geometry SLM::m_lsm_geom |
|
private |
◆ m_lsm_size
◆ m_nz_lsm
◆ m_theta_dir
amrex::Real SLM::m_theta_dir = 400.0 |
|
private |
The documentation for this class was generated from the following files:
- Source/LandSurfaceModel/SLM/SLM.H
- Source/LandSurfaceModel/SLM/SLM.cpp