/home/runner/work/amr-wind/amr-wind/amr-wind/equation_systems/icns/icns_advection.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/equation_systems/icns/icns_advection.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
icns_advection.H
Go to the documentation of this file.
1#ifndef ICNS_ADVECTION_H
2#define ICNS_ADVECTION_H
3
8
9#include "AMReX_MultiFabUtil.H"
10#include "hydro_MacProjector.H"
11#include "hydro_mol.H"
12#include "hydro_utils.H"
13
15
16namespace amr_wind::pde {
17
19{
20public:
22 amrex::Vector<amrex::Array<const amrex::MultiFab*, ICNS::ndim>>;
23
25 FieldRepo& /*repo*/,
26 PhysicsMgr& /*phy_mgr*/,
27 bool /*has_overset*/,
28 bool /*variable_density*/,
29 bool /*mesh_mapping*/,
30 bool /*is_anelastic*/);
31
32 void set_inflow_velocity(amrex::Real time);
33
34 void operator()(const FieldState fstate, const amrex::Real dt);
35
36 static void mac_proj_to_uniform_space(
37 const amr_wind::FieldRepo& /*repo*/,
38 amr_wind::Field& /*u_mac*/,
39 amr_wind::Field& /*v_mac*/,
40 amr_wind::Field& /*w_mac*/,
41 amrex::Array<amrex::MultiFab*, ICNS::ndim>& /*rho_face*/,
42 amrex::Real /*ovst_fac*/,
43 int /*lev*/) noexcept;
44
45 amrex::Real rho0() const { return m_rho_0; }
46
47private:
48 void init_projector(const FaceFabPtrVec& /*beta*/) noexcept;
49 void init_projector(const amrex::Real /*beta*/) noexcept;
50
52 const amrex::Vector<amrex::Array<amrex::MultiFab*, AMREX_SPACEDIM>>&
53 a_umac) noexcept;
54
57 std::unique_ptr<Hydro::MacProjector> m_mac_proj;
58#ifdef AMR_WIND_USE_FFT
59 std::unique_ptr<Hydro::FFTMacProjector> m_fft_mac_proj;
60 bool m_use_fft{true}; // use fft if possible
61#endif
63 bool m_has_overset{false};
64 bool m_need_init{true};
65 bool m_variable_density{false};
66 bool m_mesh_mapping{false};
67 bool m_is_anelastic{false};
68 amrex::Real m_rho_0{1.0};
69};
70
74template <>
75struct AdvectionOp<ICNS, fvm::Godunov>
76{
78 CFDSim& sim,
79 PDEFields& fields_in,
80 bool has_overset,
81 bool variable_density,
82 bool mesh_mapping,
83 bool is_anelastic)
84 : fields(fields_in)
85 , u_mac(fields_in.repo.get_field("u_mac"))
86 , v_mac(fields_in.repo.get_field("v_mac"))
87 , w_mac(fields_in.repo.get_field("w_mac"))
89 fields.repo,
90 sim.physics_manager(),
91 has_overset,
92 variable_density,
93 mesh_mapping,
94 is_anelastic)
95 {
96
97 amrex::ParmParse pp("incflo");
98 pp.query("godunov_type", godunov_type);
99 pp.query("godunov_use_forces_in_trans", godunov_use_forces_in_trans);
100 if (pp.contains("use_ppm") || pp.contains("use_limiter")) {
101 amrex::Abort(
102 "Godunov: use_ppm and use_limiter are deprecated. Please "
103 "update input file");
104 }
105
106 if (amrex::toLower(godunov_type) == "plm") {
108 } else if (amrex::toLower(godunov_type) == "ppm") {
110 } else if (amrex::toLower(godunov_type) == "ppm_nolim") {
112 amrex::Print() << "WARNING: Using advection type ppm_nolim is not "
113 "recommended. Prefer using weno_z."
114 << std::endl;
115 } else if (amrex::toLower(godunov_type) == "bds") {
117 // use Godunov for premac, use BDS for postmac. Eventually
118 // there will be a premac BDS
120 } else if (
121 amrex::toLower(godunov_type) == "weno" ||
122 amrex::toLower(godunov_type) == "weno_js") {
124 } else if (amrex::toLower(godunov_type) == "weno_z") {
126 } else {
127 amrex::Abort(
128 "Invalid godunov_type specified. For godunov_type select "
129 "between plm, ppm, ppm_nolim, bds, weno_js, and weno_z. If no "
130 "godunov_type is specified, the default weno_z is used.");
131 }
132
133 // Flux calculation used in multiphase portions of domain
134 pp.query("mflux_type", mflux_type);
135 if (amrex::toLower(mflux_type) == "minmod") {
137 } else if (amrex::toLower(mflux_type) == "upwind") {
139 } else {
140 amrex::Abort("Invalid argument entered for mflux_type.");
141 }
142
143 // Formulation of discrete ICNS equation
144 // 1 = conservative (default), 0 = nonconservative
145 pp.query("icns_conserv", m_cons);
146 iconserv.resize(ICNS::ndim, m_cons);
147
148 // Get copy of verbose
149 pp.query("verbose", m_verbose);
150
151 amrex::ParmParse pp_eq("ICNS");
152 pp_eq.query(
153 "allow_inflow_at_pressure_outflow", m_allow_inflow_on_outflow);
154 }
155
157 const FieldState fstate, const amrex::Real dt, const amrex::Real time)
158 {
159
160 const auto& repo = fields.repo;
161 const auto& geom = repo.mesh().Geom();
162
163 const auto& src_term = fields.src_term;
164 const auto& dof_field = fields.field.state(fstate);
165 auto bcrec_device = dof_field.bcrec_device();
166
167 //
168 // Predict
169 //
176 const bool godunov_use_ppm =
179 int limiter_type;
181 limiter_type = PPM::NoLimiter;
183 limiter_type = PPM::WENOZ;
185 limiter_type = PPM::WENO_JS;
186 } else {
187 limiter_type = PPM::default_limiter;
188 }
189
190 // if state is NPH, then n and n+1 are known, and only
191 // spatial extrapolation is performed
192 const amrex::Real dt_extrap =
193 (fstate == FieldState::NPH) ? 0.0 : dt;
194 for (int lev = 0; lev < repo.num_active_levels(); ++lev) {
195 HydroUtils::ExtrapVelToFaces(
196 dof_field(lev), src_term(lev), u_mac(lev), v_mac(lev),
197 w_mac(lev), dof_field.bcrec(), bcrec_device.data(),
198 repo.mesh().Geom(lev), dt_extrap, godunov_use_ppm,
200 limiter_type, m_allow_inflow_on_outflow);
201 }
202 } else {
203 amrex::Abort("Invalid godunov scheme");
204 }
205
206 if (m_verbose > 2) {
207 diagnostics::PrintMaxMACVelLocations(repo, "before MAC projection");
208 }
209
210 // Populate boundaries (valid cells) using velocity BCs
211 m_macproj_op.set_inflow_velocity(time);
212
213 // MAC projection
214 m_macproj_op(fstate, dt);
215
216 // Fill mac velocities (ghost cells) using velocity BCs
218 amrex::Array<Field*, AMREX_SPACEDIM> mac_vel = {
219 AMREX_D_DECL(&u_mac, &v_mac, &w_mac)};
220 dof_field.fillpatch_sibling_fields(time, u_mac.num_grow(), mac_vel);
221 }
222
223 for (int lev = 0; lev < repo.num_active_levels(); ++lev) {
224 u_mac(lev).FillBoundary(geom[lev].periodicity());
225 v_mac(lev).FillBoundary(geom[lev].periodicity());
226 w_mac(lev).FillBoundary(geom[lev].periodicity());
227 }
228
229 if (m_verbose > 2) {
230 diagnostics::PrintMaxMACVelLocations(repo, "after MAC projection");
231 }
232 }
233
234 void operator()(const FieldState fstate, const amrex::Real dt)
235 {
236 const auto& repo = fields.repo;
237 const auto& geom = repo.mesh().Geom();
238
239 const auto& src_term = fields.src_term;
240 // cppcheck-suppress constVariableReference
241 auto& conv_term = fields.conv_term;
242 const auto& dof_field = fields.field.state(fstate);
243 const auto& dof_nph = fields.field.state(amr_wind::FieldState::NPH);
244
245 auto flux_x =
246 repo.create_scratch_field(ICNS::ndim, 0, amr_wind::FieldLoc::XFACE);
247 auto flux_y =
248 repo.create_scratch_field(ICNS::ndim, 0, amr_wind::FieldLoc::YFACE);
249 auto flux_z =
250 repo.create_scratch_field(ICNS::ndim, 0, amr_wind::FieldLoc::ZFACE);
251 auto face_x =
252 repo.create_scratch_field(ICNS::ndim, 0, amr_wind::FieldLoc::XFACE);
253 auto face_y =
254 repo.create_scratch_field(ICNS::ndim, 0, amr_wind::FieldLoc::YFACE);
255 auto face_z =
256 repo.create_scratch_field(ICNS::ndim, 0, amr_wind::FieldLoc::ZFACE);
257
258 const auto& rho_o =
259 repo.get_field("density").state(amr_wind::FieldState::Old);
260 const auto& rho_nph =
261 repo.get_field("density").state(amr_wind::FieldState::NPH);
262
263 const bool mphase_vof = repo.field_exists("vof");
264
265 //
266 // Advect momentum eqns
267 //
268 for (int lev = 0; lev < repo.num_active_levels(); ++lev) {
269
270 // form multifab for transport variable and source term
271 amrex::MultiFab q(
272 dof_field(lev).boxArray(), dof_field(lev).DistributionMap(),
274 amrex::MultiFab::Copy(
275 q, dof_field(lev), 0, 0, ICNS::ndim,
277 amrex::MultiFab fq(
278 src_term(lev).boxArray(), src_term(lev).DistributionMap(),
280 amrex::MultiFab::Copy(
281 fq, src_term(lev), 0, 0, ICNS::ndim, fvm::Godunov::nghost_src);
282 // form multifab for time-correct boundary condition of variable
283 amrex::MultiFab q_nph(
284 dof_field(lev).boxArray(), dof_field(lev).DistributionMap(),
286 amrex::MultiFab::Copy(
287 q_nph, dof_nph(lev), 0, 0, ICNS::ndim,
289
290 // Calculate fluxes using momentum directly
291 if (!mphase_vof) {
292
293 for (int idim = 0; idim < dof_field.num_comp(); ++idim) {
294 amrex::MultiFab::Multiply(
295 q, rho_o(lev), 0, idim, 1, fvm::Godunov::nghost_state);
296 // Source terms at old state during advection calculation
297 amrex::MultiFab::Multiply(
298 fq, rho_o(lev), 0, idim, 1, fvm::Godunov::nghost_src);
299
300 amrex::MultiFab::Multiply(
301 q_nph, rho_nph(lev), 0, idim, 1,
303 }
304 }
305
306 amrex::MFItInfo mfi_info;
307 if (amrex::Gpu::notInLaunchRegion()) {
308 mfi_info.EnableTiling(amrex::IntVect(1024, 1024, 1024))
309 .SetDynamic(true);
310 }
317 const bool is_velocity = true;
318 const bool known_edge_state = false;
319 const bool godunov_use_ppm =
324 int limiter_type;
326 limiter_type = PPM::NoLimiter;
328 limiter_type = PPM::WENOZ;
330 limiter_type = PPM::WENO_JS;
331 } else {
332 limiter_type = PPM::default_limiter;
333 }
334
335 // if state is NPH, then n and n+1 are known, and only
336 // spatial extrapolation is performed
337 const amrex::Real dt_extrap =
338 (fstate == FieldState::NPH) ? 0.0 : dt;
339#ifdef AMREX_USE_OMP
340#pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
341#endif
342 for (amrex::MFIter mfi(dof_field(lev), mfi_info); mfi.isValid();
343 ++mfi) {
344 const auto& bx = mfi.tilebox();
345 amrex::FArrayBox tmpfab(
346 amrex::grow(bx, 1), 1, amrex::The_Async_Arena());
347 tmpfab.setVal<amrex::RunOn::Device>(0.0);
348 const auto& divu = tmpfab.array();
349 HydroUtils::ComputeFluxesOnBoxFromState(
350 bx, ICNS::ndim, mfi, q.const_array(mfi),
351 q_nph.const_array(mfi), (*flux_x)(lev).array(mfi),
352 (*flux_y)(lev).array(mfi), (*flux_z)(lev).array(mfi),
353 (*face_x)(lev).array(mfi), (*face_y)(lev).array(mfi),
354 (*face_z)(lev).array(mfi), known_edge_state,
355 u_mac(lev).const_array(mfi),
356 v_mac(lev).const_array(mfi),
357 w_mac(lev).const_array(mfi), divu, fq.const_array(mfi),
358 geom[lev], dt_extrap, dof_field.bcrec(),
359 dof_field.bcrec_device().data(), iconserv.data(),
360 godunov_use_ppm, godunov_use_forces_in_trans,
361 is_velocity, fluxes_are_area_weighted,
362 postmac_advection_type, limiter_type,
364 }
365 } else {
366 amrex::Abort("Invalid godunov scheme");
367 }
368 }
369
370 // Multiphase flux operations
371 if (mphase_vof) {
372 // Loop levels
374 repo, ICNS::ndim, iconserv, (*flux_x), (*flux_y), (*flux_z),
375 dof_field, dof_nph, src_term, rho_o, rho_nph, u_mac, v_mac,
376 w_mac, dof_field.bcrec(), dof_field.bcrec_device().data(),
377 rho_o.bcrec(), rho_o.bcrec_device().data(), dt, mflux_scheme,
379 }
380
381 amrex::Vector<amrex::Array<amrex::MultiFab*, AMREX_SPACEDIM>> fluxes(
382 repo.num_active_levels());
383 for (int lev = 0; lev < repo.num_active_levels(); ++lev) {
384 fluxes[lev][0] = &(*flux_x)(lev);
385 fluxes[lev][1] = &(*flux_y)(lev);
386 fluxes[lev][2] = &(*flux_z)(lev);
387 }
388
389 // In order to enforce conservation across coarse-fine boundaries we
390 // must be sure to average down the fluxes before we use them
391 for (int lev = repo.num_active_levels() - 1; lev > 0; --lev) {
392 amrex::IntVect rr =
393 geom[lev].Domain().size() / geom[lev - 1].Domain().size();
394 amrex::average_down_faces(
395 GetArrOfConstPtrs(fluxes[lev]), fluxes[lev - 1], rr,
396 geom[lev - 1]);
397 }
398
399 for (int lev = 0; lev < repo.num_active_levels(); ++lev) {
400
401#ifdef AMREX_USE_OMP
402#pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
403#endif
404 for (amrex::MFIter mfi(dof_field(lev), amrex::TilingIfNotGPU());
405 mfi.isValid(); ++mfi) {
406 const auto& bx = mfi.tilebox();
407
408 HydroUtils::ComputeDivergence(
409 bx, conv_term(lev).array(mfi), (*flux_x)(lev).array(mfi),
410 (*flux_y)(lev).array(mfi), (*flux_z)(lev).array(mfi),
411 ICNS::ndim, geom[lev], amrex::Real(-1.0),
413
414 if (m_cons == 0) {
415 amrex::FArrayBox div_umac(bx, 1, amrex::The_Async_Arena());
416 auto const& divum_arr = div_umac.array();
417 HydroUtils::ComputeDivergence(
418 bx, divum_arr, u_mac(lev).const_array(mfi),
419 v_mac(lev).const_array(mfi),
420 w_mac(lev).const_array(mfi), 1, geom[lev],
421 amrex::Real(1.0), false);
422 HydroUtils::ComputeConvectiveTerm(
423 bx, ICNS::ndim, mfi, dof_field(lev).const_array(mfi),
424 (*face_x)(lev).const_array(mfi),
425 (*face_y)(lev).const_array(mfi),
426 (*face_z)(lev).const_array(mfi), divum_arr,
427 conv_term(lev).array(mfi), iconserv.data(),
429 }
430 }
431 }
432 }
433
438
440 amrex::Gpu::DeviceVector<int> iconserv;
441
444 std::string godunov_type{"weno_z"};
445 std::string mflux_type{"upwind"};
446 const bool fluxes_are_area_weighted{false};
448 int m_cons{1};
449 int m_verbose{0};
451 std::string premac_advection_type{"Godunov"};
452 std::string postmac_advection_type{"Godunov"};
453};
454
458template <>
459struct AdvectionOp<ICNS, fvm::MOL>
460{
462 CFDSim& sim,
463 PDEFields& fields_in,
464 bool has_overset,
465 bool variable_density,
466 bool mesh_mapping,
467 bool is_anelastic)
468 : fields(fields_in)
469 , u_mac(fields_in.repo.get_field("u_mac"))
470 , v_mac(fields_in.repo.get_field("v_mac"))
471 , w_mac(fields_in.repo.get_field("w_mac"))
472 , m_mesh_mapping(mesh_mapping)
473 , m_macproj_op(
474 fields.repo,
475 sim.physics_manager(),
476 has_overset,
477 variable_density,
479 is_anelastic)
480 {}
481
483 const FieldState fstate,
484 const amrex::Real dt,
485 const amrex::Real /*time*/)
486 {
487
488 const auto& repo = fields.repo;
489 auto& dof_field = fields.field.state(fstate);
490
491 // computation of velocity on faces requires
492 // dof field to be in stretched mesh space
493 if (dof_field.in_uniform_space() && m_mesh_mapping) {
494 dof_field.to_stretched_space();
495 }
496
497 //
498 // Predict velocities
499 //
500
501 for (int lev = 0; lev < repo.num_active_levels(); ++lev) {
502 MOL::ExtrapVelToFaces(
503 dof_field(lev), u_mac(lev), v_mac(lev), w_mac(lev),
504 repo.mesh().Geom(lev), dof_field.bcrec(),
505 dof_field.bcrec_device().data());
506 }
507
508 m_macproj_op(fstate, dt);
509 }
510
511 void operator()(const FieldState fstate, const amrex::Real /*unused*/)
512 {
513
514 const auto& repo = fields.repo;
515 const auto& geom = repo.mesh().Geom();
516 // cppcheck-suppress constVariableReference
517 auto& conv_term = fields.conv_term.state(fstate);
518 const auto& dof_field = fields.field.state(fstate);
519 const auto& rho = repo.get_field("density").state(fstate);
520
521 //
522 // Advect velocity
523 //
524
525 int nmaxcomp = AMREX_SPACEDIM;
526 for (int lev = 0; lev < repo.num_active_levels(); ++lev) {
527
528 amrex::MFItInfo mfi_info;
529 // if (amrex::Gpu::notInLaunchRegion())
530 // mfi_info.EnableTiling(amrex::IntVect(1024,16,16)).SetDynamic(true);
531 if (amrex::Gpu::notInLaunchRegion()) {
532 mfi_info.EnableTiling(amrex::IntVect(1024, 1024, 1024))
533 .SetDynamic(true);
534 }
535#ifdef AMREX_USE_OMP
536#pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
537#endif
538 for (amrex::MFIter mfi(dof_field(lev), mfi_info); mfi.isValid();
539 ++mfi) {
540 amrex::Box const& bx = mfi.tilebox();
541 amrex::Box gbx = grow(bx, fvm::MOL::nghost_state);
542
543 // Set up momentum array
544 amrex::FArrayBox qfab(
545 gbx, ICNS::ndim, amrex::The_Async_Arena());
546 const auto& q = qfab.array();
547 // Calculate momentum
548 auto rho_arr = rho(lev).const_array(mfi);
549 auto vel_arr = dof_field(lev).const_array(mfi);
550 amrex::ParallelFor(
551 gbx, ICNS::ndim,
552 [=] AMREX_GPU_DEVICE(int i, int j, int k, int n) noexcept {
553 q(i, j, k, n) = rho_arr(i, j, k) * vel_arr(i, j, k, n);
554 });
555 // Doing this explicitly, instead of through a Multiply command,
556 // helps avoid floating-point errors with intel compilers and
557 // mimics the implementation in equation_systems/AdvOp_MOL.H
558
559 amrex::Box tmpbox = amrex::surroundingNodes(bx);
560 const int tmpcomp = nmaxcomp * AMREX_SPACEDIM;
561
562 amrex::FArrayBox tmpfab(
563 tmpbox, tmpcomp, amrex::The_Async_Arena());
564
565 amrex::Array4<amrex::Real> fx = tmpfab.array(0);
566 amrex::Array4<amrex::Real> fy = tmpfab.array(nmaxcomp);
567 amrex::Array4<amrex::Real> fz = tmpfab.array(nmaxcomp * 2);
568
570 lev, bx, AMREX_SPACEDIM, fx, fy, fz, q,
571 u_mac(lev).const_array(mfi), v_mac(lev).const_array(mfi),
572 w_mac(lev).const_array(mfi), dof_field.bcrec().data(),
573 dof_field.bcrec_device().data(), geom);
574
576 bx, AMREX_SPACEDIM, conv_term(lev).array(mfi), fx, fy, fz,
577 geom[lev].InvCellSizeArray());
578 }
579 }
580 }
581
586
588
590};
591
592} // namespace amr_wind::pde
593
594#endif /* ICNS_ADVECTION_H */
Definition CFDSim.H:54
Definition Field.H:116
Definition FieldRepo.H:86
Definition Physics.H:100
Definition icns_advection.H:19
MacProjOp(FieldRepo &, PhysicsMgr &, bool, bool, bool, bool)
Definition icns_advection.cpp:42
amrex::Real rho0() const
Definition icns_advection.H:45
bool m_need_init
Definition icns_advection.H:64
void operator()(const FieldState fstate, const amrex::Real dt)
Definition icns_advection.cpp:207
bool m_mesh_mapping
Definition icns_advection.H:66
void set_inflow_velocity(amrex::Real time)
Definition icns_advection.cpp:155
amrex::Real m_rho_0
Definition icns_advection.H:68
void enforce_inout_solvability(const amrex::Vector< amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > > &a_umac) noexcept
Definition icns_advection.cpp:67
MLMGOptions m_options
Definition icns_advection.H:62
std::unique_ptr< Hydro::MacProjector > m_mac_proj
Definition icns_advection.H:57
amrex::Vector< amrex::Array< const amrex::MultiFab *, ICNS::ndim > > FaceFabPtrVec
Definition icns_advection.H:21
bool m_is_anelastic
Definition icns_advection.H:67
bool m_has_overset
Definition icns_advection.H:63
FieldRepo & m_repo
Definition icns_advection.H:55
PhysicsMgr & m_phy_mgr
Definition icns_advection.H:56
void init_projector(const FaceFabPtrVec &) noexcept
Definition icns_advection.cpp:78
bool m_variable_density
Definition icns_advection.H:65
static void mac_proj_to_uniform_space(const amr_wind::FieldRepo &, amr_wind::Field &, amr_wind::Field &, amr_wind::Field &, amrex::Array< amrex::MultiFab *, ICNS::ndim > &, amrex::Real, int) noexcept
Definition icns_advection.cpp:377
FieldState
Definition FieldDescTypes.H:14
@ ZFACE
Face-centered in z-direction.
Definition FieldDescTypes.H:32
@ XFACE
Face-centered in x-direction (e.g., face normal velocity)
Definition FieldDescTypes.H:30
@ YFACE
Face-centered in y-direction.
Definition FieldDescTypes.H:31
@ NPH
State at (n + 1/2) (intermediate) timestep.
Definition FieldDescTypes.H:18
@ Old
Same as FieldState::N.
Definition FieldDescTypes.H:21
amrex::Array< amrex::Real, 24 > PrintMaxMACVelLocations(const amr_wind::FieldRepo &repo, const std::string &header)
Definition diagnostics.cpp:433
Definition SchemeTraits.H:6
static void hybrid_fluxes(const FieldRepo &repo, const int ncomp, const amrex::Gpu::DeviceVector< int > &iconserv, ScratchField &flux_x, ScratchField &flux_y, ScratchField &flux_z, const Field &dof_field, const Field &dof_nph, const Field &src_term, const Field &rho_o, const Field &rho_nph, const Field &u_mac, const Field &v_mac, const Field &w_mac, amrex::Vector< amrex::BCRec > const &velbc, amrex::BCRec const *velbc_d, amrex::Vector< amrex::BCRec > const &rhobc, amrex::BCRec const *rhobc_d, const amrex::Real dt, godunov::scheme mflux_scheme, bool allow_inflow_on_outflow, bool use_forces_in_trans, bool pre_multiplied_src_term=false)
Definition vof_momentum_flux.H:8
Definition AdvOp_Godunov.H:18
scheme
Definition Godunov.H:11
@ BDS
Definition Godunov.H:11
@ PPM
Definition Godunov.H:11
@ UPWIND
Definition Godunov.H:11
@ PLM
Definition Godunov.H:11
@ WENO_JS
Definition Godunov.H:11
@ MINMOD
Definition Godunov.H:11
@ PPM_NOLIM
Definition Godunov.H:11
@ WENOZ
Definition Godunov.H:11
void compute_convective_rate(amrex::Box const &bx, int ncomp, amrex::Array4< amrex::Real > const &dUdt, amrex::Array4< amrex::Real const > const &fx, amrex::Array4< amrex::Real const > const &fy, amrex::Array4< amrex::Real const > const &fz, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > dxi)
Definition incflo_mol_fluxes.cpp:6
void compute_convective_fluxes(int lev, amrex::Box const &bx, int ncomp, amrex::Array4< amrex::Real > const &fx, amrex::Array4< amrex::Real > const &fy, amrex::Array4< amrex::Real > const &fz, amrex::Array4< amrex::Real const > const &q, amrex::Array4< amrex::Real const > const &umac, amrex::Array4< amrex::Real const > const &vmac, amrex::Array4< amrex::Real const > const &wmac, amrex::BCRec const *h_bcrec, amrex::BCRec const *d_bcrec, amrex::Vector< amrex::Geometry > geom)
Definition incflo_mol_fluxes.cpp:26
Definition MLMGOptions.H:25
static constexpr int nghost_state
Number of ghost in the state variable.
Definition SchemeTraits.H:19
static constexpr int nghost_src
Number of ghost cells in the source term variable.
Definition SchemeTraits.H:21
static constexpr int nghost_state
Number of ghost cells in the state variable.
Definition SchemeTraits.H:41
MacProjOp m_macproj_op
Definition icns_advection.H:439
godunov::scheme mflux_scheme
Definition icns_advection.H:443
Field & w_mac
Definition icns_advection.H:437
int m_verbose
Definition icns_advection.H:449
godunov::scheme godunov_scheme
Definition icns_advection.H:442
std::string postmac_advection_type
Definition icns_advection.H:452
AdvectionOp(CFDSim &sim, PDEFields &fields_in, bool has_overset, bool variable_density, bool mesh_mapping, bool is_anelastic)
Definition icns_advection.H:77
void preadvect(const FieldState fstate, const amrex::Real dt, const amrex::Real time)
Definition icns_advection.H:156
int m_cons
Definition icns_advection.H:448
std::string mflux_type
Definition icns_advection.H:445
const bool fluxes_are_area_weighted
Definition icns_advection.H:446
bool m_allow_inflow_on_outflow
Definition icns_advection.H:450
void operator()(const FieldState fstate, const amrex::Real dt)
Definition icns_advection.H:234
bool godunov_use_forces_in_trans
Definition icns_advection.H:447
std::string godunov_type
Definition icns_advection.H:444
Field & u_mac
Definition icns_advection.H:435
std::string premac_advection_type
Definition icns_advection.H:451
amrex::Gpu::DeviceVector< int > iconserv
Definition icns_advection.H:440
PDEFields & fields
Definition icns_advection.H:434
Field & v_mac
Definition icns_advection.H:436
bool m_mesh_mapping
Definition icns_advection.H:587
Field & u_mac
Definition icns_advection.H:583
void preadvect(const FieldState fstate, const amrex::Real dt, const amrex::Real)
Definition icns_advection.H:482
Field & v_mac
Definition icns_advection.H:584
AdvectionOp(CFDSim &sim, PDEFields &fields_in, bool has_overset, bool variable_density, bool mesh_mapping, bool is_anelastic)
Definition icns_advection.H:461
Field & w_mac
Definition icns_advection.H:585
PDEFields & fields
Definition icns_advection.H:582
MacProjOp m_macproj_op
Definition icns_advection.H:589
void operator()(const FieldState fstate, const amrex::Real)
Definition icns_advection.H:511
Definition icns.H:34
static constexpr int ndim
Definition icns.H:40
Definition PDEFields.H:27