diff --git a/dune/tectonic/globallaursennonlinearity.hh b/dune/tectonic/globallaursennonlinearity.hh index 84e13def8eb777273f72f50d7b1ccef74600c3b6..ff8f303495b3e2a028f9f3590d91a10e16963e99 100644 --- a/dune/tectonic/globallaursennonlinearity.hh +++ b/dune/tectonic/globallaursennonlinearity.hh @@ -13,11 +13,11 @@ #include "nicefunction.hh" namespace Dune { -template <int dimZ, class OuterFunctionType, class VectorType, class MatrixType> +template <class OuterFunctionType, class VectorType, class MatrixType> class GlobalLaursenNonlinearity - : public GlobalNonlinearity<dimZ, VectorType, MatrixType> { + : public GlobalNonlinearity<VectorType, MatrixType> { public: - using GlobalNonlinearity<dimZ, VectorType, MatrixType>::dim; + using GlobalNonlinearity<VectorType, MatrixType>::dim; GlobalLaursenNonlinearity( shared_ptr<BlockVector<FieldVector<double, 1>> const> mu, diff --git a/dune/tectonic/globalnonlinearity.hh b/dune/tectonic/globalnonlinearity.hh index 64e3178cd649a4da7337b953709feeab72b2a1f2..d64d04bd7f0572dd5d15634fcdecbd8dd95c3f13 100644 --- a/dune/tectonic/globalnonlinearity.hh +++ b/dune/tectonic/globalnonlinearity.hh @@ -12,7 +12,7 @@ #include "localnonlinearity.hh" namespace Dune { -template <int dimX, class VectorTypeTEMPLATE, class MatrixTypeTEMPLATE> +template <class VectorTypeTEMPLATE, class MatrixTypeTEMPLATE> class GlobalNonlinearity { public: typedef VectorTypeTEMPLATE VectorType; diff --git a/dune/tectonic/globalruinanonlinearity.hh b/dune/tectonic/globalruinanonlinearity.hh index c42298129358399e35b07818942b573955beb54c..0edc2361b4ef097e7736fff708cf8cb16d7ae1bb 100644 --- a/dune/tectonic/globalruinanonlinearity.hh +++ b/dune/tectonic/globalruinanonlinearity.hh @@ -14,11 +14,11 @@ #include "nicefunction.hh" namespace Dune { -template <int dimX, class VectorType, class MatrixType> +template <class VectorType, class MatrixType> class GlobalRuinaNonlinearity - : public GlobalNonlinearity<dimX, VectorType, MatrixType> { + : public GlobalNonlinearity<VectorType, MatrixType> { public: - using GlobalNonlinearity<dimX, VectorType, MatrixType>::dim; + using GlobalNonlinearity<VectorType, MatrixType>::dim; GlobalRuinaNonlinearity( shared_ptr<BlockVector<FieldVector<double, 1>> const> nodalIntegrals, diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh index 92937712b2a7c2613972ddfa321970721e6e8c76..3ff9d2b6d513e03084abb75caffd43f2e9bf3d45 100644 --- a/dune/tectonic/myblockproblem.hh +++ b/dune/tectonic/myblockproblem.hh @@ -19,7 +19,7 @@ template <int dim, class VectorType, class MatrixType> double computeEnergy( MatrixType const &A, VectorType const &b, - Dune::GlobalNonlinearity<dim, VectorType, MatrixType> const &phi, + Dune::GlobalNonlinearity<VectorType, MatrixType> const &phi, VectorType const &x) { double ret; VectorType tmp(x.size()); @@ -124,8 +124,10 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { */ MyDirectionalConvexFunction< - Dune::GlobalNonlinearity<block_size, VectorType, MatrixType>> const - psi(localA, localb, problem.phi, u, v); + Dune::GlobalNonlinearity<VectorType, MatrixType>> const psi(localA, + localb, + problem.phi, + u, v); Interval<double> D; psi.subDiff(0, D); @@ -199,7 +201,7 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { double const localb = tmp * direction; // <Av,v> MyDirectionalConvexFunction< - Dune::GlobalNonlinearity<block_size, VectorType, MatrixType>> const + Dune::GlobalNonlinearity<VectorType, MatrixType>> const psi(localA, localb, problem.phi, u, direction); Interval<double> D; diff --git a/dune/tectonic/myconvexproblem.hh b/dune/tectonic/myconvexproblem.hh index 48b45d723ca3bfd7278a54bb8879a2e8e38ee6f7..2febf31accefff2bb84ba4c4133c092d972ef338 100644 --- a/dune/tectonic/myconvexproblem.hh +++ b/dune/tectonic/myconvexproblem.hh @@ -21,14 +21,13 @@ class MyConvexProblem { \param f The linear functional \param u The solution vector */ - MyConvexProblem( - MatrixType const &A, - Dune::GlobalNonlinearity<block_size, VectorType, MatrixType> const &phi, - VectorType const &f) + MyConvexProblem(MatrixType const &A, + Dune::GlobalNonlinearity<VectorType, MatrixType> const &phi, + VectorType const &f) : A(A), phi(phi), f(f) {}; MatrixType const &A; - Dune::GlobalNonlinearity<block_size, VectorType, MatrixType> const φ + Dune::GlobalNonlinearity<VectorType, MatrixType> const φ VectorType const &f; }; diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index e0f44bf86e64b492c25269d1e675416f9b61f95f..5ba0d2fedff12b65889e043df14d2d3ed3ab781d 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -139,8 +139,8 @@ void assemble_frictional( template <class VectorType, class MatrixType> void assemble_nonlinearity( int size, Dune::ParameterTree const &parset, - Dune::shared_ptr<Dune::GlobalNonlinearity< - dim, VectorType, MatrixType> const> &myGlobalNonlinearity, + Dune::shared_ptr<Dune::GlobalNonlinearity<VectorType, MatrixType> const> & + myGlobalNonlinearity, Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>> nodalIntegrals) { typedef Dune::BlockVector<Dune::FieldVector<double, 1>> SingletonVectorType; @@ -162,13 +162,12 @@ void assemble_nonlinearity( *eta = parset.get<double>("boundary.friction.eta"); myGlobalNonlinearity = Dune::make_shared< - Dune::GlobalRuinaNonlinearity<dim, VectorType, MatrixType> const>( + Dune::GlobalRuinaNonlinearity<VectorType, MatrixType> const>( nodalIntegrals, a, mu, eta, normalStress); } else if (friction_model == std::string("Laursen")) { - myGlobalNonlinearity = Dune::make_shared< - Dune::GlobalLaursenNonlinearity<dim, Dune::LinearFunction, VectorType, - MatrixType> const>(mu, normalStress, - nodalIntegrals); + myGlobalNonlinearity = Dune::make_shared<Dune::GlobalLaursenNonlinearity< + Dune::LinearFunction, VectorType, MatrixType> const>(mu, normalStress, + nodalIntegrals); } else { assert(false); } @@ -269,8 +268,8 @@ int main(int argc, char *argv[]) { assemble_frictional<GridType, GridView, SmallVector, P1Basis>( leafView, p1Basis, frictionalNodes, *nodalIntegrals); - Dune::shared_ptr<Dune::GlobalNonlinearity< - dim, VectorType, OperatorType> const> myGlobalNonlinearity; + Dune::shared_ptr<Dune::GlobalNonlinearity<VectorType, OperatorType> const> + myGlobalNonlinearity; assemble_nonlinearity<VectorType, OperatorType>( grid.size(grid.maxLevel(), dim), parset, myGlobalNonlinearity, nodalIntegrals);