Skip to content

Commit

Permalink
Merge pull request CEED#1561 from CEED/jeremy/get-sate
Browse files Browse the repository at this point in the history
fluids - use VecGetState
  • Loading branch information
jeremylt authored Apr 22, 2024
2 parents 4f7cdd8 + 6c17b3a commit 860c7e8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions examples/fluids/src/differential_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "../qfunctions//differential_filter.h"

#include <petscdmplex.h>
#include <petsc/private/petscimpl.h>

#include "../navierstokes.h"

Expand Down Expand Up @@ -286,10 +285,10 @@ PetscErrorCode DifferentialFilterApply(User user, const PetscReal solution_time,
PetscCall(PetscLogEventBegin(FLUIDS_DifferentialFilter, Q, Filtered_Solution, 0, 0));
PetscCall(DMGetNamedGlobalVector(diff_filter->dm_filter, "RHS", &RHS));
PetscCall(UpdateBoundaryValues(user, diff_filter->op_rhs_ctx->X_loc, solution_time));
PetscCall(PetscObjectStateGet((PetscObject)diff_filter->op_rhs_ctx->X_loc, &X_loc_state));
PetscCall(VecGetState(diff_filter->op_rhs_ctx->X_loc, &X_loc_state));
if (X_loc_state != diff_filter->X_loc_state) {
PetscCall(ApplyCeedOperatorGlobalToGlobal(Q, RHS, diff_filter->op_rhs_ctx));
PetscCall(PetscObjectStateGet((PetscObject)diff_filter->op_rhs_ctx->X_loc, &X_loc_state));
PetscCall(VecGetState(diff_filter->op_rhs_ctx->X_loc, &X_loc_state));
diff_filter->X_loc_state = X_loc_state;
}
PetscCall(VecViewFromOptions(RHS, NULL, "-diff_filter_rhs_view"));
Expand Down

0 comments on commit 860c7e8

Please sign in to comment.