Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/nurbs_nodal_interp' into rbvms…
Browse files Browse the repository at this point in the history
…-9-2024
  • Loading branch information
IdoAkkerman committed Sep 12, 2024
2 parents af25cb1 + 6a3cfb8 commit a0329d5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fem/pgridfunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,16 @@ void ParGridFunction::ProjectCoefficient(Coefficient &coeff)
}
}

void ParGridFunction::ProjectCoefficient(VectorCoefficient &vcoeff)
{
(*this) = std::numeric_limits<real_t>::min();
GridFunction::ProjectCoefficient(vcoeff);

// Accumulate for all vdofs.
GroupCommunicator &gcomm = pfes->GroupComm();
gcomm.Reduce<real_t>(data, GroupCommunicator::Max);
gcomm.Bcast<real_t>(data);
}

void ParGridFunction::ProjectCoefficientGlobalL2(Coefficient &coeff,
real_t rtol,
Expand Down
3 changes: 3 additions & 0 deletions fem/pgridfunc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ class ParGridFunction : public GridFunction
using GridFunction::ProjectCoefficient;
void ProjectCoefficient(Coefficient &coeff) override;

void ProjectCoefficient(VectorCoefficient &vcoeff) override;


using GridFunction::ProjectDiscCoefficient;
/** @brief Project a discontinuous vector coefficient as a grid function on
a continuous finite element space. The values in shared dofs are
Expand Down

0 comments on commit a0329d5

Please sign in to comment.