Skip to content

Commit

Permalink
more pp fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalsbyx committed Nov 17, 2024
1 parent 9a016f1 commit b4e7492
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/variableAttributeLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ struct variableAttributes
bool need_value_nucleation = false;
bool nucleating_variable = false;
bool is_pp = false;
bool output_integral = false;
bool is_nonlinear = false;
bool calc_integral = false;
bool output_integral = false;

std::set<std::string> dependencies_value_RHS;
std::set<std::string> dependencies_gradient_RHS;
Expand Down
18 changes: 18 additions & 0 deletions src/variableAttributeLoader/variableAttributeLoader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,23 @@ variableAttributes::parse_residual_dependencies()
{&dependencies_value_LHS, &dependencies_gradient_LHS}}}}
};

if (is_pp)
{
EvalFlags &residual_flags = eval_flags_residual_postprocess;
std::set<std::string> &value_dependency_set = dependencies_value_PP;
std::set<std::string> &gradient_dependency_set = dependencies_gradient_PP;

if (!value_dependency_set.empty())
{
residual_flags |= dealii::EvaluationFlags::values;
}
if (!gradient_dependency_set.empty())
{
residual_flags |= dealii::EvaluationFlags::gradients;
}
return;
}

for (const std::pair<EvalFlags *,
std::pair<std::set<std::string> *, std::set<std::string> *>>
&eval_dep_pair : dependencies_for.at(eq_type))
Expand Down Expand Up @@ -222,6 +239,7 @@ void
variableAttributeLoader::set_output_integral(const unsigned int &index, const bool &flag)
{
(*relevant_attributes)[index].output_integral = flag;
(*relevant_attributes)[index].calc_integral = flag;
}

void
Expand Down

0 comments on commit b4e7492

Please sign in to comment.