Skip to content
Snippets Groups Projects
Commit 5e8f6610 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Drop obsolete template parameter

parent 306881e7
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
......@@ -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;
......
......@@ -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,
......
......@@ -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;
......
......@@ -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 &phi;
Dune::GlobalNonlinearity<VectorType, MatrixType> const &phi;
VectorType const &f;
};
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment