Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
vladotomov committed Nov 25, 2024
1 parent fb17293 commit 15d6156
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion remhos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1436,21 +1436,25 @@ void AdvectionOperator::ComputeMask(const Vector &x, Array<bool> &mask) const
}

if (!dofs_active)
{
for (int j = 0; j < ndof_el; j++)
{
bool_dofs[j+ndof_el*k] = false;
}
}
}

// Apply the u mask to all product fields
const int ndofs = bool_dofs.Size();
const int ndim = block_offsets.Size() - 1;
mask.SetSize(ndofs * ndim);
for (int i = 0; i < ndofs; i++)
{
for (int d = 0; d < ndim; d++)
{
mask[i+ndofs*d] = bool_dofs[i];
}
}
}

void AdvectionOperator::LimitMult(const Vector &X, Vector &Y) const
Expand All @@ -1463,7 +1467,6 @@ void AdvectionOperator::LimitMult(const Vector &X, Vector &Y) const
const Vector &u = block_X.GetBlock(0);
Vector &d_u = block_Y.GetBlock(0);


if (fct_solver)
{
MFEM_VERIFY(ho_solver && lo_solver, "FCT requires HO and LO solvers.");
Expand Down
3 changes: 3 additions & 0 deletions remhos_solvers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class LimitedTimeDependentOperator : public TimeDependentOperator
{ MFEM_ABORT("Mask computation not implemented!"); }

/// Limit the action vector @a k
/// Assumes that MultUnlimited(u, k) has been called, which has computed the
/// unlimited solution in @a k.
virtual void LimitMult(const Vector &u, Vector &k) const = 0;
};

Expand Down Expand Up @@ -94,6 +96,7 @@ class RKIDPSolver : public IDPODESolver

void ConstructD();

/// Adds only DOFs that have mask = true.
void AddMasked(const Array<bool> &mask, real_t b,
const Vector &vb, Vector &va);

Expand Down

0 comments on commit 15d6156

Please sign in to comment.