Skip to content

Commit

Permalink
Adding set_default_fillpatch_bc() for intermittency, and AMREX_ALWAYS…
Browse files Browse the repository at this point in the history
…_ASSERT() for num_ghost and fld.num_grow() in TiogaInterface::register_solution()
  • Loading branch information
itopcuoglu authored and Ilker Topcuoglu committed Sep 19, 2024
1 parent 74bd5ac commit 3b250e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions amr-wind/overset/TiogaInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ void TiogaInterface::register_solution(
auto& fld = repo.get_field(cvar);
const int ncomp = fld.num_comp();
fld.fillpatch(m_sim.time().new_time());
AMREX_ALWAYS_ASSERT(amrex::IntVect(num_ghost) == fld.num_grow());
field_ops::copy(*m_qcell, fld, 0, icomp, ncomp, num_ghost);
icomp += ncomp;
}
Expand Down
8 changes: 5 additions & 3 deletions amr-wind/physics/Intermittency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@
namespace amr_wind {

Intermittency::Intermittency(const CFDSim& sim)
: m_intermittency(sim.repo().declare_field("intermittency",1,0,1))
: m_intermittency(sim.repo().declare_field(
"intermittency", 1, sim.pde_manager().num_ghost_state()))
{
amrex::ParmParse pp("incflo");
pp.query("gamma_intermittency", m_gamma);
auto& gamma_int_fld = sim.repo().get_field("intermittency");
gamma_int_fld.set_default_fillpatch_bc(sim.time());
}

/** Initialize the intermittency field at the beginning of the
* simulation.
*/
void Intermittency::initialize_fields(
int level, const amrex::Geometry& geom)
void Intermittency::initialize_fields(int level, const amrex::Geometry& geom)
{
using namespace utils;

Expand Down

0 comments on commit 3b250e4

Please sign in to comment.