-
Elias Pipping authoredElias Pipping authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
myconvexproblem.hh 1.23 KiB
// Based on dune/tnnmg/problem-classes/convexproblem.hh
#include <dune/tectonic/globalnonlinearity.hh>
#ifndef MY_CONVEX_PROBLEM_HH
#define MY_CONVEX_PROBLEM_HH
/** \brief TODO
\tparam MatrixTypeTEMPLATE The type used for the matrix of the quadratic
part
*/
template <class MatrixTypeTEMPLATE, class VectorTypeTEMPLATE,
class FunctionTypeTEMPLATE>
class MyConvexProblem {
public:
typedef FunctionTypeTEMPLATE FunctionType;
typedef VectorTypeTEMPLATE VectorType;
typedef MatrixTypeTEMPLATE MatrixType;
typedef typename VectorType::block_type LocalVectorType;
typedef typename MatrixType::block_type LocalMatrixType;
static const int block_size = VectorType::block_type::dimension;
/** \brief Constructor with the problem components
\param A The matrix of the quadratic part
\param f The linear functional
\param u The solution vector
*/
MyConvexProblem(MatrixType const &A,
Dune::GlobalNonlinearity<block_size, FunctionType> &newphi,
VectorType const &f, VectorType &u)
: A(A), newphi(newphi), f(f), u(u) {};
MatrixType const &A;
Dune::GlobalNonlinearity<block_size, FunctionType> const &newphi;
VectorType const &f;
VectorType &u;
};
#endif