Chombo + EB + MF  3.2
EdgeToCell.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 // EdgeToCell.H
12 // Dan Martin, Fri, Jan 14, 2000
13 
14 #ifndef _EDGETOCELL_H_
15 #define _EDGETOCELL_H_
16 
17 #include "LevelData.H"
18 #include "FArrayBox.H"
19 #include "FluxBox.H"
20 #include "ProtoInterface.H"
21 
22 #include "NamespaceHeader.H"
23 
24 /// averages cell-centered cellData to edge-centered edgeData
25 void EdgeToCell(const LevelData<FluxBox>& a_edgeData,
26  LevelData<FArrayBox>& a_cellData);
27 
28 /// averages cellData->edgeData (all directions) for one FAB
29 /** averages cell-centered cellData to SpaceDim-dimensioned
30  EdgeData -- assumes all boundary conditions already set.
31  Does this for all grids. */
32 void EdgeToCell(const FluxBox& a_edgeData,
33  FArrayBox& a_cellData);
34 
35 /// averages cellData->edgeData in 1 direction, for one component in a FAB
36 void EdgeToCell(const FluxBox& a_edgeData, const int a_edgeComp,
37  FArrayBox& a_cellData, const int a_cellComp,
38  const int a_dir);
39 
40 /// averages cellData->edgeData in 1 direction, for one component in a FAB, on a given cell box
41 void EdgeToCell(const FluxBox& a_edgeData, const int a_edgeComp,
42  FArrayBox& a_cellData, const int a_cellComp,
43  const Box& a_cellBox, const int a_dir);
44 
45 // max functions
46 /// cell-centered cellData from edge-centered edgeData using max
47 /** instead of averaging faces to cells, this function puts the max of
48  the two opposing face-centered values into each cell.
49 */
50 void EdgeToCellMax(const LevelData<FluxBox>& a_edgeData,
51  LevelData<FArrayBox>& a_cellData);
52 
53 /// edgeData->cellData using max (all directions) for one FAB
54 /** fills cell-centered cellData from EdgeData using max
55  -- assumes all boundary conditions already set.
56  Does this for all grids. */
57 void EdgeToCellMax(const FluxBox& a_edgeData,
58  FArrayBox& a_cellData);
59 
60 /// fills cellData using edgeData in 1 direction using max, for one component in a FAB
61 void EdgeToCellMax(const FluxBox& a_edgeData, const int a_edgeComp,
62  FArrayBox& a_cellData, const int a_cellComp,
63  const int a_dir);
64 
65 /// fills cellData->edgeData in 1 direction, for one component in a FAB, on a given cell box using max
66 void EdgeToCellMax(const FluxBox& a_edgeData, const int a_edgeComp,
67  FArrayBox& a_cellData, const int a_cellComp,
68  const Box& a_cellBox, const int a_dir);
69 
70 #ifdef USE_PROTO
71 //proto replacements for fortran routines
72 void
73 ProtoEdgeToCellPatch(BaseFab<Real> & a_cellData,
74  const int & a_cellComp,
75  const BaseFab<Real>& a_edgeData,
76  const int & a_edgeComp,
77  const Box & a_cellBox,
78  const int & a_idir);
79 void
80 ProtoEdgeToCellPatchMax(BaseFab<Real> & a_cellData,
81  const int & a_cellComp,
82  const BaseFab<Real>& a_edgeData,
83  const int & a_edgeComp,
84  const Box & a_cellBox,
85  const int & a_idir);
86 #endif
87 
88 #include "NamespaceFooter.H"
89 
90 #endif
void EdgeToCell(const LevelData< FluxBox > &a_edgeData, LevelData< FArrayBox > &a_cellData)
averages cell-centered cellData to edge-centered edgeData
void EdgeToCellMax(const LevelData< FluxBox > &a_edgeData, LevelData< FArrayBox > &a_cellData)
cell-centered cellData from edge-centered edgeData using max
A FArrayBox-like container for face-centered fluxes.
Definition: FluxBox.H:22
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
Definition: FArrayBox.H:45