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