Skip to content

Commit

Permalink
adding bool to variabe_info for implict equations
Browse files Browse the repository at this point in the history
  • Loading branch information
landinjm committed Oct 21, 2024
1 parent 295b58a commit c0e28eb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
9 changes: 4 additions & 5 deletions include/model_variables.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Model Variables Class

#ifndef INCLUDE_MODELVARIABLE_H_
#define INCLUDE_MODELVARIABLE_H_

Expand Down Expand Up @@ -33,11 +31,12 @@ class modelResidual

struct variable_info
{
bool is_scalar;
unsigned int global_var_index;
dealii::EvaluationFlags::EvaluationFlags evaluation_flags;
dealii::EvaluationFlags::EvaluationFlags residual_flags;
bool var_needed;
bool var_needed = false;
bool is_scalar = true;
bool is_implicit = false;
};

#endif /* INCLUDE_MODELVARIABLE_H_ */
#endif
2 changes: 1 addition & 1 deletion src/matrixfree/solveIncrement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ MatrixFreePDE<dim, degree>::copy_solution_vectors(
for (unsigned int fieldIndex = 0; fieldIndex < fields.size(); fieldIndex++)
{
// Skip the copy if not tracking prior solutions for the variable index.
if (solutionSet_previous.find(fieldIndex) == solutionSet_previous.end())
if (!userInputs.varInfoListNonexplicitRHS[fieldIndex].is_implicit)
{
continue;
}
Expand Down
4 changes: 4 additions & 0 deletions src/userInputParameters/loadVariableAttributes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ userInputParameters<dim>::loadVariableAttributes(

varInfo.is_scalar = var_type[i] == SCALAR;

varInfo.is_implicit = var_eq_type[i] == IMPLICIT_TIME_DEPENDENT;

varInfoListNonexplicitRHS.push_back(varInfo);
}
// Load the old variable information for calculating the RHS for nonexplicit equations
Expand Down Expand Up @@ -156,6 +158,8 @@ userInputParameters<dim>::loadVariableAttributes(

varInfo.is_scalar = var_type[i] == SCALAR;

varInfo.is_implicit = var_eq_type[i] == IMPLICIT_TIME_DEPENDENT;

varInfoListLHS.push_back(varInfo);
}
// Load the change variable information for calculating the LHS for nonexplicit
Expand Down

0 comments on commit c0e28eb

Please sign in to comment.