Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor bug fix to add scope for geometry #152

Merged
merged 1 commit into from
Mar 26, 2024
Merged
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
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
Loading