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

Do not use Small* in the MyNonlinearity class

parent 8de78cf3
No related branches found
No related tags found
No related merge requests found
...@@ -15,11 +15,8 @@ ...@@ -15,11 +15,8 @@
namespace Dune { namespace Dune {
template <int dimension> class MyNonlinearity { template <int dimension> class MyNonlinearity {
public: public:
typedef Dune::FieldVector<double, dimension> SmallVector; typedef Dune::FieldVector<double, dimension> VectorType;
typedef Dune::FieldMatrix<double, dimension, dimension> SmallMatrix; typedef Dune::FieldMatrix<double, dimension, dimension> MatrixType;
typedef SmallVector VectorType;
typedef SmallMatrix MatrixType;
MyNonlinearity(NiceFunction const &func) : func_(func) {} MyNonlinearity(NiceFunction const &func) : func_(func) {}
...@@ -49,12 +46,12 @@ template <int dimension> class MyNonlinearity { ...@@ -49,12 +46,12 @@ template <int dimension> class MyNonlinearity {
} }
} }
void upperGradient(const SmallVector x, SmallVector &ret) const { void upperGradient(const VectorType x, VectorType &ret) const {
ret = x; ret = x;
ret *= func_.rightDifferential(x.two_norm()) / x.two_norm(); ret *= func_.rightDifferential(x.two_norm()) / x.two_norm();
} }
void lowerGradient(const SmallVector x, SmallVector &ret) const { void lowerGradient(const VectorType x, VectorType &ret) const {
ret = x; ret = x;
ret *= func_.leftDifferential(x.two_norm()) / x.two_norm(); ret *= func_.leftDifferential(x.two_norm()) / x.two_norm();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment