AMReX-Hydro
AMReX-based hydro routines for low Mach number flows
 
Loading...
Searching...
No Matches
hydro_utils.H
Go to the documentation of this file.
1/** \addtogroup Utilities
2 * @{
3 */
4
5#ifndef HYDRO_UTILS_H
6#define HYDRO_UTILS_H
7
9#include <AMReX_BCRec.H>
10#include <hydro_godunov_ppm.H>
11
12#if defined(AMREX_USE_EB) && !defined(HYDRO_NO_EB)
13#include <AMReX_EBFabFactory.H>
15#endif
16
17/**
18 * Collection of hydro utility functions
19 *
20 */
21
22namespace HydroUtils {
23
24/**
25 * \brief Enforces solvablity by scaling outflow to match with inflow.
26 *
27 * Only boundaries with BCType::direction_dependent take part. The inflow and
28 * outflow are integrated over the tagged boundary faces, and the outflow is then
29 * scaled by influx/outflux. Each face is weighted by its own area, so 2D RZ is
30 * handled (an r-face carries 2*pi*r*dz and a z-face 2*pi*r*dr); spherical
31 * coordinates are not supported and are asserted against. The test for "no flow at all" compares the mean
32 * normal speed over the tagged faces against small_vel, so it does not depend on
33 * the length scale of the problem.
34 *
35 * \param[in,out] vels_vec Per level, the normal velocity in each direction. Each
36 * MultiFab is read and written in its boundary ghost
37 * cells, so it needs (filled) ghost cells: one in the
38 * normal direction if it is cell-centered, and one in each
39 * tangential direction if include_bndry_corners is true.
40 * This is asserted.
41 * \param[in] bc_type Boundary conditions for the normal velocity.
42 * \param[in] geom Per level geometry.
43 * \param[in] include_bndry_corners Also tag and correct the cells in the
44 * corners of the domain boundary.
45 */
48 amrex::BCRec const* bc_type,
50 bool include_bndry_corners = false);
51
52/**
53 * \brief Compute edge state and flux. Most general version for use with multilevel synchronization.
54 * All other versions ultimately call this one.
55 * Allows time-depdendent inflow and inflow through EB.
56 *
57 * \note See ComputeFluxes for the meaning of iconserv, in particular the
58 * iconserv[n] == -1 convention, which means the face array already holds
59 * the final flux and bypasses every geometric factor. It requires
60 * knownFaceState = true.
61 *
62 * \note Ghost-cell requirements, when knownFaceState is false and the edge state
63 * is predicted here: q needs 3 filled ghost cells (4 for 3D EBGodunov, and
64 * BDS needs the corners as well), the MAC velocities need 1, and divu needs
65 * 1. divu must be a valid Array4 in 3D Godunov for every component, and for
66 * BDS whenever any component is conservative.
67 *
68 * \note advection_type must be one of "Godunov", "MOL" or "BDS". BDS is not
69 * available with EB.
70 *
71 * \note On a level that has cut cells, the cut boxes are handled by EBGodunov, which
72 * uses PLM and adds the forces after the transverse terms. godunov_use_ppm and
73 * godunov_use_forces_in_trans are therefore ignored on every box of such a level,
74 * so that the scheme does not change from box to box and a face shared by a
75 * regular box and a cut box is computed the same way from both sides.
76 *
77 * \note bc_arr, the position-dependent boundary conditions, is only supported
78 * with (EB)Godunov; passing it with "MOL" or "BDS" aborts, because those
79 * kernels would silently use h_bcrec/d_bcrec instead.
80 */
81void
86 amrex::Array4<amrex::Real> const& flux_y,
87 amrex::Array4<amrex::Real> const& flux_z),
89 amrex::Array4<amrex::Real> const& face_y,
90 amrex::Array4<amrex::Real> const& face_z),
91 bool knownFaceState,
100 amrex::Geometry geom,
101 amrex::Real l_dt,
102 amrex::Vector<amrex::BCRec> const& h_bcrec,
103 const amrex::BCRec* d_bcrec,
104 int const* iconserv,
105#if defined(AMREX_USE_EB) && !defined(HYDRO_NO_EB)
106 const amrex::EBFArrayBoxFactory& ebfact,
107 amrex::Array4<amrex::Real const> const& values_on_eb_inflow,
108#endif
109 bool godunov_use_ppm, bool godunov_use_forces_in_trans,
110 bool is_velocity, bool fluxes_are_area_weighted,
111 std::string const& advection_type,
112 int limiter_type = PPM::default_limiter,
113 bool allow_inflow_on_outflow = false,
114 amrex::Array4<int const> const& bc_arr = {});
115
116void
120 amrex::Array4<amrex::Real> const& flux_y,
121 amrex::Array4<amrex::Real> const& flux_z),
123 amrex::Array4<amrex::Real> const& face_y,
124 amrex::Array4<amrex::Real> const& face_z),
125 bool knownFaceState,
134 amrex::Geometry geom,
135 amrex::Real l_dt,
136 amrex::Vector<amrex::BCRec> const& h_bcrec,
137 const amrex::BCRec* d_bcrec,
138 int const* iconserv,
139#if defined(AMREX_USE_EB) && !defined(HYDRO_NO_EB)
140 const amrex::EBFArrayBoxFactory& ebfact,
141 amrex::Array4<amrex::Real const> const& values_on_eb_inflow,
142#endif
143 bool godunov_use_ppm, bool godunov_use_forces_in_trans,
144 bool is_velocity, bool fluxes_are_area_weighted,
145 std::string const& advection_type,
146 int limiter_type = PPM::default_limiter,
147 bool allow_inflow_on_outflow = false,
148 amrex::Array4<int const> const& bc_arr = {});
149/**
150 * \brief Compute edge state and flux. Allows inflow on EB but NOT time-dependent inflow.
151 *
152 *
153 * \note See ComputeFluxes for the meaning of iconserv, in particular the
154 * iconserv[n] == -1 convention, which means the face array already holds
155 * the final flux and bypasses every geometric factor. It requires
156 * knownFaceState = true.
157 *
158 * \note Ghost-cell requirements, when knownFaceState is false and the edge state
159 * is predicted here: q needs 3 filled ghost cells (4 for 3D EBGodunov, and
160 * BDS needs the corners as well), the MAC velocities need 1, and divu needs
161 * 1. divu must be a valid Array4 in 3D Godunov for every component, and for
162 * BDS whenever any component is conservative.
163 *
164 * \note advection_type must be one of "Godunov", "MOL" or "BDS". BDS is not
165 * available with EB.
166 *
167 * \note On a level that has cut cells, the cut boxes are handled by EBGodunov, which
168 * uses PLM and adds the forces after the transverse terms. godunov_use_ppm and
169 * godunov_use_forces_in_trans are therefore ignored on every box of such a level,
170 * so that the scheme does not change from box to box and a face shared by a
171 * regular box and a cut box is computed the same way from both sides.
172 *
173 * \note bc_arr, the position-dependent boundary conditions, is only supported
174 * with (EB)Godunov; passing it with "MOL" or "BDS" aborts, because those
175 * kernels would silently use h_bcrec/d_bcrec instead.
176 */
177void
181 amrex::Array4<amrex::Real> const& flux_y,
182 amrex::Array4<amrex::Real> const& flux_z),
184 amrex::Array4<amrex::Real> const& face_y,
185 amrex::Array4<amrex::Real> const& face_z),
186 bool knownFaceState,
192 amrex::Geometry geom,
193 amrex::Real l_dt,
194 amrex::Vector<amrex::BCRec> const& h_bcrec,
195 const amrex::BCRec* d_bcrec,
196 int const* iconserv,
197#if defined(AMREX_USE_EB) && !defined(HYDRO_NO_EB)
198 const amrex::EBFArrayBoxFactory& ebfact,
199 amrex::Array4<amrex::Real const> const& values_on_eb_inflow,
200#endif
201 bool godunov_use_ppm, bool godunov_use_forces_in_trans,
202 bool is_velocity, bool fluxes_are_area_weighted,
203 std::string const& advection_type,
204 int limiter_type = PPM::default_limiter,
205 bool allow_inflow_on_outflow = false,
206 amrex::Array4<int const> const& bc_arr = {});
207
208#if defined(AMREX_USE_EB) && !defined(HYDRO_NO_EB)
209/**
210 * \brief Compute edge state and flux. Allows time-depdendent inflow but no inflow through EB.
211 *
212 *
213 * \note See ComputeFluxes for the meaning of iconserv, in particular the
214 * iconserv[n] == -1 convention, which means the face array already holds
215 * the final flux and bypasses every geometric factor. It requires
216 * knownFaceState = true.
217 *
218 * \note Ghost-cell requirements, when knownFaceState is false and the edge state
219 * is predicted here: q needs 3 filled ghost cells (4 for 3D EBGodunov, and
220 * BDS needs the corners as well), the MAC velocities need 1, and divu needs
221 * 1. divu must be a valid Array4 in 3D Godunov for every component, and for
222 * BDS whenever any component is conservative.
223 *
224 * \note advection_type must be one of "Godunov", "MOL" or "BDS". BDS is not
225 * available with EB.
226 *
227 * \note On a level that has cut cells, the cut boxes are handled by EBGodunov, which
228 * uses PLM and adds the forces after the transverse terms. godunov_use_ppm and
229 * godunov_use_forces_in_trans are therefore ignored on every box of such a level,
230 * so that the scheme does not change from box to box and a face shared by a
231 * regular box and a cut box is computed the same way from both sides.
232 *
233 * \note bc_arr, the position-dependent boundary conditions, is only supported
234 * with (EB)Godunov; passing it with "MOL" or "BDS" aborts, because those
235 * kernels would silently use h_bcrec/d_bcrec instead.
236 */
237void
242 amrex::Array4<amrex::Real> const& flux_y,
243 amrex::Array4<amrex::Real> const& flux_z),
245 amrex::Array4<amrex::Real> const& face_y,
246 amrex::Array4<amrex::Real> const& face_z),
247 bool knownFaceState,
253 amrex::Geometry geom,
254 amrex::Real l_dt,
255 amrex::Vector<amrex::BCRec> const& h_bcrec,
256 const amrex::BCRec* d_bcrec,
257 int const* iconserv,
258 const amrex::EBFArrayBoxFactory& ebfact,
259 /*amrex::Array4<amrex::Real const> const& values_on_eb_inflow,*/
260 bool godunov_use_ppm, bool godunov_use_forces_in_trans,
261 bool is_velocity, bool fluxes_are_area_weighted,
262 std::string const& advection_type,
263 int limiter_type = PPM::default_limiter,
264 bool allow_inflow_on_outflow = false,
265 amrex::Array4<int const> const& bc_arr = {});
266#endif
267
268/**
269 * \brief Compute edge state and flux. Does NOT allow time-depdendent inflow or inflow through EB.
270 *
271 *
272 * \note See ComputeFluxes for the meaning of iconserv, in particular the
273 * iconserv[n] == -1 convention, which means the face array already holds
274 * the final flux and bypasses every geometric factor. It requires
275 * knownFaceState = true.
276 *
277 * \note Ghost-cell requirements, when knownFaceState is false and the edge state
278 * is predicted here: q needs 3 filled ghost cells (4 for 3D EBGodunov, and
279 * BDS needs the corners as well), the MAC velocities need 1, and divu needs
280 * 1. divu must be a valid Array4 in 3D Godunov for every component, and for
281 * BDS whenever any component is conservative.
282 *
283 * \note advection_type must be one of "Godunov", "MOL" or "BDS". BDS is not
284 * available with EB.
285 *
286 * \note On a level that has cut cells, the cut boxes are handled by EBGodunov, which
287 * uses PLM and adds the forces after the transverse terms. godunov_use_ppm and
288 * godunov_use_forces_in_trans are therefore ignored on every box of such a level,
289 * so that the scheme does not change from box to box and a face shared by a
290 * regular box and a cut box is computed the same way from both sides.
291 *
292 * \note bc_arr, the position-dependent boundary conditions, is only supported
293 * with (EB)Godunov; passing it with "MOL" or "BDS" aborts, because those
294 * kernels would silently use h_bcrec/d_bcrec instead.
295 */
296#if defined(AMREX_USE_EB) && !defined(HYDRO_NO_EB)
297void
301 amrex::Array4<amrex::Real> const& flux_y,
302 amrex::Array4<amrex::Real> const& flux_z),
304 amrex::Array4<amrex::Real> const& face_y,
305 amrex::Array4<amrex::Real> const& face_z),
306 bool knownFaceState,
312 amrex::Geometry geom,
313 amrex::Real l_dt,
314 amrex::Vector<amrex::BCRec> const& h_bcrec,
315 const amrex::BCRec* d_bcrec,
316 int const* iconserv,
317 const amrex::EBFArrayBoxFactory& ebfact,
318 /*amrex::Array4<amrex::Real const> const& values_on_eb_inflow,*/
319 bool godunov_use_ppm, bool godunov_use_forces_in_trans,
320 bool is_velocity, bool fluxes_are_area_weighted,
321 std::string const& advection_type,
322 int limiter_type = PPM::default_limiter,
323 bool allow_inflow_on_outflow = false,
324 amrex::Array4<int const> const& bc_arr = {});
325#endif
326
327/**
328 * \brief Compute edge state and flux. Allows time-depdendent inflow and inflow through EB.
329 *
330 *
331 * \note See ComputeFluxes for the meaning of iconserv, in particular the
332 * iconserv[n] == -1 convention, which means the face array already holds
333 * the final flux and bypasses every geometric factor. It requires
334 * knownFaceState = true.
335 *
336 * \note Ghost-cell requirements, when knownFaceState is false and the edge state
337 * is predicted here: q needs 3 filled ghost cells (4 for 3D EBGodunov, and
338 * BDS needs the corners as well), the MAC velocities need 1, and divu needs
339 * 1. divu must be a valid Array4 in 3D Godunov for every component, and for
340 * BDS whenever any component is conservative.
341 *
342 * \note advection_type must be one of "Godunov", "MOL" or "BDS". BDS is not
343 * available with EB.
344 *
345 * \note On a level that has cut cells, the cut boxes are handled by EBGodunov, which
346 * uses PLM and adds the forces after the transverse terms. godunov_use_ppm and
347 * godunov_use_forces_in_trans are therefore ignored on every box of such a level,
348 * so that the scheme does not change from box to box and a face shared by a
349 * regular box and a cut box is computed the same way from both sides.
350 *
351 * \note bc_arr, the position-dependent boundary conditions, is only supported
352 * with (EB)Godunov; passing it with "MOL" or "BDS" aborts, because those
353 * kernels would silently use h_bcrec/d_bcrec instead.
354 */
355void
360 amrex::Array4<amrex::Real> const& flux_y,
361 amrex::Array4<amrex::Real> const& flux_z),
363 amrex::Array4<amrex::Real> const& face_y,
364 amrex::Array4<amrex::Real> const& face_z),
365 bool knownFaceState,
371 amrex::Geometry geom,
372 amrex::Real l_dt,
373 amrex::Vector<amrex::BCRec> const& h_bcrec,
374 const amrex::BCRec* d_bcrec,
375 int const* iconserv,
376#if defined(AMREX_USE_EB) && !defined(HYDRO_NO_EB)
377 const amrex::EBFArrayBoxFactory& ebfact,
378 amrex::Array4<amrex::Real const> const& values_on_eb_inflow,
379#endif
380 bool godunov_use_ppm, bool godunov_use_forces_in_trans,
381 bool is_velocity, bool fluxes_are_area_weighted,
382 std::string const& advection_type,
383 int limiter_type = PPM::default_limiter,
384 bool allow_inflow_on_outflow = false,
385 amrex::Array4<int const> const& bc_arr = {});
386
387#if defined(AMREX_USE_EB) && !defined(HYDRO_NO_EB)
388/**
389 * \brief Extrapolate the velocity to faces, for use as the pre-MAC velocity.
390 *
391 * \note Ghost-cell requirements: vel needs 3 filled ghost cells, or 4 for
392 * 3D EBGodunov; vel_forces needs 1; and velocity_on_eb_inflow, when given,
393 * needs 2.
394 *
395 * \note advection_type must be one of "Godunov", "MOL" or "BDS", matching
396 * ComputeFluxesOnBoxFromState. BDS extrapolates the velocity to faces with
397 * Godunov PLM, so "BDS" here ignores godunov_ppm, and is not available with EB.
398 *
399 * \note This convenience overload takes neither velocity_on_eb_inflow nor BC_MF.
400 * Use the general overload below if you need either of them.
401 */
402void
404 amrex::MultiFab const& vel_forces,
406 amrex::MultiFab& v_mac,
407 amrex::MultiFab& w_mac),
408 amrex::Vector<amrex::BCRec> const& h_bcrec,
409 amrex::BCRec const* d_bcrec,
410 const amrex::Geometry& geom,
411 amrex::Real dt,
412 const amrex::EBFArrayBoxFactory& ebfact,
413 bool godunov_ppm, bool godunov_use_forces_in_trans,
414 std::string const& advection_type,
415 int limiter_type = PPM::default_limiter,
416 bool allow_inflow_on_outflow = false);
417#endif
418
419/**
420 * \brief Extrapolate the velocity to faces, for use as the pre-MAC velocity.
421 *
422 * \note Ghost-cell requirements: vel needs 3 filled ghost cells, or 4 for
423 * 3D EBGodunov; vel_forces needs 1; and velocity_on_eb_inflow, when given,
424 * needs 2.
425 *
426 * \note advection_type must be one of "Godunov", "MOL" or "BDS", matching
427 * ComputeFluxesOnBoxFromState. BDS extrapolates the velocity to faces with
428 * Godunov PLM, so "BDS" here ignores godunov_ppm, and is not available with EB.
429 *
430 * \note BC_MF, the position-dependent boundary conditions, is only supported with
431 * (EB)Godunov; passing it with "MOL" or "BDS" aborts, because those kernels
432 * would silently use h_bcrec/d_bcrec instead.
433 */
434void
436 amrex::MultiFab const& vel_forces,
438 amrex::MultiFab& v_mac,
439 amrex::MultiFab& w_mac),
440 amrex::Vector<amrex::BCRec> const& h_bcrec,
441 amrex::BCRec const* d_bcrec,
442 const amrex::Geometry& geom,
443 amrex::Real dt,
444#if defined(AMREX_USE_EB) && !defined(HYDRO_NO_EB)
445 const amrex::EBFArrayBoxFactory& ebfact,
446 amrex::MultiFab const* velocity_on_eb_inflow,
447#endif
448 bool godunov_ppm, bool godunov_use_forces_in_trans,
449 std::string const& advection_type,
450 int limiter_type = PPM::default_limiter,
451 bool allow_inflow_on_outflow = false,
452 amrex::iMultiFab* BC_MF = nullptr);
453
454/**
455 * \brief If convective, compute convTerm = u dot grad q = div (u q) - q div(u).
456 *
457 */
458void
459ComputeConvectiveTerm ( amrex::Box const& bx, int num_comp, amrex::MFIter& mfi,
462 amrex::Array4<amrex::Real const> const& q_on_face_y,
463 amrex::Array4<amrex::Real const> const& q_on_face_z),
465 amrex::Array4<amrex::Real> const& convTerm,
466 int const* iconserv,
467#if defined(AMREX_USE_EB) && !defined(HYDRO_NO_EB)
468 const amrex::EBFArrayBoxFactory& ebfact,
469#endif
470 std::string const& advection_type);
471
472/**
473 * \brief Compute Fluxes.
474 *
475 * \param[in] iconserv Array of length ncomp giving, per component:
476 * 1 conservative,
477 * 0 convective,
478 * -1 the face array already holds the final flux.
479 * For -1 the face value is copied to the flux unchanged: no
480 * velocity, no face area, no RZ \f$2\pi r\f$ and, in the EB
481 * version, no aperture factor is applied. A caller that uses -1
482 * together with fluxes_are_area_weighted must therefore supply a
483 * face array that is already weighted by all of those factors.
484 * -1 is only meaningful with knownFaceState = true; with
485 * knownFaceState = false the edge-state kernels treat -1 as
486 * conservative and write a predicted state into the face array,
487 * which is then copied out as the flux with no velocity factor.
488 */
489void ComputeFluxes ( amrex::Box const& bx,
499 amrex::Geometry const& geom, int ncomp,
500 bool fluxes_are_area_weighted,
501 int const* iconserv);
502
503/**
504 * \brief Compute divergence.
505 *
506 */
507
513 int ncomp, amrex::Geometry const& geom,
514 amrex::Real mult,
515 bool fluxes_are_area_weighted);
516
517#if defined(AMREX_USE_EB) && !defined(HYDRO_NO_EB)
518
519/**
520 * \brief Compute Fluxes in the presence of EB.
521 *
522 * \param[in] iconserv Array of length ncomp giving, per component:
523 * 1 conservative,
524 * 0 convective,
525 * -1 the face array already holds the final flux.
526 * For -1 the face value is copied to the flux unchanged: no
527 * velocity, no face area, no RZ \f$2\pi r\f$ and, in the EB
528 * version, no aperture factor is applied. A caller that uses -1
529 * together with fluxes_are_area_weighted must therefore supply a
530 * face array that is already weighted by all of those factors.
531 * -1 is only meaningful with knownFaceState = true; with
532 * knownFaceState = false the edge-state kernels treat -1 as
533 * conservative and write a predicted state into the face array,
534 * which is then copied out as the flux with no velocity factor.
535 *
536 * \note EB advection requires Cartesian geometry; the routine asserts on this.
537 */
551 amrex::Geometry const& geom, int ncomp,
553 bool fluxes_are_area_weighted,
554 int const* iconserv);
555
556
563 int ncomp, amrex::Geometry const& geom,
564 amrex::Real mult,
565 bool fluxes_are_area_weighted);
566
567
574 int ncomp, amrex::Geometry const& geom,
575 amrex::Real mult,
576 bool fluxes_are_area_weighted,
577 amrex::Array4<amrex::Real const> const& eb_velocity,
578 amrex::Array4<amrex::Real const> const& values_on_eb_inflow,
582#endif
583}
584
585#endif
586/** @}*/
#define AMREX_D_DECL(a, b, c)
void enforceInOutSolvability(const Vector< Array< MultiFab *, AMREX_SPACEDIM > > &vels_vec, const BCRec *bc_type, const Vector< Geometry > &geom, bool include_bndry_corners)
Enforces solvablity by scaling outflow to match with inflow.
Definition hydro_enforce_inout_solvability.cpp:340
amrex_real Real
std::array< T, N > Array
Definition hydro_enforce_inout_solvability.cpp:9
void ComputeDivergence(amrex::Box const &bx, amrex::Array4< amrex::Real > const &div, AMREX_D_DECL(amrex::Array4< amrex::Real const > const &fx, amrex::Array4< amrex::Real const > const &fy, amrex::Array4< amrex::Real const > const &fz), int ncomp, amrex::Geometry const &geom, amrex::Real mult, bool fluxes_are_area_weighted)
Compute divergence.
void ComputeConvectiveTerm(amrex::Box const &bx, int num_comp, amrex::MFIter &mfi, amrex::Array4< amrex::Real const > const &q, AMREX_D_DECL(amrex::Array4< amrex::Real const > const &q_on_face_x, amrex::Array4< amrex::Real const > const &q_on_face_y, amrex::Array4< amrex::Real const > const &q_on_face_z), amrex::Array4< amrex::Real const > const &divu, amrex::Array4< amrex::Real > const &convTerm, int const *iconserv, const amrex::EBFArrayBoxFactory &ebfact, std::string const &advection_type)
If convective, compute convTerm = u dot grad q = div (u q) - q div(u).
void ComputeFluxesOnBoxFromState(amrex::Box const &bx, int ncomp, amrex::MFIter &mfi, amrex::Array4< amrex::Real const > const &q, amrex::Array4< amrex::Real const > const &qnph, AMREX_D_DECL(amrex::Array4< amrex::Real > const &flux_x, amrex::Array4< amrex::Real > const &flux_y, amrex::Array4< amrex::Real > const &flux_z), AMREX_D_DECL(amrex::Array4< amrex::Real > const &face_x, amrex::Array4< amrex::Real > const &face_y, amrex::Array4< amrex::Real > const &face_z), bool knownFaceState, AMREX_D_DECL(amrex::Array4< amrex::Real const > const &u_mac, amrex::Array4< amrex::Real const > const &v_mac, amrex::Array4< amrex::Real const > const &w_mac), AMREX_D_DECL(amrex::Array4< amrex::Real const > const &u_flux, amrex::Array4< amrex::Real const > const &v_flux, amrex::Array4< amrex::Real const > const &w_flux), amrex::Array4< amrex::Real const > const &divu, amrex::Array4< amrex::Real const > const &fq, amrex::Geometry geom, amrex::Real l_dt, amrex::Vector< amrex::BCRec > const &h_bcrec, const amrex::BCRec *d_bcrec, int const *iconserv, const amrex::EBFArrayBoxFactory &ebfact, amrex::Array4< amrex::Real const > const &values_on_eb_inflow, bool godunov_use_ppm, bool godunov_use_forces_in_trans, bool is_velocity, bool fluxes_are_area_weighted, std::string const &advection_type, int limiter_type=PPM::default_limiter, bool allow_inflow_on_outflow=false, amrex::Array4< int const > const &bc_arr={})
Compute edge state and flux. Most general version for use with multilevel synchronization....
void ExtrapVelToFaces(amrex::MultiFab const &vel, amrex::MultiFab const &vel_forces, AMREX_D_DECL(amrex::MultiFab &u_mac, amrex::MultiFab &v_mac, amrex::MultiFab &w_mac), amrex::Vector< amrex::BCRec > const &h_bcrec, amrex::BCRec const *d_bcrec, const amrex::Geometry &geom, amrex::Real dt, const amrex::EBFArrayBoxFactory &ebfact, bool godunov_ppm, bool godunov_use_forces_in_trans, std::string const &advection_type, int limiter_type=PPM::default_limiter, bool allow_inflow_on_outflow=false)
Extrapolate the velocity to faces, for use as the pre-MAC velocity.
void ComputeFluxes(amrex::Box const &bx, AMREX_D_DECL(amrex::Array4< amrex::Real > const &fx, amrex::Array4< amrex::Real > const &fy, amrex::Array4< amrex::Real > const &fz), AMREX_D_DECL(amrex::Array4< amrex::Real const > const &umac, amrex::Array4< amrex::Real const > const &vmac, amrex::Array4< amrex::Real const > const &wmac), AMREX_D_DECL(amrex::Array4< amrex::Real const > const &xed, amrex::Array4< amrex::Real const > const &yed, amrex::Array4< amrex::Real const > const &zed), amrex::Geometry const &geom, int ncomp, bool fluxes_are_area_weighted, int const *iconserv)
Compute Fluxes.
void EB_ComputeFluxes(amrex::Box const &bx, AMREX_D_DECL(amrex::Array4< amrex::Real > const &fx, amrex::Array4< amrex::Real > const &fy, amrex::Array4< amrex::Real > const &fz), AMREX_D_DECL(amrex::Array4< amrex::Real const > const &umac, amrex::Array4< amrex::Real const > const &vmac, amrex::Array4< amrex::Real const > const &wmac), AMREX_D_DECL(amrex::Array4< amrex::Real const > const &xedge, amrex::Array4< amrex::Real const > const &yedge, amrex::Array4< amrex::Real const > const &zedge), AMREX_D_DECL(amrex::Array4< amrex::Real const > const &apx, amrex::Array4< amrex::Real const > const &apy, amrex::Array4< amrex::Real const > const &apz), amrex::Geometry const &geom, int ncomp, amrex::Array4< amrex::EBCellFlag const > const &flag, bool fluxes_are_area_weighted, int const *iconserv)
Compute Fluxes in the presence of EB.
void EB_ComputeDivergence(amrex::Box const &bx, amrex::Array4< amrex::Real > const &div, AMREX_D_DECL(amrex::Array4< amrex::Real const > const &fx, amrex::Array4< amrex::Real const > const &fy, amrex::Array4< amrex::Real const > const &fz), amrex::Array4< amrex::Real const > const &vfrac, int ncomp, amrex::Geometry const &geom, amrex::Real mult, bool fluxes_are_area_weighted)
static constexpr int default_limiter
Definition hydro_godunov_ppm.H:87