Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hverhelst committed Dec 10, 2024
1 parent fcf19de commit 059d5d3
Show file tree
Hide file tree
Showing 16 changed files with 126 additions and 60 deletions.
6 changes: 5 additions & 1 deletion src/gsAlmostC1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ namespace gismo
{
colIdx = uind(0,j);
m_matrix.prune(
[&colIdx](index_t i, index_t j, T)
[&colIdx](index_t, index_t j, T)
{ return j!=colIdx; }
);
}
Expand Down Expand Up @@ -819,6 +819,7 @@ namespace gismo
template<short_t d,class T>
void gsAlmostC1<d,T>::_computeMapperRegularBoundaryVertexNonSmooth_v2(patchCorner pcorner, index_t valence)
{
GISMO_UNUSED(valence);
// for C0 vertices, the 1,0 and 0,1 DoFs on the interface need to be eliminated
// However, we need a minimum of 3 DoFs around the vertex and we keep the 0,0s anyways
// Using _removeLowestIndices(indices,3), only the 0,1 or 1,0 index with the highest is selected for removal
Expand Down Expand Up @@ -846,6 +847,7 @@ namespace gismo
template<short_t d,class T>
void gsAlmostC1<d,T>::_computeMapperIrregularBoundaryVertexSmooth_v(patchCorner pcorner, index_t valence)
{
GISMO_UNUSED(valence);
std::vector<std::pair<index_t,index_t>> indices0 = _getAllInterfaceIndices(pcorner,0,m_bases);
std::vector<std::pair<index_t,index_t>> indices1 = _getAllInterfaceIndices(pcorner,1,m_bases);
std::vector<patchCorner> pcorners;
Expand Down Expand Up @@ -876,6 +878,7 @@ namespace gismo
template<short_t d,class T>
void gsAlmostC1<d,T>::_computeMapperInteriorVertex_v(patchCorner pcorner, index_t valence)
{
GISMO_UNUSED(valence);
std::vector<std::pair<index_t,index_t>> indices0 = _getAllInterfaceIndices(pcorner,0,m_bases);
std::vector<std::pair<index_t,index_t>> indices1 = _getAllInterfaceIndices(pcorner,1,m_bases);
std::vector<patchCorner> pcorners;
Expand Down Expand Up @@ -904,6 +907,7 @@ namespace gismo
template<short_t d,class T>
void gsAlmostC1<d,T>::_handleIrregularBoundaryVertexSmooth(patchCorner pcorner, index_t valence)
{
GISMO_UNUSED(valence);
std::vector<patchSide> psides;
std::vector<patchCorner> corners;
std::vector<index_t> indices;
Expand Down
4 changes: 4 additions & 0 deletions src/gsApproxC1Edge.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class gsApproxC1Edge
const gsOptionList & optionList)
: m_mp(mp), m_bases(bases), m_optionList(optionList)
{
GISMO_UNUSED(numInt);

m_auxPatches.clear();
m_auxPatches.push_back(gsPatchReparameterized<d,T>(m_mp.patch(item.first().patch), m_bases[item.first().patch]));
m_auxPatches.push_back(gsPatchReparameterized<d,T>(m_mp.patch(item.second().patch), m_bases[item.second().patch]));
Expand Down Expand Up @@ -97,6 +99,8 @@ class gsApproxC1Edge
const gsOptionList & optionList)
: m_mp(mp), m_bases(bases), m_optionList(optionList)
{
GISMO_UNUSED(numBdy);

m_auxPatches.clear();
m_auxPatches.push_back(gsPatchReparameterized<d,T>(m_mp.patch(item.patch), m_bases[item.patch]));

Expand Down
5 changes: 5 additions & 0 deletions src/gsApproxC1Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class gsAlpha : public gismo::gsFunction<T>

const gsFunction<T> & piece(const index_t k) const
{
GISMO_UNUSED(k);
//delete _alpha_piece;
_alpha_piece = new gsAlpha(*this);
return *_alpha_piece;
Expand Down Expand Up @@ -176,6 +177,7 @@ class gsBeta : public gismo::gsFunction<T>

const gsFunction<T> & piece(const index_t k) const
{
GISMO_UNUSED(k);
//delete _beta_piece;
_beta_piece = new gsBeta(*this);
return *_beta_piece;
Expand Down Expand Up @@ -280,6 +282,7 @@ class gsTraceBasis : public gismo::gsFunction<T>

const gsFunction<T> & piece(const index_t k) const
{
GISMO_UNUSED(k);
//delete _traceBasis_piece;
_traceBasis_piece = new gsTraceBasis(*this);
return *_traceBasis_piece;
Expand Down Expand Up @@ -367,6 +370,7 @@ class gsNormalDerivBasis : public gismo::gsFunction<T>

const gsFunction<T> & piece(const index_t k) const
{
GISMO_UNUSED(k);
//delete _normalDerivBasis_piece;
_normalDerivBasis_piece = new gsNormalDerivBasis(*this);
return *_normalDerivBasis_piece;
Expand Down Expand Up @@ -459,6 +463,7 @@ class gsVertexBasis : public gismo::gsFunction<T>

const gsFunction<T> & piece(const index_t k) const
{
GISMO_UNUSED(k);
//delete _vertexBasis_piece;
_vertexBasis_piece = new gsVertexBasis(*this);
return *_vertexBasis_piece;
Expand Down
2 changes: 2 additions & 0 deletions src/gsApproxC1Vertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class gsApproxC1Vertex
: m_mp(mp), m_bases(bases), m_patchesAroundVertex(patchesAroundVertex),
m_vertexIndices(vertexIndices), m_optionList(optionList)
{
GISMO_UNUSED(numVer);

m_auxPatches.clear();
basisVertexResult.clear();

Expand Down
4 changes: 3 additions & 1 deletion src/gsC1SurfBasisEdge.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ namespace gismo
inline void apply(bhVisitor & visitor, index_t i, std::string typeBf); // i == number of bf
void solve();

using Base::constructSolution;
void constructSolution(const gsMatrix<T> & solVector,
gsMultiPatch<T> & result, short_t unk = 0) const;

Expand All @@ -71,7 +72,8 @@ namespace gismo
void assemble()
{ GISMO_NO_IMPLEMENTATION; }

void assemble(const gsMultiPatch<T> & curSolution)
using gsAssembler<T>::assemble;
void assemble(const gsMultiPatch<T> & /* curSolution */)
{ GISMO_NO_IMPLEMENTATION; }

protected:
Expand Down
13 changes: 7 additions & 6 deletions src/gsC1SurfBasisVertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Author(s): A. Farahat & P. Weinmueller
Author(s): A. Farahat & P. Weinmueller
*/

#pragma once
Expand Down Expand Up @@ -59,6 +59,7 @@ namespace gismo


void refresh();
using Base::assemble;
void assemble();
inline void apply(bhVisitor & visitor, index_t patchIndex);
void solve();
Expand All @@ -78,13 +79,13 @@ namespace gismo

private:
// Avoid hidden overloads w.r.t. gsAssembler
void constructSolution(const gsMatrix<T>& solVector,
gsMultiPatch<T>& result, short_t unk) const
void constructSolution(const gsMatrix<T>& /* solVector */,
gsMultiPatch<T>& /* result */, short_t /* unk */) const
{ GISMO_NO_IMPLEMENTATION; }

void constructSolution(const gsMatrix<T>& solVector,
gsMultiPatch<T>& result,
const gsVector<index_t> & unknowns) const
void constructSolution(const gsMatrix<T>& /* solVector */,
gsMultiPatch<T>& /* result */,
const gsVector<index_t> & /* unknowns */) const
{ GISMO_NO_IMPLEMENTATION; }

protected:
Expand Down
5 changes: 5 additions & 0 deletions src/gsC1SurfGluingDataVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ class gsC1SurfGluingDataVisitor
gsMultiPatch<T> & mp,
gsMatrix<T> sol)
{
GISMO_UNUSED(mp);

md.points = quNodes;
activesBeta.setZero(4, 1);
activesBeta << 0, 1, 2, 3;
Expand Down Expand Up @@ -264,6 +266,7 @@ class gsC1SurfGluingDataVisitor
inline void assemble(gsDomainIterator<T> & element,
const gsVector<T> & quWeights)
{
GISMO_UNUSED(element);

for (index_t k = 0; k < quWeights.rows(); ++k) // loop over quadrature nodes
{
Expand All @@ -285,6 +288,8 @@ class gsC1SurfGluingDataVisitor
inline void assembleBeta(gsDomainIterator<T> & element,
const gsVector<T> & quWeights)
{
GISMO_UNUSED(element);

for (index_t k = 0; k < quWeights.rows(); ++k) // loop over quadrature nodes
{

Expand Down
2 changes: 2 additions & 0 deletions src/gsC1SurfVisitorBasisEdge.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ namespace gismo
inline void assemble(gsDomainIterator<T> & element,
const gsVector<T> & quWeights)
{
GISMO_UNUSED(element);

gsMatrix<T> & basisVals = basisData;

// ( u, v)
Expand Down
4 changes: 4 additions & 0 deletions src/gsC1SurfVisitorBasisVertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ namespace gismo
std::vector<bool> & isBoundary,
gsMatrix<T> & Phi)
{
GISMO_UNUSED(isBoundary);

md.points = quNodes;

// Compute the active basis functions
Expand Down Expand Up @@ -420,6 +422,8 @@ namespace gismo
inline void assemble(gsDomainIterator<T> & element,
const gsVector<T> & quWeights)
{
GISMO_UNUSED(element);

gsMatrix<T> & basisVals = basisData;
for (index_t i = 0; i < 6; i++)
{
Expand Down
22 changes: 17 additions & 5 deletions src/gsContainerBasis.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,24 @@ namespace gismo

index_t nPieces() const {return basisContainer.size();}

typename gsBasis<T>::domainIter makeDomainIterator(const boxSide & side) const
typename gsBasis<T>::domainIter makeDomainIterator(const boxSide & side) const override
{
// Using the inner basis for iterating
return basisContainer[0].makeDomainIterator(side);
}

typename gsBasis<T>::domainIter makeDomainIterator() const
typename gsBasis<T>::domainIter makeDomainIterator() const override
{
// Using the inner basis for iterating
return basisContainer[0].makeDomainIterator();
}

const gsBasis<T> & component(short_t i) const
gsBasis<T> & component(short_t i) override
{
return basisContainer[0].component(i);
}

const gsBasis<T> & component(short_t i) const override
{
return basisContainer[0].component(i);
}
Expand All @@ -151,11 +156,16 @@ namespace gismo
gsMatrix<index_t> & bndThis, gsMatrix<index_t> & bndOther) const;
*/

gsMatrix<T> support() const
gsMatrix<T> support() const override
{
return basisContainer[0].support();
}

gsMatrix<T> support(const index_t & i) const override
{
return basisContainer[0].support(i);
}

gsBasis<T>* boundaryBasis_impl(boxSide const & s) const
{
/*
Expand Down Expand Up @@ -245,7 +255,9 @@ namespace gismo
}

void matchWith(const boundaryInterface &bi, const gsBasis<T> &other, gsMatrix<index_t> &bndThis,
gsMatrix<index_t> &bndOther) const {
gsMatrix<index_t> &bndOther, int) const override
{
GISMO_UNUSED(bi); GISMO_UNUSED(other); GISMO_UNUSED(bndThis); GISMO_UNUSED(bndOther);
// First side
// edge
gsDebug << "matchWith() function is not implemented yet \n";
Expand Down
12 changes: 8 additions & 4 deletions src/gsDPatch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,10 +532,10 @@ namespace gismo
// interface smoothing
for (index_t i = 0; i!=N; i++) // for all involved interfaces
{
patchCorner corner = corners[patches[interfaces[i][0].patch]];
patchCorner otherCorner = corners[patches[interfaces[i][1].patch]];
patchSide side = interfaces[i][0];
patchSide otherSide = interfaces[i][1];
patchCorner corner = corners[patches[interfaces[i].first().patch]];
patchCorner otherCorner = corners[patches[interfaces[i].second().patch]];
patchSide side = interfaces[i].first();
patchSide otherSide = interfaces[i].second();
for (index_t k = 2; k!=4 ; k++)// std::max(basis1->maxDegree(),basis2->maxDegree())+
{
idx = this->_indexFromVert(m_bases,k,corner,side,0);
Expand Down Expand Up @@ -731,6 +731,8 @@ namespace gismo
template<short_t d,class T>
void gsDPatch<d,T>::_handleIrregularBoundaryVertexSmooth(patchCorner pcorner, index_t valence)
{
GISMO_UNUSED(valence);

// // 2. make container for the interfaces
// std::vector<boundaryInterface> ifaces;
// boundaryInterface iface;
Expand Down Expand Up @@ -1145,6 +1147,8 @@ namespace gismo
template<short_t d,class T>
void gsDPatch<d,T>::_computeMapperIrregularBoundaryVertexSmooth_v3(patchCorner pcorner, index_t valence)
{
GISMO_UNUSED(valence);

std::vector<patchSide> psides(2);
std::vector<patchCorner> pcorners;
/*
Expand Down
Loading

0 comments on commit 059d5d3

Please sign in to comment.