-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
put in basic data structures / operations for cc-projection as altern… (
#134) …ative to nodal projection
- Loading branch information
Showing
18 changed files
with
775 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ target_sources(incflo | |
incflo_fillpatch.cpp | ||
incflo_fillphysbc.cpp | ||
incflo_set_bcs.cpp | ||
incflo_set_velocity_bcs.cpp | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#ifdef AMREX_USE_EB | ||
#include <AMReX_EBMultiFabUtil.H> | ||
#endif | ||
|
||
#include <incflo.H> | ||
|
||
using namespace amrex; | ||
|
||
void | ||
incflo::set_inflow_velocity (int lev, amrex::Real time, MultiFab& vel, int nghost) | ||
{ | ||
Geometry const& gm = Geom(lev); | ||
Box const& domain = gm.growPeriodicDomain(nghost); | ||
for (int dir = 0; dir < AMREX_SPACEDIM; ++dir) { | ||
Orientation olo(dir,Orientation::low); | ||
Orientation ohi(dir,Orientation::high); | ||
if (m_bc_type[olo] == BC::mass_inflow || m_bc_type[ohi] == BC::mass_inflow) { | ||
Box dlo = (m_bc_type[olo] == BC::mass_inflow) ? amrex::adjCellLo(domain,dir,nghost) : Box(); | ||
Box dhi = (m_bc_type[ohi] == BC::mass_inflow) ? amrex::adjCellHi(domain,dir,nghost) : Box(); | ||
#ifdef _OPENMP | ||
#pragma omp parallel if (Gpu::notInLaunchRegion()) | ||
#endif | ||
for (MFIter mfi(vel); mfi.isValid(); ++mfi) { | ||
Box const& gbx = amrex::grow(mfi.validbox(),nghost); | ||
Box blo = gbx & dlo; | ||
Box bhi = gbx & dhi; | ||
Array4<Real> const& v = vel[mfi].array(); | ||
int gid = mfi.index(); | ||
if (blo.ok()) { | ||
prob_set_inflow_velocity(gid, olo, blo, v, lev, time); | ||
} | ||
if (bhi.ok()) { | ||
prob_set_inflow_velocity(gid, ohi, bhi, v, lev, time); | ||
} | ||
} | ||
} | ||
} | ||
vel.EnforcePeriodicity(gm.periodicity()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.