Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions Source/MacProj.H
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,6 @@ public:
int do_mom_diff,
bool update_fluxreg = true);

void mac_sync_compute (int level,
amrex::Array<amrex::MultiFab*,AMREX_SPACEDIM>& Ucorr,
amrex::MultiFab& Sync,
int comp,
int Sync_indx,
amrex::MultiFab* const* edgestate,
int edge_comp,
amrex::Real dt,
bool update_fluxreg = true);

static void mlmg_mac_solve (amrex::Amr* parent, const amrex::MultiFab* cphi,
const amrex::BCRec& phys_bc,
const amrex::BCRec& density_math_bc,
Expand Down
63 changes: 0 additions & 63 deletions Source/MacProj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,69 +697,6 @@ MacProj::mac_sync_compute (int level,
}
}

//
// This routine does a sync advect step for a single
// scalar component. Unlike the preceding routine, the
// half-time edge states are passed in from the calling routine.
// This routine is useful when the edge states are computed
// in a physics-class-specific manner. (For example, as they are
// in the calculation of div rho U h = div U sum_l (rho Y)_l h_l(T)).
//
void
MacProj::mac_sync_compute (int level,
Array<MultiFab*,AMREX_SPACEDIM>& Ucorr,
MultiFab& Sync,
int state_comp, // index in AmrLevel.state
int Sync_indx,
MultiFab* const* edgestate,
int edge_comp,
Real dt,
bool update_fluxreg)
{
const DistributionMapping& dmap = LevelData[level]->DistributionMap();
NavierStokesBase& ns_level = *(NavierStokesBase*) &(parent->getLevel(level));

int ncomp = 1;

// Put edgestate in desired container
Array<MultiFab,AMREX_SPACEDIM> edges{
AMREX_D_DECL(MultiFab(*edgestate[0], amrex::make_alias, edge_comp, ncomp),
MultiFab(*edgestate[1], amrex::make_alias, edge_comp, ncomp),
MultiFab(*edgestate[2], amrex::make_alias, edge_comp, ncomp) ) };

Array<MultiFab, AMREX_SPACEDIM> fluxes;
for (int i = 0; i < AMREX_SPACEDIM; i++)
{
const BoxArray& ba = LevelData[level]->getEdgeBoxArray(i);
fluxes[i].define(ba, dmap, ncomp, edgestate[0]->nGrow(), MFInfo(),ns_level.Factory());
}

bool do_crse_add = false;
bool do_fine_add = update_fluxreg;

//
// ComputeAofs always builds an Array4 from the state MultiFab, even though
// it does not use the values when the edge states are known. So it must be
// handed a defined MultiFab; an alias of Sync has the right BoxArray and
// DistributionMap.
//
MultiFab Smf(Sync, amrex::make_alias, Sync_indx, ncomp);

//
// Compute the mac sync correction.
//
ns_level.ComputeAofs(Sync, /*Ssync_comp*/ Sync_indx, state_comp,
ncomp,
/*State*/ Smf, /*S_comp*/ 0, //not used when known_edgestates
/*forcing*/ nullptr, /*f_comp*/ int(), //not used when known_edgestates
/*constraint divU*/ nullptr, //not used when known_edgestates
fluxes, /*flux_comp*/ 0,
edges, 0, /*known_edgestate*/ true,
/*is_velocity*/ false, dt,
/*is_sync*/ true, Ucorr,
do_crse_add, do_fine_add);
}

//
// Check the mac divergence.
//
Expand Down
10 changes: 1 addition & 9 deletions Source/OutFlowBC.H
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,12 @@
#include <AMReX_BCRec.H>

//
// The baseclass for MacOutFlowBC and ProjOutFlowBC.
// Queries on the outflow faces of the domain.
//

class OutFlowBC
{
public:
static amrex::Box SemiGrow (const amrex::Box& baseBox,
int nGrow,
int direction);

static amrex::Box SemiCoarsen (const amrex::Box& baseBox,
int ref_factor,
int direction);

static void GetOutFlowFaces (bool& haveOutFlow,
amrex::Orientation* outFaces,
amrex::BCRec* _phys_bc,
Expand Down
20 changes: 0 additions & 20 deletions Source/OutFlowBC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,6 @@

using namespace amrex;

Box
OutFlowBC::SemiGrow (const Box& baseBox,
int nGrow,
int direction)
{
IntVect grow_factor(AMREX_D_DECL(nGrow,nGrow,nGrow));
grow_factor[direction] = 0;
return amrex::grow(baseBox,grow_factor);
}

Box
OutFlowBC::SemiCoarsen (const Box& baseBox,
int ref_factor,
int direction)
{
IntVect ref_ratio(AMREX_D_DECL(ref_factor,ref_factor,ref_factor));
ref_ratio[direction] = 1;
return amrex::coarsen(baseBox,ref_ratio);
}

void
OutFlowBC::GetOutFlowFaces (bool& haveOutFlow,
Orientation* outFaces,
Expand Down
Loading