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

Do away with dummy nonlinearities

parent b75bc87e
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <dune/common/bitsetvector.hh> #include <dune/common/bitsetvector.hh>
#include <dune/tnnmg/problem-classes/bisection.hh> #include <dune/tnnmg/problem-classes/bisection.hh>
#include <dune/tnnmg/problem-classes/nonlinearity.hh>
#include <dune/tnnmg/problem-classes/onedconvexfunction.hh> #include <dune/tnnmg/problem-classes/onedconvexfunction.hh>
#include "mynonlinearity.hh" #include "mynonlinearity.hh"
...@@ -20,7 +19,6 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { ...@@ -20,7 +19,6 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
public: public:
typedef MyConvexProblemTypeTEMPLATE MyConvexProblemType; typedef MyConvexProblemTypeTEMPLATE MyConvexProblemType;
typedef typename MyConvexProblemType::FunctionType FunctionType; typedef typename MyConvexProblemType::FunctionType FunctionType;
typedef typename MyConvexProblemType::NonlinearityType NonlinearityType;
typedef typename MyConvexProblemType::VectorType VectorType; typedef typename MyConvexProblemType::VectorType VectorType;
typedef typename MyConvexProblemType::MatrixType MatrixType; typedef typename MyConvexProblemType::MatrixType MatrixType;
typedef typename MyConvexProblemType::LocalVectorType LocalVectorType; typedef typename MyConvexProblemType::LocalVectorType LocalVectorType;
......
...@@ -3,19 +3,15 @@ ...@@ -3,19 +3,15 @@
#ifndef MY_CONVEX_PROBLEM_HH #ifndef MY_CONVEX_PROBLEM_HH
#define MY_CONVEX_PROBLEM_HH #define MY_CONVEX_PROBLEM_HH
#include <dune/tnnmg/problem-classes/nonlinearity.hh>
/** \brief TODO /** \brief TODO
\tparam NonlinearityTypeTEMPLATE The type used to implement the nonlinearity
\tparam MatrixTypeTEMPLATE The type used for the matrix of the quadratic \tparam MatrixTypeTEMPLATE The type used for the matrix of the quadratic
part part
*/ */
template <class NonlinearityTypeTEMPLATE, class MatrixTypeTEMPLATE, template <class MatrixTypeTEMPLATE, class VectorTypeTEMPLATE,
class VectorTypeTEMPLATE, class FunctionTypeTEMPLATE> class FunctionTypeTEMPLATE>
class MyConvexProblem { class MyConvexProblem {
public: public:
typedef NonlinearityTypeTEMPLATE NonlinearityType;
typedef FunctionTypeTEMPLATE FunctionType; typedef FunctionTypeTEMPLATE FunctionType;
typedef VectorTypeTEMPLATE VectorType; typedef VectorTypeTEMPLATE VectorType;
typedef MatrixTypeTEMPLATE MatrixType; typedef MatrixTypeTEMPLATE MatrixType;
...@@ -27,17 +23,15 @@ class MyConvexProblem { ...@@ -27,17 +23,15 @@ class MyConvexProblem {
/** \brief Constructor with the problem components /** \brief Constructor with the problem components
\param A The matrix of the quadratic part \param A The matrix of the quadratic part
\param phi The nonlinearity
\param f The linear functional \param f The linear functional
\param u The solution vector \param u The solution vector
*/ */
MyConvexProblem(MatrixType const &A, MyConvexProblem(MatrixType const &A,
Dune::MyGlobalNonlinearity<block_size, FunctionType> &newphi, Dune::MyGlobalNonlinearity<block_size, FunctionType> &newphi,
NonlinearityType &phi, VectorType const &f, VectorType &u) VectorType const &f, VectorType &u)
: A(A), newphi(newphi), phi(phi), f(f), u(u) {}; : A(A), newphi(newphi), f(f), u(u) {};
MatrixType const &A; MatrixType const &A;
NonlinearityType &phi;
Dune::MyGlobalNonlinearity<block_size, FunctionType> const &newphi; Dune::MyGlobalNonlinearity<block_size, FunctionType> const &newphi;
VectorType const &f; VectorType const &f;
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
#include <dune/fufem/functionspacebases/p1nodalbasis.hh> #include <dune/fufem/functionspacebases/p1nodalbasis.hh>
#include <dune/tnnmg/iterationsteps/genericnonlineargs.hh> #include <dune/tnnmg/iterationsteps/genericnonlineargs.hh>
#include <dune/tnnmg/problem-classes/nonlinearity.hh>
#include <dune/tnnmg/nonlinearities/zerononlinearity.hh>
#include <dune/solvers/common/numproc.hh> // Solver::FULL #include <dune/solvers/common/numproc.hh> // Solver::FULL
#include <dune/solvers/iterationsteps/blockgsstep.hh> #include <dune/solvers/iterationsteps/blockgsstep.hh>
...@@ -207,14 +205,11 @@ int main() { ...@@ -207,14 +205,11 @@ int main() {
// experiment with convex problems and the like // experiment with convex problems and the like
typedef ZeroNonlinearity<SmallVector, SmallMatrix> NonlinearityType; typedef MyConvexProblem<OperatorType, VectorType, Dune::LinearFunction>
NonlinearityType phi; MyConvexProblemType;
typedef MyConvexProblem<NonlinearityType, OperatorType, VectorType,
Dune::LinearFunction> MyConvexProblemType;
MyConvexProblemType myConvexProblem(stiffnessMatrix, myGlobalNonlinearity, MyConvexProblemType myConvexProblem(stiffnessMatrix, myGlobalNonlinearity,
phi, f, u1); f, u1);
typedef MyBlockProblem<MyConvexProblemType> MyBlockProblemType; typedef MyBlockProblem<MyConvexProblemType> MyBlockProblemType;
MyBlockProblemType myBlockProblem(myConvexProblem); MyBlockProblemType myBlockProblem(myConvexProblem);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment