Block-Structured AMR Software Framework
AMReX_EBMultiFabUtil.H
Go to the documentation of this file.
1 #ifndef AMREX_EBMULTIFABUTIL_H_
2 #define AMREX_EBMULTIFABUTIL_H_
3 #include <AMReX_Config.H>
4 
5 #include <AMReX_MultiFab.H>
6 #include <AMReX_Array.H>
7 #include <AMReX_Vector.H>
8 #include <AMReX_BCRec.H>
9 
10 namespace amrex
11 {
12  void EB_set_covered (MultiFab& mf, Real val);
13  void EB_set_covered (MultiFab& mf, int icomp, int ncomp, int ngrow, Real val);
14  void EB_set_covered (MultiFab& mf, int icomp, int ncomp, const Vector<Real>& vals);
15  void EB_set_covered (MultiFab& mf, int icomp, int ncomp, int ngrow, const Vector<Real>& vals);
16 
17  void EB_set_covered_faces (const Array<MultiFab*,AMREX_SPACEDIM>& umac, Real val);
18  void EB_set_covered_faces (const Array<MultiFab*,AMREX_SPACEDIM>& umac, int scomp, int ncomp, const Vector<Real>& vals);
19 
20  void EB_average_down (const MultiFab& S_fine, MultiFab& S_crse, const MultiFab& vol_fine,
21  const MultiFab& vfrac_fine, int scomp, int ncomp, const IntVect& ratio);
22 
23  void EB_average_down (const MultiFab& S_fine, MultiFab& S_crse, int scomp, int ncomp,
24  int ratio);
25  void EB_average_down (const MultiFab& S_fine, MultiFab& S_crse, int scomp, int ncomp,
26  const IntVect& ratio);
27 
28  void EB_average_down_faces (const Array<const MultiFab*,AMREX_SPACEDIM>& fine,
29  const Array< MultiFab*,AMREX_SPACEDIM>& crse,
30  int ratio, int ngcrse);
31  void EB_average_down_faces (const Array<const MultiFab*,AMREX_SPACEDIM>& fine,
32  const Array< MultiFab*,AMREX_SPACEDIM>& crse,
33  const IntVect& ratio, int ngcrse);
34 
35  // This version takes periodicity into account.
36  void EB_average_down_faces (const Array<const MultiFab*,AMREX_SPACEDIM>& fine,
37  const Array< MultiFab*,AMREX_SPACEDIM>& crse,
38  const IntVect& ratio, const Geometry& crse_geom);
39 
40  void EB_average_down_boundaries (const MultiFab& fine, MultiFab& crse,
41  int ratio, int ngcrse);
42  void EB_average_down_boundaries (const MultiFab& fine, MultiFab& crse,
43  const IntVect& ratio, int ngcrse);
44 
45  void EB_computeDivergence (MultiFab& divu, const Array<MultiFab const*,AMREX_SPACEDIM>& umac,
46  const Geometry& geom, bool already_on_centroids);
47 
48  void EB_computeDivergence (MultiFab& divu, const Array<MultiFab const*,AMREX_SPACEDIM>& umac,
49  const Geometry& geom, bool already_on_centroids,
50  const MultiFab& vel_eb);
51 
52  // Cell faces to cell centers
53  void EB_average_face_to_cellcenter (MultiFab& ccmf, int dcomp,
54  const Array<MultiFab const*,AMREX_SPACEDIM>& fmf);
55 
56  // Cell centers to cell centroids
57  void EB_interp_CC_to_Centroid (MultiFab& cent, const MultiFab& cc, int scomp, int dcomp, int ncomp, const Geometry& geom);
58 
59  // Cell centers to face centroids
60  void EB_interp_CC_to_FaceCentroid (const MultiFab& cc,
61  AMREX_D_DECL( MultiFab& fc_x,
62  MultiFab& fc_y,
63  MultiFab& fc_z),
64  int scomp, int dcomp, int nc,
65  const Geometry& geom,
66  const amrex::Vector<amrex::BCRec>& a_bcs);
67 
68  // Cell centroids to face centroids
69  void EB_interp_CellCentroid_to_FaceCentroid (const MultiFab& phi_centroid,
70  const Array<MultiFab *,AMREX_SPACEDIM>& phi_faces,
71  int scomp, int dcomp, int nc,
72  const Geometry& geom,
73  const amrex::Vector<amrex::BCRec>& a_bcs);
74 
75  // Cell centroids to face centroids
76  void EB_interp_CellCentroid_to_FaceCentroid (const MultiFab& phi_centroid,
77  const Vector<MultiFab*>& phi_faces,
78  int scomp, int dcomp, int nc,
79  const Geometry& geom,
80  const amrex::Vector<amrex::BCRec>& a_bcs);
81 
82  // Cell centroids to face centroids
83  void EB_interp_CellCentroid_to_FaceCentroid (const MultiFab& phi_centroid,
84  AMREX_D_DECL( MultiFab& phi_xface,
85  MultiFab& phi_yface,
86  MultiFab& phi_zface),
87  int scomp, int dcomp, int nc,
88  const Geometry& geom,
89  const amrex::Vector<amrex::BCRec>& a_bcs);
90 }
91 
92 #endif
Array4< Real > fine
Definition: AMReX_InterpFaceRegister.cpp:90
Array4< Real const > crse
Definition: AMReX_InterpFaceRegister.cpp:92
#define AMREX_D_DECL(a, b, c)
Definition: AMReX_SPACE.H:104
Definition: AMReX_Amr.cpp:49
void EB_set_covered_faces(const Array< MultiFab *, AMREX_SPACEDIM > &umac, Real val)
Definition: AMReX_EBMultiFabUtil.cpp:109
void EB_interp_CellCentroid_to_FaceCentroid(const MultiFab &phi_centroid, const Array< MultiFab *, AMREX_SPACEDIM > &phi_faces, int scomp, int dcomp, int nc, const Geometry &geom, const amrex::Vector< amrex::BCRec > &a_bcs)
Definition: AMReX_EBMultiFabUtil.cpp:1024
void EB_average_face_to_cellcenter(MultiFab &ccmf, int dcomp, const Array< MultiFab const *, AMREX_SPACEDIM > &fmf)
Definition: AMReX_EBMultiFabUtil.cpp:806
void EB_set_covered(MultiFab &mf, Real val)
Definition: AMReX_EBMultiFabUtil.cpp:21
void EB_average_down_faces(const Array< const MultiFab *, AMREX_SPACEDIM > &fine, const Array< MultiFab *, AMREX_SPACEDIM > &crse, int ratio, int ngcrse)
Definition: AMReX_EBMultiFabUtil.cpp:500
void EB_average_down(const MultiFab &S_fine, MultiFab &S_crse, const MultiFab &vol_fine, const MultiFab &vfrac_fine, int scomp, int ncomp, const IntVect &ratio)
Definition: AMReX_EBMultiFabUtil.cpp:336
IntVectND< AMREX_SPACEDIM > IntVect
Definition: AMReX_BaseFwd.H:30
void EB_computeDivergence(MultiFab &divu, const Array< MultiFab const *, AMREX_SPACEDIM > &umac, const Geometry &geom, bool already_on_centroids)
Definition: AMReX_EBMultiFabUtil.cpp:681
void EB_interp_CC_to_Centroid(MultiFab &cent, const MultiFab &cc, int scomp, int dcomp, int ncomp, const Geometry &geom)
Definition: AMReX_EBMultiFabUtil.cpp:861
void EB_interp_CC_to_FaceCentroid(const MultiFab &cc, AMREX_D_DECL(MultiFab &fc_x, MultiFab &fc_y, MultiFab &fc_z), int scomp, int dcomp, int ncomp, const Geometry &a_geom, const Vector< BCRec > &a_bcs)
Definition: AMReX_EBMultiFabUtil.cpp:911
void EB_average_down_boundaries(const MultiFab &fine, MultiFab &crse, int ratio, int ngcrse)
Definition: AMReX_EBMultiFabUtil.cpp:619