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