From ad36c0853e0bbae5327cb53c801fe14ca894c991 Mon Sep 17 00:00:00 2001 From: IvBu Date: Wed, 26 Jan 2022 14:43:29 +0100 Subject: [PATCH 1/3] [geomechanics][spatialparams] Add helper header for geomechanics spatialparams. --- dumux/geomechanics/elastic/fvspatialparams.hh | 16 +------- .../poroelastic/fvspatialparams.hh | 2 +- dumux/geomechanics/spatialparamstraits_.hh | 40 +++++++++++++++++++ 3 files changed, 42 insertions(+), 16 deletions(-) create mode 100644 dumux/geomechanics/spatialparamstraits_.hh diff --git a/dumux/geomechanics/elastic/fvspatialparams.hh b/dumux/geomechanics/elastic/fvspatialparams.hh index 73635a6a46..47a994b1e0 100644 --- a/dumux/geomechanics/elastic/fvspatialparams.hh +++ b/dumux/geomechanics/elastic/fvspatialparams.hh @@ -30,24 +30,10 @@ #include #include +#include namespace Dumux { -#ifndef DOXYGEN -namespace Detail { -// helper struct detecting if the user-defined spatial params class has a lameParamsAtPos function -template -struct hasLameParamsAtPos -{ - template - auto operator()(const SpatialParams& a) - -> decltype(a.lameParamsAtPos(std::declval())) - {} -}; - -} // end namespace Detail -#endif - /*! * \ingroup SpatialParameters * \brief The base class for spatial parameters of linear elastic geomechanical problems diff --git a/dumux/geomechanics/poroelastic/fvspatialparams.hh b/dumux/geomechanics/poroelastic/fvspatialparams.hh index 4805c4d59d..525bcf846a 100644 --- a/dumux/geomechanics/poroelastic/fvspatialparams.hh +++ b/dumux/geomechanics/poroelastic/fvspatialparams.hh @@ -27,8 +27,8 @@ #include #include -#include // for some helpers in detail namespace #include +#include namespace Dumux { diff --git a/dumux/geomechanics/spatialparamstraits_.hh b/dumux/geomechanics/spatialparamstraits_.hh new file mode 100644 index 0000000000..2de6580492 --- /dev/null +++ b/dumux/geomechanics/spatialparamstraits_.hh @@ -0,0 +1,40 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * + *****************************************************************************/ +#ifndef DUMUX_GEOMECHANICS_SPATIAL_PARAMS_HELPER_HH +#define DUMUX_GEOMECHANICS_SPATIAL_PARAMS_HELPER_HH + +namespace Dumux { + +#ifndef DOXYGEN +namespace Detail { +// helper struct detecting if the user-defined spatial params class has a lameParamsAtPos function +template +struct hasLameParamsAtPos +{ + template + auto operator()(const SpatialParams& a) + -> decltype(a.lameParamsAtPos(std::declval())) + {} +}; + +} // end namespace Detail +#endif + +} // end namespace Dumux +#endif -- GitLab From 6ad6e602aee7e1a2b964dc1d74b887f70f1e85ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Gl=C3=A4ser?= Date: Wed, 26 Jan 2022 19:00:35 +0100 Subject: [PATCH 2/3] [doxygen] exclude detail headers --- doc/doxygen/Doxylocal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/doxygen/Doxylocal b/doc/doxygen/Doxylocal index 7d55fb5f57..a87ad9bf69 100644 --- a/doc/doxygen/Doxylocal +++ b/doc/doxygen/Doxylocal @@ -29,7 +29,7 @@ HTML_FILE_EXTENSION = .xhtml USE_MATHJAX = YES -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = *_.hh ALIASES += "warning=\xrefitem warning \"Warning List\" \"Warning List\"" -- GitLab From 6b396d4d71b4556fa13314fe22c628c3058bcb29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Gl=C3=A4ser?= Date: Wed, 26 Jan 2022 19:02:51 +0100 Subject: [PATCH 3/3] [geomechanics][sptraits] minor cleanup --- dumux/geomechanics/spatialparamstraits_.hh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/dumux/geomechanics/spatialparamstraits_.hh b/dumux/geomechanics/spatialparamstraits_.hh index 2de6580492..9f50cff096 100644 --- a/dumux/geomechanics/spatialparamstraits_.hh +++ b/dumux/geomechanics/spatialparamstraits_.hh @@ -16,13 +16,12 @@ * You should have received a copy of the GNU General Public License * * along with this program. If not, see . * *****************************************************************************/ -#ifndef DUMUX_GEOMECHANICS_SPATIAL_PARAMS_HELPER_HH -#define DUMUX_GEOMECHANICS_SPATIAL_PARAMS_HELPER_HH +#ifndef DUMUX_GEOMECHANICS_SPATIAL_PARAMS_TRAITS__HH +#define DUMUX_GEOMECHANICS_SPATIAL_PARAMS_TRAITS__HH +#ifndef DOXYGEN -namespace Dumux { +namespace Dumux::Detail { -#ifndef DOXYGEN -namespace Detail { // helper struct detecting if the user-defined spatial params class has a lameParamsAtPos function template struct hasLameParamsAtPos @@ -33,8 +32,6 @@ struct hasLameParamsAtPos {} }; -} // end namespace Detail -#endif - -} // end namespace Dumux +} // end namespace Dumux::Detail +#endif // DOXYGEN #endif -- GitLab