Skip to content

Commit

Permalink
Merge pull request #179 from AMReX-FHD/average_cleanup
Browse files Browse the repository at this point in the history
Average cleanup
  • Loading branch information
ajnonaka authored Jan 18, 2025
2 parents 0bd24f1 + 8fb83a6 commit 172cc77
Show file tree
Hide file tree
Showing 16 changed files with 93 additions and 150 deletions.
4 changes: 2 additions & 2 deletions exec/compressible_mui/sav_src/2020/m00.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ void main_driver(const char* argv)

if(project_dir >= 0){
prim.setVal(0.0);
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
BoxArray ba_flat = primVertAvg.boxArray();
const DistributionMapping& dmap_flat = primVertAvg.DistributionMap();
{
Expand Down Expand Up @@ -675,7 +675,7 @@ void main_driver(const char* argv)
structFactPrim.FortStructure(structFactPrimMF);
structFactCons.FortStructure(structFactConsMF);
if(project_dir >= 0) {
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
structFactPrimVerticalAverage.FortStructure(primVertAvg);
}
}
Expand Down
4 changes: 2 additions & 2 deletions exec/compressible_mui/sav_src/2020/m01-cutemp_jsq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ void main_driver(const char* argv)

if(project_dir >= 0){
prim.setVal(0.0);
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
BoxArray ba_flat = primVertAvg.boxArray();
const DistributionMapping& dmap_flat = primVertAvg.DistributionMap();
{
Expand Down Expand Up @@ -687,7 +687,7 @@ void main_driver(const char* argv)
structFactPrim.FortStructure(structFactPrimMF);
structFactCons.FortStructure(structFactConsMF);
if(project_dir >= 0) {
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
structFactPrimVerticalAverage.FortStructure(primVertAvg);
}
}
Expand Down
4 changes: 2 additions & 2 deletions exec/compressible_mui/sav_src/2020/m01.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ void main_driver(const char* argv)

if(project_dir >= 0){
prim.setVal(0.0);
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
BoxArray ba_flat = primVertAvg.boxArray();
const DistributionMapping& dmap_flat = primVertAvg.DistributionMap();
{
Expand Down Expand Up @@ -675,7 +675,7 @@ void main_driver(const char* argv)
structFactPrim.FortStructure(structFactPrimMF);
structFactCons.FortStructure(structFactConsMF);
if(project_dir >= 0) {
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
structFactPrimVerticalAverage.FortStructure(primVertAvg);
}
}
Expand Down
4 changes: 2 additions & 2 deletions exec/compressible_mui/sav_src/2020/m02.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ void main_driver(const char* argv)

if(project_dir >= 0){
prim.setVal(0.0);
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
BoxArray ba_flat = primVertAvg.boxArray();
const DistributionMapping& dmap_flat = primVertAvg.DistributionMap();
{
Expand Down Expand Up @@ -728,7 +728,7 @@ void main_driver(const char* argv)
structFactPrim.FortStructure(structFactPrimMF);
structFactCons.FortStructure(structFactConsMF);
if(project_dir >= 0) {
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
structFactPrimVerticalAverage.FortStructure(primVertAvg);
}
}
Expand Down
4 changes: 2 additions & 2 deletions exec/compressible_mui/sav_src/2020/m10.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ void main_driver(const char* argv)

if(project_dir >= 0){
prim.setVal(0.0);
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
BoxArray ba_flat = primVertAvg.boxArray();
const DistributionMapping& dmap_flat = primVertAvg.DistributionMap();
{
Expand Down Expand Up @@ -684,7 +684,7 @@ void main_driver(const char* argv)
structFactPrim.FortStructure(structFactPrimMF);
structFactCons.FortStructure(structFactConsMF);
if(project_dir >= 0) {
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
structFactPrimVerticalAverage.FortStructure(primVertAvg);
}
}
Expand Down
4 changes: 2 additions & 2 deletions exec/compressible_mui/sav_src/2020/m11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ void main_driver(const char* argv)

if(project_dir >= 0){
prim.setVal(0.0);
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
BoxArray ba_flat = primVertAvg.boxArray();
const DistributionMapping& dmap_flat = primVertAvg.DistributionMap();
{
Expand Down Expand Up @@ -688,7 +688,7 @@ void main_driver(const char* argv)
structFactPrim.FortStructure(structFactPrimMF);
structFactCons.FortStructure(structFactConsMF);
if(project_dir >= 0) {
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
structFactPrimVerticalAverage.FortStructure(primVertAvg);
}
}
Expand Down
4 changes: 2 additions & 2 deletions exec/compressible_mui/sav_src/2020/m12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ void main_driver(const char* argv)

if(project_dir >= 0){
prim.setVal(0.0);
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
BoxArray ba_flat = primVertAvg.boxArray();
const DistributionMapping& dmap_flat = primVertAvg.DistributionMap();
{
Expand Down Expand Up @@ -690,7 +690,7 @@ void main_driver(const char* argv)
structFactPrim.FortStructure(structFactPrimMF);
structFactCons.FortStructure(structFactConsMF);
if(project_dir >= 0) {
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
structFactPrimVerticalAverage.FortStructure(primVertAvg);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ void main_driver(const char* argv)

if(project_dir >= 0){
prim.setVal(0.0);
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
BoxArray ba_flat = primVertAvg.boxArray();
const DistributionMapping& dmap_flat = primVertAvg.DistributionMap();
{
Expand Down Expand Up @@ -703,7 +703,7 @@ void main_driver(const char* argv)
structFactPrim.FortStructure(structFactPrimMF);
structFactCons.FortStructure(structFactConsMF);
if(project_dir >= 0) {
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
structFactPrimVerticalAverage.FortStructure(primVertAvg);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ void main_driver(const char* argv)

if(project_dir >= 0){
prim.setVal(0.0);
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
BoxArray ba_flat = primVertAvg.boxArray();
const DistributionMapping& dmap_flat = primVertAvg.DistributionMap();
{
Expand Down Expand Up @@ -716,7 +716,7 @@ void main_driver(const char* argv)
structFactPrim.FortStructure(structFactPrimMF);
structFactCons.FortStructure(structFactConsMF);
if(project_dir >= 0) {
ComputeVerticalAverage(prim, primVertAvg, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primVertAvg, project_dir, 0, structVarsPrim);
structFactPrimVerticalAverage.FortStructure(primVertAvg);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,9 @@ void main_driver(const char* argv)
// a built version of primFlattened so can obtain what we need to build the
// structure factor and geometry objects for flattened data
if (slicepoint < 0) {
ComputeVerticalAverage(prim, primFlattened, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primFlattened, project_dir, 0, structVarsPrim);
} else {
ExtractSlice(prim, primFlattened, geom, project_dir, slicepoint, 0, structVarsPrim);
ExtractSlice(prim, primFlattened, project_dir, slicepoint, 0, structVarsPrim);
}
// we rotate this flattened MultiFab to have normal in the z-direction since
// SWFFT only presently supports flattened MultiFabs with z-normal.
Expand Down Expand Up @@ -857,9 +857,9 @@ void main_driver(const char* argv)
if(project_dir >= 0) {
MultiFab primFlattened; // flattened multifab defined below
if (slicepoint < 0) {
ComputeVerticalAverage(prim, primFlattened, geom, project_dir, 0, structVarsPrim);
ComputeVerticalAverage(prim, primFlattened, project_dir, 0, structVarsPrim);
} else {
ExtractSlice(prim, primFlattened, geom, project_dir, slicepoint, 0, structVarsPrim);
ExtractSlice(prim, primFlattened, project_dir, slicepoint, 0, structVarsPrim);
}
// we rotate this flattened MultiFab to have normal in the z-direction since
// SWFFT only presently supports flattened MultiFabs with z-normal.
Expand Down
12 changes: 6 additions & 6 deletions exec/hydro/main_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,9 @@ void main_driver(const char* argv)
// a built version of Flattened so can obtain what we need to build the
// structure factor and geometry objects for flattened data
if (slicepoint < 0) {
ComputeVerticalAverage(structFactMF, Flattened, geom, project_dir, 0, 1);
ComputeVerticalAverage(structFactMF, Flattened, project_dir, 0, 1);
} else {
ExtractSlice(structFactMF, Flattened, geom, project_dir, slicepoint, 0, 1);
ExtractSlice(structFactMF, Flattened, project_dir, slicepoint, 0, 1);
}
BoxArray ba_flat = Flattened.boxArray();
const DistributionMapping& dmap_flat = Flattened.DistributionMap();
Expand Down Expand Up @@ -432,9 +432,9 @@ void main_driver(const char* argv)
if(project_dir >= 0) {
MultiFab Flattened; // flattened multifab defined below
if (slicepoint < 0) {
ComputeVerticalAverage(structFactMF, Flattened, geom, project_dir, 0, structVars);
ComputeVerticalAverage(structFactMF, Flattened, project_dir, 0, structVars);
} else {
ExtractSlice(structFactMF, Flattened, geom, project_dir, slicepoint, 0, structVars);
ExtractSlice(structFactMF, Flattened, project_dir, slicepoint, 0, structVars);
}
structFactFlattened.FortStructure(Flattened);
}
Expand Down Expand Up @@ -526,9 +526,9 @@ void main_driver(const char* argv)
if(project_dir >= 0) {
MultiFab Flattened; // flattened multifab defined below
if (slicepoint < 0) {
ComputeVerticalAverage(structFactMF, Flattened, geom, project_dir, 0, structVars);
ComputeVerticalAverage(structFactMF, Flattened, project_dir, 0, structVars);
} else {
ExtractSlice(structFactMF, Flattened, geom, project_dir, slicepoint, 0, structVars);
ExtractSlice(structFactMF, Flattened, project_dir, slicepoint, 0, structVars);
}
structFactFlattened.FortStructure(Flattened);
}
Expand Down
Loading

0 comments on commit 172cc77

Please sign in to comment.