From 0e8d2e13f189e6790561898f9fffe4df85f03537 Mon Sep 17 00:00:00 2001 From: Hugo Verhelst Date: Thu, 1 Aug 2024 12:20:59 +0200 Subject: [PATCH] Fix warnings coming from GISMO_WITH_WARNINGS=ON --- .../benchmark_Elasticity_Beam_APALM.cpp | 1 + benchmarks/benchmark_Frustrum_APALM.cpp | 2 +- benchmarks/benchmark_Roof_DWR.cpp | 2 +- benchmarks/benchmark_Wrinkling.cpp | 2 + benchmarks/benchmark_Wrinkling_DWR.cpp | 2 +- examples/example_DynamicShell.cpp | 4 +- examples/example_DynamicShellNL.cpp | 2 +- examples/example_DynamicShell_XBraid.cpp | 2 + examples/gsElasticity_Modal.cpp | 1 + examples/snapping_element.cpp | 1 + examples/snapping_element_shell.cpp | 4 +- examples/snapping_example_shell.cpp | 8 ++-- examples/snapping_example_shell_APALM.cpp | 8 ++-- examples/snapping_example_shell_DC.cpp | 8 ++-- solvers/buckling_shell_multipatch_XML.cpp | 2 + solvers/modal_shell_multipatch_XML.cpp | 2 + solvers/quasistatic_shell_multipatch_XML.cpp | 2 + solvers/static_shell_multipatch_XML.cpp | 2 + src/gsALMSolvers/gsALMBase.h | 6 +-- src/gsALMSolvers/gsALMBase.hpp | 1 + src/gsALMSolvers/gsALMRiks.h | 2 +- src/gsALMSolvers/gsAPALM.h | 6 +-- src/gsDynamicSolvers/gsDynamicBase.h | 40 +++++++++---------- .../gsDynamicExplicitEuler.hpp | 2 +- src/gsDynamicSolvers/gsDynamicRK4.hpp | 2 +- src/gsEigenSolvers/gsEigenProblemBase.hpp | 1 + src/gsStaticSolvers/gsStaticBase.h | 3 +- src/gsStaticSolvers/gsStaticComposite.hpp | 2 +- src/gsStaticSolvers/gsStaticNewton.h | 4 +- .../gsPanelCreator.hpp | 4 +- 30 files changed, 73 insertions(+), 55 deletions(-) diff --git a/benchmarks/benchmark_Elasticity_Beam_APALM.cpp b/benchmarks/benchmark_Elasticity_Beam_APALM.cpp index 95b1934..d8dad99 100644 --- a/benchmarks/benchmark_Elasticity_Beam_APALM.cpp +++ b/benchmarks/benchmark_Elasticity_Beam_APALM.cpp @@ -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; } diff --git a/benchmarks/benchmark_Frustrum_APALM.cpp b/benchmarks/benchmark_Frustrum_APALM.cpp index 3b43a9e..10b288f 100644 --- a/benchmarks/benchmark_Frustrum_APALM.cpp +++ b/benchmarks/benchmark_Frustrum_APALM.cpp @@ -66,7 +66,7 @@ class gsAPALMFrustrum : public gsAPALM } - void parallelIntervalOutput(const std::vector,T>> & stepSolutions, const std::vector & stepTimes, index_t level, index_t ID) + void parallelIntervalOutput(const std::vector,T>> & stepSolutions, const std::vector & /* stepTimes */, index_t level, index_t ID) { gsStructuralAnalysisOutput data(m_dirname + "/interval_"+std::to_string(ID)+".csv",m_refPoints); gsMultiPatch deformation,mp_tmp, mp; diff --git a/benchmarks/benchmark_Roof_DWR.cpp b/benchmarks/benchmark_Roof_DWR.cpp index 1bf0655..f41b993 100644 --- a/benchmarks/benchmark_Roof_DWR.cpp +++ b/benchmarks/benchmark_Roof_DWR.cpp @@ -868,7 +868,7 @@ template void PlotResults( index_t k, gsThinShellAssemblerDWRBase * assembler, const gsMultiPatch & mp, const gsMultiPatch & 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, diff --git a/benchmarks/benchmark_Wrinkling.cpp b/benchmarks/benchmark_Wrinkling.cpp index bb717e5..5e80563 100644 --- a/benchmarks/benchmark_Wrinkling.cpp +++ b/benchmarks/benchmark_Wrinkling.cpp @@ -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 diff --git a/benchmarks/benchmark_Wrinkling_DWR.cpp b/benchmarks/benchmark_Wrinkling_DWR.cpp index dff67c8..0082659 100644 --- a/benchmarks/benchmark_Wrinkling_DWR.cpp +++ b/benchmarks/benchmark_Wrinkling_DWR.cpp @@ -1202,7 +1202,7 @@ template void PlotResults( index_t k, gsThinShellAssemblerDWRBase * assembler, const gsMultiPatch & mp, const gsMultiPatch & 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, diff --git a/examples/example_DynamicShell.cpp b/examples/example_DynamicShell.cpp index d135a18..f439998 100644 --- a/examples/example_DynamicShell.cpp +++ b/examples/example_DynamicShell.cpp @@ -247,9 +247,9 @@ gsStructuralAnalysisOps::Stiffness_t Stiffness; gsStructuralAnalysisOps::TForce_t TForce; Mass = [&M]( gsSparseMatrix & result){result = M; return true;}; -Damping = [&M]( const gsVector & x, gsSparseMatrix & result){result = gsSparseMatrix(M.rows(),M.cols()); return true;}; +Damping = [&M]( const gsVector & /*x*/, gsSparseMatrix & result){result = gsSparseMatrix(M.rows(),M.cols()); return true;}; Stiffness = [&K]( gsSparseMatrix & result){result = K; return true;}; -TForce = [&F](real_t time, gsVector & result){result = F; return true;}; +TForce = [&F](real_t /*time*/, gsVector & result){result = F; return true;}; // // set damping Matrix (same dimensions as M) // C.setZero(M.rows(),M.cols()); diff --git a/examples/example_DynamicShellNL.cpp b/examples/example_DynamicShellNL.cpp index bf72269..a4b96a9 100644 --- a/examples/example_DynamicShellNL.cpp +++ b/examples/example_DynamicShellNL.cpp @@ -235,7 +235,7 @@ gsStructuralAnalysisOps::Jacobian_t Jacobian = [&assembler,&mp_def](gsMa }; // Function for the Residual -gsStructuralAnalysisOps::TResidual_t Residual = [&assembler,&mp_def](gsMatrix const &x, real_t time, gsVector & result) +gsStructuralAnalysisOps::TResidual_t Residual = [&assembler,&mp_def](gsMatrix const &x, real_t /*time*/, gsVector & result) { ThinShellAssemblerStatus status; assembler->constructSolution(x,mp_def); diff --git a/examples/example_DynamicShell_XBraid.cpp b/examples/example_DynamicShell_XBraid.cpp index c05025f..bcfe87b 100644 --- a/examples/example_DynamicShell_XBraid.cpp +++ b/examples/example_DynamicShell_XBraid.cpp @@ -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 diff --git a/examples/gsElasticity_Modal.cpp b/examples/gsElasticity_Modal.cpp index 61a65b6..97cc23e 100644 --- a/examples/gsElasticity_Modal.cpp +++ b/examples/gsElasticity_Modal.cpp @@ -344,6 +344,7 @@ gsMultiPatch 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; } diff --git a/examples/snapping_element.cpp b/examples/snapping_element.cpp index aa2d074..9c2f490 100644 --- a/examples/snapping_element.cpp +++ b/examples/snapping_element.cpp @@ -737,6 +737,7 @@ gsMultiPatch 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; } diff --git a/examples/snapping_element_shell.cpp b/examples/snapping_element_shell.cpp index b9bb694..97e6581 100644 --- a/examples/snapping_element_shell.cpp +++ b/examples/snapping_element_shell.cpp @@ -437,7 +437,7 @@ int main(int argc, char *argv[]) } template -std::vector> 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 & kv1) +std::vector> 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 & kv1) { gsFunctionExpr fun(expr,2); @@ -513,7 +513,7 @@ gsMultiPatch makeElement(const T tw, const T tg, const T tb, const T ts, cons } template -gsMultiPatch makeElement(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) +gsMultiPatch makeElement(const T /* tw */, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) { gsKnotVector kv2(0, 1, 0, 2); diff --git a/examples/snapping_example_shell.cpp b/examples/snapping_example_shell.cpp index f84aa73..8b7a47d 100644 --- a/examples/snapping_example_shell.cpp +++ b/examples/snapping_example_shell.cpp @@ -575,7 +575,7 @@ int main(int argc, char *argv[]) } template -std::vector> 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 & kv1) +std::vector> 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 & kv1) { gsFunctionExpr fun(expr,2); @@ -651,7 +651,7 @@ gsMultiPatch makeTop(const T tw, const T tg, const T tb, const T ts, const T } template -gsMultiPatch makeTop(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) +gsMultiPatch makeTop(const T /* tw */, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) { gsKnotVector kv2(0, 1, 0, 2); @@ -878,7 +878,7 @@ gsMultiPatch makeElement(const T tw, const T tg, const T tb, const T ts, cons } template -gsMultiPatch makeElement(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) +gsMultiPatch makeElement(const T /* tw */, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) { gsKnotVector kv2(0, 1, 0, 2); @@ -1113,7 +1113,7 @@ gsMultiPatch makeBottom(const T tw, const T tg, const T tb, const T ts, const } template -gsMultiPatch makeBottom(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) +gsMultiPatch makeBottom(const T /* tw */, const T tg, const T /* tb */, const T /* ts */, const T l, const T a, const std::vector> & curves) { gsKnotVector kv2(0, 1, 0, 2); diff --git a/examples/snapping_example_shell_APALM.cpp b/examples/snapping_example_shell_APALM.cpp index e800ee9..058aa3c 100644 --- a/examples/snapping_example_shell_APALM.cpp +++ b/examples/snapping_example_shell_APALM.cpp @@ -639,7 +639,7 @@ int main(int argc, char *argv[]) #endif template -std::vector> 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 & kv1) +std::vector> 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 & kv1) { gsFunctionExpr fun(expr,2); @@ -715,7 +715,7 @@ gsMultiPatch makeTop(const T tw, const T tg, const T tb, const T ts, const T } template -gsMultiPatch makeTop(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) +gsMultiPatch makeTop(const T /* tw */, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) { gsKnotVector kv2(0, 1, 0, 2); @@ -942,7 +942,7 @@ gsMultiPatch makeElement(const T tw, const T tg, const T tb, const T ts, cons } template -gsMultiPatch makeElement(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) +gsMultiPatch makeElement(const T /* tw */, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) { gsKnotVector kv2(0, 1, 0, 2); @@ -1177,7 +1177,7 @@ gsMultiPatch makeBottom(const T tw, const T tg, const T tb, const T ts, const } template -gsMultiPatch makeBottom(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) +gsMultiPatch makeBottom(const T /* tw */, const T tg, const T /* tb */, const T /* ts */, const T l, const T a, const std::vector> & curves) { gsKnotVector kv2(0, 1, 0, 2); diff --git a/examples/snapping_example_shell_DC.cpp b/examples/snapping_example_shell_DC.cpp index 9df28f9..00f5537 100644 --- a/examples/snapping_example_shell_DC.cpp +++ b/examples/snapping_example_shell_DC.cpp @@ -516,7 +516,7 @@ int main(int argc, char *argv[]) } template -std::vector> 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 & kv1) +std::vector> 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 & kv1) { gsFunctionExpr fun(expr,2); @@ -592,7 +592,7 @@ gsMultiPatch makeTop(const T tw, const T tg, const T tb, const T ts, const T } template -gsMultiPatch makeTop(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) +gsMultiPatch makeTop(const T /* tw */, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) { gsKnotVector kv2(0, 1, 0, 2); @@ -819,7 +819,7 @@ gsMultiPatch makeElement(const T tw, const T tg, const T tb, const T ts, cons } template -gsMultiPatch makeElement(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) +gsMultiPatch makeElement(const T /* tw */, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) { gsKnotVector kv2(0, 1, 0, 2); @@ -1054,7 +1054,7 @@ gsMultiPatch makeBottom(const T tw, const T tg, const T tb, const T ts, const } template -gsMultiPatch makeBottom(const T tw, const T tg, const T tb, const T ts, const T l, const T a, const std::vector> & curves) +gsMultiPatch makeBottom(const T /* tw */, const T tg, const T /* tb */, const T /* ts */, const T l, const T a, const std::vector> & curves) { gsKnotVector kv2(0, 1, 0, 2); diff --git a/solvers/buckling_shell_multipatch_XML.cpp b/solvers/buckling_shell_multipatch_XML.cpp index d4dd9f6..5c58db1 100644 --- a/solvers/buckling_shell_multipatch_XML.cpp +++ b/solvers/buckling_shell_multipatch_XML.cpp @@ -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 diff --git a/solvers/modal_shell_multipatch_XML.cpp b/solvers/modal_shell_multipatch_XML.cpp index 1a2096c..db7f58e 100644 --- a/solvers/modal_shell_multipatch_XML.cpp +++ b/solvers/modal_shell_multipatch_XML.cpp @@ -355,6 +355,7 @@ 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; } @@ -362,6 +363,7 @@ int main(int argc, char *argv[]) #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; } diff --git a/solvers/quasistatic_shell_multipatch_XML.cpp b/solvers/quasistatic_shell_multipatch_XML.cpp index 6ff2c0c..afba922 100644 --- a/solvers/quasistatic_shell_multipatch_XML.cpp +++ b/solvers/quasistatic_shell_multipatch_XML.cpp @@ -526,6 +526,7 @@ 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; } @@ -533,6 +534,7 @@ int main(int argc, char *argv[]) #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; } diff --git a/solvers/static_shell_multipatch_XML.cpp b/solvers/static_shell_multipatch_XML.cpp index 9d78143..09ba86d 100644 --- a/solvers/static_shell_multipatch_XML.cpp +++ b/solvers/static_shell_multipatch_XML.cpp @@ -542,6 +542,7 @@ 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; } @@ -549,6 +550,7 @@ int main(int argc, char *argv[]) #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; } diff --git a/src/gsALMSolvers/gsALMBase.h b/src/gsALMSolvers/gsALMBase.h index 34fd77d..f7c7ad7 100644 --- a/src/gsALMSolvers/gsALMBase.h +++ b/src/gsALMSolvers/gsALMBase.h @@ -54,7 +54,7 @@ class gsALMBase m_forcing(Force) { m_jacobian = Jacobian; - m_djacobian = [this](gsVector const & x, gsVector const & dx, gsSparseMatrix & m) -> bool + m_djacobian = [this](gsVector const & x, gsVector const & /*dx*/, gsSparseMatrix & m) -> bool { return m_jacobian(x,m); }; @@ -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& DeltaU, const T DeltaL) const + virtual T distance(const gsVector& /*DeltaU*/, const T /*DeltaL*/) const { GISMO_NO_IMPLEMENTATION; } diff --git a/src/gsALMSolvers/gsALMBase.hpp b/src/gsALMSolvers/gsALMBase.hpp index 68b6ad7..cbb8161 100644 --- a/src/gsALMSolvers/gsALMBase.hpp +++ b/src/gsALMSolvers/gsALMBase.hpp @@ -597,6 +597,7 @@ void gsALMBase::_computeStability(const gsVector & x, bool jacobian, T shi // gsEigen::SelfAdjointEigenSolver< gsMatrix > es(m_jacMat); m_stabilityVec = es.eigenvalues(); #else + GISMO_UNUSED(shift); gsEigen::SelfAdjointEigenSolver> es2(m_jacMat); m_stabilityVec = es2.eigenvalues(); #endif diff --git a/src/gsALMSolvers/gsALMRiks.h b/src/gsALMSolvers/gsALMRiks.h index 00c19be..ba5d6fb 100644 --- a/src/gsALMSolvers/gsALMRiks.h +++ b/src/gsALMSolvers/gsALMRiks.h @@ -80,7 +80,7 @@ class gsALMRiks : public gsALMBase public: T distance(const gsVector& 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: diff --git a/src/gsALMSolvers/gsAPALM.h b/src/gsALMSolvers/gsAPALM.h index 396c88a..c9a72b5 100644 --- a/src/gsALMSolvers/gsAPALM.h +++ b/src/gsALMSolvers/gsAPALM.h @@ -128,7 +128,7 @@ class gsAPALM * @param[in] time The parametric time * @param[in] step The step index */ - virtual void serialStepOutput(const std::pair,T> & pair, const T & time, index_t step) {}; + virtual void serialStepOutput(const std::pair,T> & /*pair*/, const T & /*time*/, index_t /*step*/) {}; /** * @brief Output function when performing parallel steps * @@ -136,7 +136,7 @@ class gsAPALM * @param[in] time The parametric time * @param[in] step The step index */ - virtual void parallelStepOutput(const std::pair,T> & pair, const T & time, index_t step) {}; + virtual void parallelStepOutput(const std::pair,T> & /*pair*/, const T & /*time*/, index_t /*step*/) {}; /** * @brief Output function within an interval * @@ -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,T>> & stepSolutions, const std::vector & stepTimes, index_t level, index_t ID) {}; + virtual void parallelIntervalOutput(const std::vector,T>> & /*stepSolutions*/, const std::vector & /*stepTimes*/, index_t /*level*/, index_t /*ID*/) {}; /** * @brief Returns the options diff --git a/src/gsDynamicSolvers/gsDynamicBase.h b/src/gsDynamicSolvers/gsDynamicBase.h index faa1ffc..9f0d818 100644 --- a/src/gsDynamicSolvers/gsDynamicBase.h +++ b/src/gsDynamicSolvers/gsDynamicBase.h @@ -64,11 +64,11 @@ class gsDynamicBase m_stiffness(Stiffness), m_force(Force) { - m_Tmass = [this]( const T time, gsSparseMatrix & result) -> bool {return m_mass(result);}; - m_Tdamping = [this](gsVector const & x, const T time, gsSparseMatrix & result) -> bool {return m_damping(x,result);}; - m_Tjacobian = [this](gsVector const & x, const T time, gsSparseMatrix & result) -> bool {return m_stiffness(result);}; - m_Tforce = [this]( const T time, gsVector & result) -> bool {return m_force(result);}; - m_Tresidual = [ ](gsVector const & x, const T time, gsVector & result) -> bool {GISMO_ERROR("time-dependent residual not available");}; + m_Tmass = [this]( const T /*time*/, gsSparseMatrix & result) -> bool {return m_mass(result);}; + m_Tdamping = [this](gsVector const & x, const T /*time*/, gsSparseMatrix & result) -> bool {return m_damping(x,result);}; + m_Tjacobian = [this](gsVector const & /*x*/, const T /*time*/, gsSparseMatrix & result) -> bool {return m_stiffness(result);}; + m_Tforce = [this]( const T /*time*/, gsVector & result) -> bool {return m_force(result);}; + m_Tresidual = [ ](gsVector const & /*x*/, const T /*time*/, gsVector & /*result*/) -> bool {GISMO_ERROR("time-dependent residual not available");}; _init(); } @@ -85,10 +85,10 @@ class gsDynamicBase m_stiffness(Stiffness), m_Tforce(TForce) { - m_Tmass = [this]( const T time, gsSparseMatrix & result) -> bool {return m_mass(result);}; - m_Tdamping = [this](gsVector const & x, const T time, gsSparseMatrix & result) -> bool {return m_damping(x,result);}; - m_Tjacobian = [this](gsVector const & x, const T time, gsSparseMatrix & result) -> bool {return m_stiffness(result);}; - m_Tresidual = [ ](gsVector const & x, const T time, gsVector & result) -> bool {GISMO_ERROR("time-dependent residual not available");}; + m_Tmass = [this]( const T /*time*/, gsSparseMatrix & result) -> bool {return m_mass(result);}; + m_Tdamping = [this](gsVector const & x, const T /*time*/, gsSparseMatrix & result) -> bool {return m_damping(x,result);}; + m_Tjacobian = [this](gsVector const & /*x*/, const T /*time*/, gsSparseMatrix & result) -> bool {return m_stiffness(result);}; + m_Tresidual = [ ](gsVector const & /*x*/, const T /*time*/, gsVector & /*result*/) -> bool {GISMO_ERROR("time-dependent residual not available");}; _init(); } @@ -105,11 +105,11 @@ class gsDynamicBase m_jacobian(Jacobian), m_residual(Residual) { - m_Tmass = [this]( const T time, gsSparseMatrix & result) -> bool {return m_mass(result);}; - m_Tdamping = [this](gsVector const & x, const T time, gsSparseMatrix & result) -> bool {return m_damping(x,result);}; - m_Tjacobian = [this](gsVector const & x, const T time, gsSparseMatrix & result) -> bool {return m_jacobian(x,result);}; - m_Tforce = [ ]( const T time, gsVector & result) -> bool {GISMO_ERROR("time-dependent force not available");}; - m_Tresidual = [this](gsVector const & x, const T time, gsVector & result) -> bool {return m_residual(x,result);}; + m_Tmass = [this]( const T /*time*/, gsSparseMatrix & result) -> bool {return m_mass(result);}; + m_Tdamping = [this](gsVector const & x, const T /*time*/, gsSparseMatrix & result) -> bool {return m_damping(x,result);}; + m_Tjacobian = [this](gsVector const & x, const T /*time*/, gsSparseMatrix & result) -> bool {return m_jacobian(x,result);}; + m_Tforce = [ ]( const T /*time*/, gsVector & /*result*/) -> bool {GISMO_ERROR("time-dependent force not available");}; + m_Tresidual = [this](gsVector const & x, const T /*time*/, gsVector & result) -> bool {return m_residual(x,result);}; _init(); } @@ -126,9 +126,9 @@ class gsDynamicBase m_jacobian(Jacobian), m_Tresidual(TResidual) { - m_Tmass = [this]( const T time, gsSparseMatrix & result) -> bool {return m_mass(result);}; - m_Tjacobian = [this](gsVector const & x, const T time, gsSparseMatrix & result) -> bool {return m_jacobian(x,result);}; - m_Tdamping = [this](gsVector const & x, const T time, gsSparseMatrix & result) -> bool {return m_damping(x,result);}; + m_Tmass = [this]( const T /*time*/, gsSparseMatrix & result) -> bool {return m_mass(result);}; + m_Tjacobian = [this](gsVector const & x, const T /*time*/, gsSparseMatrix & result) -> bool {return m_jacobian(x,result);}; + m_Tdamping = [this](gsVector const & x, const T /*time*/, gsSparseMatrix & result) -> bool {return m_damping(x,result);}; _init(); } @@ -145,8 +145,8 @@ class gsDynamicBase m_Tjacobian(TJacobian), m_Tresidual(TResidual) { - m_Tmass = [this]( const T time, gsSparseMatrix & result) -> bool {return m_mass(result);}; - m_Tdamping = [this](gsVector const & x, const T time, gsSparseMatrix & result) -> bool {return m_damping(x,result);}; + m_Tmass = [this]( const T /*time*/, gsSparseMatrix & result) -> bool {return m_mass(result);}; + m_Tdamping = [this](gsVector const & x, const T /*time*/, gsSparseMatrix & result) -> bool {return m_damping(x,result);}; _init(); } @@ -246,7 +246,7 @@ class gsDynamicBase virtual void setOptions(gsOptionList options) {m_options.update(options,gsOptionList::addIfUnknown); }; /// 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;}; /// Return the number of degrees of freedom virtual index_t numDofs() {return m_numDofs; } diff --git a/src/gsDynamicSolvers/gsDynamicExplicitEuler.hpp b/src/gsDynamicSolvers/gsDynamicExplicitEuler.hpp index cc8bb46..ad9aa78 100644 --- a/src/gsDynamicSolvers/gsDynamicExplicitEuler.hpp +++ b/src/gsDynamicSolvers/gsDynamicExplicitEuler.hpp @@ -147,7 +147,7 @@ void gsDynamicExplicitEuler::_initOutput() const } template -void gsDynamicExplicitEuler::_stepOutput(const index_t it, const T resnorm, const T updatenorm) const +void gsDynamicExplicitEuler::_stepOutput(const index_t it, const T resnorm, const T /*updatenorm*/) const { if (m_options.getSwitch("Verbose")) { diff --git a/src/gsDynamicSolvers/gsDynamicRK4.hpp b/src/gsDynamicSolvers/gsDynamicRK4.hpp index 7d9dec0..93776a3 100644 --- a/src/gsDynamicSolvers/gsDynamicRK4.hpp +++ b/src/gsDynamicSolvers/gsDynamicRK4.hpp @@ -179,7 +179,7 @@ void gsDynamicRK4::_initOutput() const } template -void gsDynamicRK4::_stepOutput(const index_t it, const T resnorm, const T updatenorm) const +void gsDynamicRK4::_stepOutput(const index_t it, const T resnorm, const T /*updatenorm*/) const { if (m_options.getSwitch("Verbose")) { diff --git a/src/gsEigenSolvers/gsEigenProblemBase.hpp b/src/gsEigenSolvers/gsEigenProblemBase.hpp index afc2cd6..db7d64f 100644 --- a/src/gsEigenSolvers/gsEigenProblemBase.hpp +++ b/src/gsEigenSolvers/gsEigenProblemBase.hpp @@ -74,6 +74,7 @@ gsStatus gsEigenProblemBase::computeSparse(const index_t number) return m_status; } #else + GISMO_UNUSED(number); gsWarn<<"Sparse solver is not implemented without gsSpectra. Please compile gismo with Spectra.\n"; m_status=gsStatus::NotStarted; return gsStatus::NotStarted; diff --git a/src/gsStaticSolvers/gsStaticBase.h b/src/gsStaticSolvers/gsStaticBase.h index 7813db0..488b67b 100644 --- a/src/gsStaticSolvers/gsStaticBase.h +++ b/src/gsStaticSolvers/gsStaticBase.h @@ -60,7 +60,7 @@ class gsStaticBase /// Initialize output virtual void initOutput() {}; /// Stepwise output - virtual void stepOutput(index_t k) {}; + virtual void stepOutput(index_t /*k*/) {}; /// Get default options virtual void defaultOptions() @@ -208,6 +208,7 @@ class gsStaticBase // gsEigen::SelfAdjointEigenSolver< gsMatrix > es(jacMat); m_stabilityVec = es.eigenvalues(); #else + GISMO_UNUSED(shift); gsEigen::SelfAdjointEigenSolver> es2(jacMat); m_stabilityVec = es2.eigenvalues(); #endif diff --git a/src/gsStaticSolvers/gsStaticComposite.hpp b/src/gsStaticSolvers/gsStaticComposite.hpp index b84c3f6..6e53846 100644 --- a/src/gsStaticSolvers/gsStaticComposite.hpp +++ b/src/gsStaticSolvers/gsStaticComposite.hpp @@ -69,7 +69,7 @@ void gsStaticComposite::getOptions() }; template -void gsStaticComposite::setOptions(gsOptionList & options) +void gsStaticComposite::setOptions(gsOptionList & /*options*/) { gsWarn<<"setOptions cannot be used on a gsStaticComposite solver. Call setOptions on each solver individually\n"; }; diff --git a/src/gsStaticSolvers/gsStaticNewton.h b/src/gsStaticSolvers/gsStaticNewton.h index 80ad71f..01a8dbf 100644 --- a/src/gsStaticSolvers/gsStaticNewton.h +++ b/src/gsStaticSolvers/gsStaticNewton.h @@ -78,7 +78,7 @@ class gsStaticNewton : public gsStaticBase m_residualFun(residual), m_ALresidualFun(nullptr) { - m_dnonlinear = [this](gsVector const & x, gsVector const & dx, gsSparseMatrix & m) -> bool + m_dnonlinear = [this](gsVector const & x, gsVector const & /*dx*/, gsSparseMatrix & m) -> bool { return m_nonlinear(x,m); }; @@ -112,7 +112,7 @@ class gsStaticNewton : public gsStaticBase return m_ALresidualFun(x,m_L,result); }; - m_dnonlinear = [this](gsVector const & x, gsVector const & dx, gsSparseMatrix & m) -> bool + m_dnonlinear = [this](gsVector const & x, gsVector const & /*dx*/, gsSparseMatrix & m) -> bool { return m_nonlinear(x,m); }; diff --git a/src/gsStructuralAnalysisTools/gsPanelCreator.hpp b/src/gsStructuralAnalysisTools/gsPanelCreator.hpp index 1a75395..063f955 100644 --- a/src/gsStructuralAnalysisTools/gsPanelCreator.hpp +++ b/src/gsStructuralAnalysisTools/gsPanelCreator.hpp @@ -152,7 +152,7 @@ gsMultiPatch gsPanelCreator::LBeam(T const & Lb, T const & Hw, T const & W result.patch(p).coefs().col(2).array() += z; } - result.addInterface(&result.patch(0),4,&result.patch(1),1); + result.addInterface(0,4,1,1); result.addAutoBoundaries(); @@ -254,7 +254,7 @@ gsMultiPatch gsPanelCreator::PanelL(T const & Lp, T const & Wp, T const & } template -gsMultiPatch gsPanelCreator::PlateGirderL(T const & Lp, T const & Wp, T const & Hwg, T const & Wfg, T const & Hws, T const & Wfs, T const & x, T const & y, T const & z) +gsMultiPatch gsPanelCreator::PlateGirderL(T const & Lp, T const & Wp, T const & Hwg, T const & Wfg, T const & Hws, T const & Wfs, T const & /*x*/, T const & /*y*/, T const & /*z*/) { gsMultiPatch result, tmp;