Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings coming from GISMO_WITH_WARNINGS=ON #21

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ if( (NOT GISMO_BUILD_LIB) )
endif()
endif()

add_custom_target(${PROJECT_NAME})

# add filedata folder
add_definitions(-DSTRAN_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/filedata/")

Expand Down
1 change: 1 addition & 0 deletions benchmarks/benchmark_Elasticity_Beam_APALM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ int main (int argc, char** argv)
#else//gsElasticity_ENABLED
int main(int argc, char *argv[])
{
GISMO_UNUSED(argc); GISMO_UNUSED(argv);
gsWarn<<"G+Smo is not compiled with the gsElasticity module.";
return EXIT_FAILURE;
}
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmark_Frustrum_APALM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class gsAPALMFrustrum : public gsAPALM<T>

}

void parallelIntervalOutput(const std::vector<std::pair<gsVector<T>,T>> & stepSolutions, const std::vector<T> & stepTimes, index_t level, index_t ID)
void parallelIntervalOutput(const std::vector<std::pair<gsVector<T>,T>> & stepSolutions, const std::vector<T> & /* stepTimes */, index_t level, index_t ID)
{
gsStructuralAnalysisOutput<real_t> data(m_dirname + "/interval_"+std::to_string(ID)+".csv",m_refPoints);
gsMultiPatch<T> deformation,mp_tmp, mp;
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmark_Roof_DWR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ template <class T>
void PlotResults( index_t k,
gsThinShellAssemblerDWRBase<T> * assembler,
const gsMultiPatch<T> & mp, const gsMultiPatch<T> & mp_def,
bool plot, bool stress, bool write, bool mesh, bool deformed,
bool plot, bool stress, bool /* write */, bool mesh, bool deformed,
const std::string dirname, const std::string output,
gsParaviewCollection & collection,
gsParaviewCollection & Smembrane,
Expand Down
2 changes: 2 additions & 0 deletions benchmarks/benchmark_Wrinkling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1078,10 +1078,12 @@ int main (int argc, char** argv)
return result;

#else//gsUnstructuredSplines_ENABLED
GISMO_UNUSED(argc); GISMO_UNUSED(argv);
gsWarn<<"G+Smo is not compiled with the gsUnstructuredSplines module.";
return EXIT_FAILURE;
#endif
#else//gsKLShell_ENABLED
GISMO_UNUSED(argc); GISMO_UNUSED(argv);
gsWarn<<"G+Smo is not compiled with the gsKLShell module.";
return EXIT_FAILURE;
#endif
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmark_Wrinkling_DWR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ template <class T>
void PlotResults( index_t k,
gsThinShellAssemblerDWRBase<T> * assembler,
const gsMultiPatch<T> & mp, const gsMultiPatch<T> & mp_def,
bool plot, bool stress, bool write, bool mesh, bool deformed,
bool plot, bool stress, bool /* write */, bool mesh, bool deformed,
const std::string dirname, const std::string output,
gsParaviewCollection & collection,
gsParaviewCollection & Smembrane,
Expand Down
4 changes: 2 additions & 2 deletions examples/example_DynamicShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ gsStructuralAnalysisOps<real_t>::Stiffness_t Stiffness;
gsStructuralAnalysisOps<real_t>::TForce_t TForce;

Mass = [&M]( gsSparseMatrix<real_t> & result){result = M; return true;};
Damping = [&M]( const gsVector<real_t> & x, gsSparseMatrix<real_t> & result){result = gsSparseMatrix<real_t>(M.rows(),M.cols()); return true;};
Damping = [&M]( const gsVector<real_t> & /*x*/, gsSparseMatrix<real_t> & result){result = gsSparseMatrix<real_t>(M.rows(),M.cols()); return true;};
Stiffness = [&K]( gsSparseMatrix<real_t> & result){result = K; return true;};
TForce = [&F](real_t time, gsVector<real_t> & result){result = F; return true;};
TForce = [&F](real_t /*time*/, gsVector<real_t> & result){result = F; return true;};

// // set damping Matrix (same dimensions as M)
// C.setZero(M.rows(),M.cols());
Expand Down
2 changes: 1 addition & 1 deletion examples/example_DynamicShellNL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ gsStructuralAnalysisOps<real_t>::Jacobian_t Jacobian = [&assembler,&mp_def](gsMa
};

// Function for the Residual
gsStructuralAnalysisOps<real_t>::TResidual_t Residual = [&assembler,&mp_def](gsMatrix<real_t> const &x, real_t time, gsVector<real_t> & result)
gsStructuralAnalysisOps<real_t>::TResidual_t Residual = [&assembler,&mp_def](gsMatrix<real_t> const &x, real_t /*time*/, gsVector<real_t> & result)
{
ThinShellAssemblerStatus status;
assembler->constructSolution(x,mp_def);
Expand Down
2 changes: 2 additions & 0 deletions examples/example_DynamicShell_XBraid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,12 @@ delete assembler;
return result;

#else//gsXBraid_ENABLED
GISMO_UNUSED(argc); GISMO_UNUSED(argv);
gsWarn<<"G+Smo is not compiled with the gsXBraid module.";
return EXIT_FAILURE;
#endif
#else//gsKLShell_ENABLED
GISMO_UNUSED(argc); GISMO_UNUSED(argv);
gsWarn<<"G+Smo is not compiled with the gsKLShell module.";
return EXIT_FAILURE;
#endif
Expand Down
1 change: 1 addition & 0 deletions examples/gsElasticity_Modal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ gsMultiPatch<T> BrickDomain(int n, int m, int o, int p, int q ,int r, T L, T B,

int main (int argc, char** argv)
{
GISMO_UNUSED(argc); GISMO_UNUSED(argv);
gsInfo<<"To run this example, compile G+Smo with gsElasticity\n";
return EXIT_SUCCESS;
}
Expand Down
1 change: 1 addition & 0 deletions examples/snapping_element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ gsMultiPatch<T> makeElement(const T tw, const T tg, const T tb, const T ts, cons

int main (int argc, char** argv)
{
GISMO_UNUSED(argc); GISMO_UNUSED(argv);
gsInfo<<"To run this example, compile G+Smo with gsElasticity\n";
return EXIT_SUCCESS;
}
Expand Down
4 changes: 2 additions & 2 deletions examples/snapping_element_shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ int main(int argc, char *argv[])
}

template <class T>
std::vector<gsBSpline<T>> makeCurve(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::string expr, const gsKnotVector<T> & kv1)
std::vector<gsBSpline<T>> makeCurve(const T tw, const T /* tg */, const T /* tb */, const T /* ts */, const T l, const T /* a */, const std::string expr, const gsKnotVector<T> & kv1)
{

gsFunctionExpr<T> fun(expr,2);
Expand Down Expand Up @@ -513,7 +513,7 @@ gsMultiPatch<T> makeElement(const T tw, const T tg, const T tb, const T ts, cons
}

template <class T>
gsMultiPatch<T> makeElement(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
gsMultiPatch<T> makeElement(const T /* tw */, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
{
gsKnotVector<T> kv2(0, 1, 0, 2);

Expand Down
8 changes: 4 additions & 4 deletions examples/snapping_example_shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ int main(int argc, char *argv[])
}

template <class T>
std::vector<gsBSpline<T>> makeCurve(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::string expr, const gsKnotVector<T> & kv1)
std::vector<gsBSpline<T>> makeCurve(const T tw, const T /* tg */, const T /* tb */, const T /* ts */, const T l, const T /* a */, const std::string expr, const gsKnotVector<T> & kv1)
{

gsFunctionExpr<T> fun(expr,2);
Expand Down Expand Up @@ -651,7 +651,7 @@ gsMultiPatch<T> makeTop(const T tw, const T tg, const T tb, const T ts, const T
}

template <class T>
gsMultiPatch<T> makeTop(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
gsMultiPatch<T> makeTop(const T /* tw */, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
{
gsKnotVector<T> kv2(0, 1, 0, 2);

Expand Down Expand Up @@ -878,7 +878,7 @@ gsMultiPatch<T> makeElement(const T tw, const T tg, const T tb, const T ts, cons
}

template <class T>
gsMultiPatch<T> makeElement(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
gsMultiPatch<T> makeElement(const T /* tw */, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
{
gsKnotVector<T> kv2(0, 1, 0, 2);

Expand Down Expand Up @@ -1113,7 +1113,7 @@ gsMultiPatch<T> makeBottom(const T tw, const T tg, const T tb, const T ts, const
}

template <class T>
gsMultiPatch<T> makeBottom(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
gsMultiPatch<T> makeBottom(const T /* tw */, const T tg, const T /* tb */, const T /* ts */, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
{
gsKnotVector<T> kv2(0, 1, 0, 2);

Expand Down
8 changes: 4 additions & 4 deletions examples/snapping_example_shell_APALM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ int main(int argc, char *argv[])
#endif

template <class T>
std::vector<gsBSpline<T>> makeCurve(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::string expr, const gsKnotVector<T> & kv1)
std::vector<gsBSpline<T>> makeCurve(const T tw, const T /* tg */, const T /* tb */, const T /* ts */, const T l, const T /* a */, const std::string expr, const gsKnotVector<T> & kv1)
{

gsFunctionExpr<T> fun(expr,2);
Expand Down Expand Up @@ -715,7 +715,7 @@ gsMultiPatch<T> makeTop(const T tw, const T tg, const T tb, const T ts, const T
}

template <class T>
gsMultiPatch<T> makeTop(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
gsMultiPatch<T> makeTop(const T /* tw */, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
{
gsKnotVector<T> kv2(0, 1, 0, 2);

Expand Down Expand Up @@ -942,7 +942,7 @@ gsMultiPatch<T> makeElement(const T tw, const T tg, const T tb, const T ts, cons
}

template <class T>
gsMultiPatch<T> makeElement(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
gsMultiPatch<T> makeElement(const T /* tw */, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
{
gsKnotVector<T> kv2(0, 1, 0, 2);

Expand Down Expand Up @@ -1177,7 +1177,7 @@ gsMultiPatch<T> makeBottom(const T tw, const T tg, const T tb, const T ts, const
}

template <class T>
gsMultiPatch<T> makeBottom(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
gsMultiPatch<T> makeBottom(const T /* tw */, const T tg, const T /* tb */, const T /* ts */, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
{
gsKnotVector<T> kv2(0, 1, 0, 2);

Expand Down
8 changes: 4 additions & 4 deletions examples/snapping_example_shell_DC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ int main(int argc, char *argv[])
}

template <class T>
std::vector<gsBSpline<T>> makeCurve(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::string expr, const gsKnotVector<T> & kv1)
std::vector<gsBSpline<T>> makeCurve(const T tw, const T /* tg */, const T /* tb */, const T /* ts */, const T l, const T /* a */, const std::string expr, const gsKnotVector<T> & kv1)
{

gsFunctionExpr<T> fun(expr,2);
Expand Down Expand Up @@ -592,7 +592,7 @@ gsMultiPatch<T> makeTop(const T tw, const T tg, const T tb, const T ts, const T
}

template <class T>
gsMultiPatch<T> makeTop(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
gsMultiPatch<T> makeTop(const T /* tw */, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
{
gsKnotVector<T> kv2(0, 1, 0, 2);

Expand Down Expand Up @@ -819,7 +819,7 @@ gsMultiPatch<T> makeElement(const T tw, const T tg, const T tb, const T ts, cons
}

template <class T>
gsMultiPatch<T> makeElement(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
gsMultiPatch<T> makeElement(const T /* tw */, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
{
gsKnotVector<T> kv2(0, 1, 0, 2);

Expand Down Expand Up @@ -1054,7 +1054,7 @@ gsMultiPatch<T> makeBottom(const T tw, const T tg, const T tb, const T ts, const
}

template <class T>
gsMultiPatch<T> makeBottom(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
gsMultiPatch<T> makeBottom(const T /* tw */, const T tg, const T /* tb */, const T /* ts */, const T l, const T a, const std::vector<gsBSpline<T>> & curves)
{
gsKnotVector<T> kv2(0, 1, 0, 2);

Expand Down
2 changes: 2 additions & 0 deletions solvers/buckling_shell_multipatch_XML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,10 +479,12 @@ int main (int argc, char** argv)
}
return EXIT_SUCCESS;
#else//gsUnstructuredSplines_ENABLED
GISMO_UNUSED(argc); GISMO_UNUSED(argv);
gsWarn<<"G+Smo is not compiled with the gsUnstructuredSplines module.";
return EXIT_FAILURE;
#endif
#else//gsKLShell_ENABLED
GISMO_UNUSED(argc); GISMO_UNUSED(argv);
gsWarn<<"G+Smo is not compiled with the gsKLShell module.";
return EXIT_FAILURE;
#endif
Expand Down
2 changes: 2 additions & 0 deletions solvers/modal_shell_multipatch_XML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,15 @@ int main (int argc, char** argv)
#else//gsUnstructuredSplines_ENABLED
int main(int argc, char *argv[])
{
GISMO_UNUSED(argc); GISMO_UNUSED(argv);
gsWarn<<"G+Smo is not compiled with the gsUnstructuredSplines module.";
return EXIT_FAILURE;
}
#endif
#else//gsKLShell_ENABLED
int main(int argc, char *argv[])
{
GISMO_UNUSED(argc); GISMO_UNUSED(argv);
gsWarn<<"G+Smo is not compiled with the gsKLShell module.";
return EXIT_FAILURE;
}
Expand Down
2 changes: 2 additions & 0 deletions solvers/quasistatic_shell_multipatch_XML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,13 +526,15 @@ int main (int argc, char** argv)
#else//gsUnstructuredSplines_ENABLED
int main(int argc, char *argv[])
{
GISMO_UNUSED(argc); GISMO_UNUSED(argv);
gsWarn<<"G+Smo is not compiled with the gsUnstructuredSplines module.";
return EXIT_FAILURE;
}
#endif
#else//gsKLShell_ENABLED
int main(int argc, char *argv[])
{
GISMO_UNUSED(argc); GISMO_UNUSED(argv);
gsWarn<<"G+Smo is not compiled with the gsKLShell module.";
return EXIT_FAILURE;
}
Expand Down
2 changes: 2 additions & 0 deletions solvers/static_shell_multipatch_XML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,13 +542,15 @@ int main (int argc, char** argv)
#else//gsUnstructuredSplines_ENABLED
int main(int argc, char *argv[])
{
GISMO_UNUSED(argc); GISMO_UNUSED(argv);
gsWarn<<"G+Smo is not compiled with the gsUnstructuredSplines module.";
return EXIT_FAILURE;
}
#endif
#else//gsKLShell_ENABLED
int main(int argc, char *argv[])
{
GISMO_UNUSED(argc); GISMO_UNUSED(argv);
gsWarn<<"G+Smo is not compiled with the gsKLShell module.";
return EXIT_FAILURE;
}
Expand Down
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ FOREACH(subdir ${SUBDIRS})
add_dependencies(${GM_NAME} mpfr)
endif()

add_dependencies(${GM_NAME} ${PROJECT_NAME})

## Add extra instances (template instantiations)
# NOTE: The static/non templated part of the library is
# compiled above only for GISMO_COEFF_TYPE
Expand Down
6 changes: 3 additions & 3 deletions src/gsALMSolvers/gsALMBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class gsALMBase
m_forcing(Force)
{
m_jacobian = Jacobian;
m_djacobian = [this](gsVector<T> const & x, gsVector<T> const & dx, gsSparseMatrix<T> & m) -> bool
m_djacobian = [this](gsVector<T> const & x, gsVector<T> const & /*dx*/, gsSparseMatrix<T> & m) -> bool
{
return m_jacobian(x,m);
};
Expand Down Expand Up @@ -203,12 +203,12 @@ class gsALMBase
virtual void setOptions(gsOptionList options) {m_options.update(options,gsOptionList::addIfUnknown); this->getOptions(); };

/// Return the options into \a options
virtual const void options_into(gsOptionList options) {options = m_options;};
virtual void options_into(gsOptionList options) {options = m_options;};

/// Apply the options
virtual void applyOptions() {this->getOptions(); }

virtual T distance(const gsVector<T>& DeltaU, const T DeltaL) const
virtual T distance(const gsVector<T>& /*DeltaU*/, const T /*DeltaL*/) const
{
GISMO_NO_IMPLEMENTATION;
}
Expand Down
1 change: 1 addition & 0 deletions src/gsALMSolvers/gsALMBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ void gsALMBase<T>::_computeStability(const gsVector<T> & x, bool jacobian, T shi
// gsEigen::SelfAdjointEigenSolver< gsMatrix<T> > es(m_jacMat);
m_stabilityVec = es.eigenvalues();
#else
GISMO_UNUSED(shift);
gsEigen::SelfAdjointEigenSolver<gsMatrix<T>> es2(m_jacMat);
m_stabilityVec = es2.eigenvalues();
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/gsALMSolvers/gsALMRiks.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class gsALMRiks : public gsALMBase<T>
public:
T distance(const gsVector<T>& DeltaU, const T DeltaL) const
{
return math::pow(m_phi * math::pow(m_DeltaU.norm(),2.0) + (1.0-m_phi) * math::pow(m_DeltaL,2.0),0.5);
return math::pow(m_phi * math::pow(DeltaU.norm(),2.0) + (1.0-m_phi) * math::pow(DeltaL,2.0),0.5);
}

protected:
Expand Down
6 changes: 3 additions & 3 deletions src/gsALMSolvers/gsAPALM.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ class gsAPALM
* @param[in] time The parametric time
* @param[in] step The step index
*/
virtual void serialStepOutput(const std::pair<gsVector<T>,T> & pair, const T & time, index_t step) {};
virtual void serialStepOutput(const std::pair<gsVector<T>,T> & /*pair*/, const T & /*time*/, index_t /*step*/) {};
/**
* @brief Output function when performing parallel steps
*
* @param[in] pair The solution pair
* @param[in] time The parametric time
* @param[in] step The step index
*/
virtual void parallelStepOutput(const std::pair<gsVector<T>,T> & pair, const T & time, index_t step) {};
virtual void parallelStepOutput(const std::pair<gsVector<T>,T> & /*pair*/, const T & /*time*/, index_t /*step*/) {};
/**
* @brief Output function within an interval
*
Expand All @@ -145,7 +145,7 @@ class gsAPALM
* @param[in] level The level of the interval
* @param[in] ID THe ID of the job
*/
virtual void parallelIntervalOutput(const std::vector<std::pair<gsVector<T>,T>> & stepSolutions, const std::vector<T> & stepTimes, index_t level, index_t ID) {};
virtual void parallelIntervalOutput(const std::vector<std::pair<gsVector<T>,T>> & /*stepSolutions*/, const std::vector<T> & /*stepTimes*/, index_t /*level*/, index_t /*ID*/) {};

/**
* @brief Returns the options
Expand Down
Loading
Loading