Skip to content

Commit

Permalink
Test consts
Browse files Browse the repository at this point in the history
  • Loading branch information
nmnobre committed Aug 21, 2024
1 parent 5f373e8 commit e248f64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 5 additions & 4 deletions fem/gslib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ FindPointsGSLIB::FindPointsGSLIB(MPI_Comm comm_)
}
#endif

void FindPointsGSLIB::Setup(Mesh &m, const double bb_t, const double newt_tol,
void FindPointsGSLIB::Setup(const Mesh &m, const double bb_t,
const double newt_tol,
const int npt_max)
{
MFEM_VERIFY(m.GetNodes() != NULL, "Mesh nodes are required.");
Expand Down Expand Up @@ -253,7 +254,7 @@ void FindPointsGSLIB::FindPoints(const Vector &point_pos,
MapRefPosAndElemIndices();
}

void FindPointsGSLIB::FindPoints(Mesh &m, const Vector &point_pos,
void FindPointsGSLIB::FindPoints(const Mesh &m, const Vector &point_pos,
int point_pos_ordering, const double bb_t,
const double newt_tol, const int npt_max)
{
Expand All @@ -272,7 +273,7 @@ void FindPointsGSLIB::Interpolate(const Vector &point_pos,
Interpolate(field_in, field_out);
}

void FindPointsGSLIB::Interpolate(Mesh &m, const Vector &point_pos,
void FindPointsGSLIB::Interpolate(const Mesh &m, const Vector &point_pos,
const GridFunction &field_in, Vector &field_out,
int point_pos_ordering)
{
Expand Down Expand Up @@ -1282,7 +1283,7 @@ void FindPointsGSLIB::DistributeInterpolatedValues(const Vector &int_vals,
}
}

void OversetFindPointsGSLIB::Setup(Mesh &m, const int meshid,
void OversetFindPointsGSLIB::Setup(const Mesh &m, const int meshid,
GridFunction *gfmax,
const double bb_t, const double newt_tol,
const int npt_max)
Expand Down
10 changes: 5 additions & 5 deletions fem/gslib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class FindPointsGSLIB
enum AvgType {NONE, ARITHMETIC, HARMONIC}; // Average type for L2 functions

protected:
Mesh *mesh;
const Mesh *mesh;
Array<Mesh *> mesh_split; // Meshes used to split simplices.
// IntegrationRules for simplex->Quad/Hex and to project to highest polynomial
// order in-case of p-refinement.
Expand Down Expand Up @@ -142,7 +142,7 @@ class FindPointsGSLIB
@param[in] npt_max (Optional) Number of points for simultaneous
iteration. This alters performance and
memory footprint.*/
void Setup(Mesh &m, const double bb_t = 0.1,
void Setup(const Mesh &m, const double bb_t = 0.1,
const double newt_tol = 1.0e-12,
const int npt_max = 256);
/** Searches positions given in physical space by \p point_pos.
Expand All @@ -168,7 +168,7 @@ class FindPointsGSLIB
void FindPoints(const Vector &point_pos,
int point_pos_ordering = Ordering::byNODES);
/// Setup FindPoints and search positions
void FindPoints(Mesh &m, const Vector &point_pos,
void FindPoints(const Mesh &m, const Vector &point_pos,
int point_pos_ordering = Ordering::byNODES,
const double bb_t = 0.1,
const double newt_tol = 1.0e-12, const int npt_max = 256);
Expand All @@ -190,7 +190,7 @@ class FindPointsGSLIB
/** Setup FindPoints, search positions and interpolate. The ordering (byNODES
or byVDIM) of the output values in \p field_out corresponds to the
ordering used in the input GridFunction \p field_in. */
void Interpolate(Mesh &m, const Vector &point_pos,
void Interpolate(const Mesh &m, const Vector &point_pos,
const GridFunction &field_in, Vector &field_out,
int point_pos_ordering = Ordering::byNODES);

Expand Down Expand Up @@ -317,7 +317,7 @@ class OversetFindPointsGSLIB : public FindPointsGSLIB
@param[in] npt_max (Optional) Number of points for simultaneous
iteration. This alters performance and
memory footprint.*/
void Setup(Mesh &m, const int meshid, GridFunction *gfmax = NULL,
void Setup(const Mesh &m, const int meshid, GridFunction *gfmax = NULL,
const double bb_t = 0.1, const double newt_tol = 1.0e-12,
const int npt_max = 256);

Expand Down

0 comments on commit e248f64

Please sign in to comment.