Skip to content

Commit

Permalink
minor bug fix to add scope for geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
whannah1 committed Mar 26, 2024
1 parent 9d692dc commit 1e61c90
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions dynamics/spam/src/models/extrudedmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ class ModelTendencies : public ExtrudedTendencies {
FieldSet<nprognostic> &x) {
real max_w = params.max_w;

YAKL_SCOPE(primal_geometry, this->primal_geometry);

const auto &primal_topology = primal_geometry.topology;

const auto wvar = x.fields_arr[WVAR].data;
Expand All @@ -271,9 +273,12 @@ class ModelTendencies : public ExtrudedTendencies {

void adjust_crm_per_phys_using_vert_cfl(ModelParameters &params,
FieldSet<nprognostic> &x) {

// cfl = c * dt / dx
// dt = cfl * dx / c

YAKL_SCOPE(primal_geometry, this->primal_geometry);

const auto &primal_topology = primal_geometry.topology;
const auto wvar = x.fields_arr[WVAR].data;
const int pis = primal_topology.is;
Expand Down Expand Up @@ -302,11 +307,12 @@ class ModelTendencies : public ExtrudedTendencies {
params.crm_per_phys = (int)std::ceil(params.dt_crm_phys / adj_min_dt);
params.dtcrm = params.dt_crm_phys / params.crm_per_phys;

// std::cout << "min_dt: " << min_dt << "\n";
// std::cout << "adj_min_dt: " << adj_min_dt << "\n";
// std::cout << "dtcrm: " << params.dtcrm << "\n";
// std::cout << "dt_crm_phys: " << params.dt_crm_phys << "\n";
// std::cout << "crm per phys: " << params.crm_per_phys << "\n";
// std::cout << "adjust_crm_per_phys_using_vert_cfl: min_dt: " << min_dt << "\n";
// std::cout << "adjust_crm_per_phys_using_vert_cfl: adj_min_dt: " << adj_min_dt << "\n";
// std::cout << "adjust_crm_per_phys_using_vert_cfl: dtcrm: " << params.dtcrm << "\n";
// std::cout << "adjust_crm_per_phys_using_vert_cfl: dt_crm_phys: " << params.dt_crm_phys << "\n";
// std::cout << "adjust_crm_per_phys_using_vert_cfl: crm per phys: " << params.crm_per_phys << "\n";
// yakl::fence();
}

void convert_dynamics_to_coupler_state(PamCoupler &coupler,
Expand Down

0 comments on commit 1e61c90

Please sign in to comment.