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 @@
namespace Dune {
template <int dimension> class MyNonlinearity {
public:
typedef Dune::FieldVector<double, dimension> SmallVector;
typedef Dune::FieldMatrix<double, dimension, dimension> SmallMatrix;
typedef SmallVector VectorType;
typedef SmallMatrix MatrixType;
typedef Dune::FieldVector<double, dimension> VectorType;
typedef Dune::FieldMatrix<double, dimension, dimension> MatrixType;
MyNonlinearity(NiceFunction const &func) : func_(func) {}
......@@ -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 *= 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 *= func_.leftDifferential(x.two_norm()) / x.two_norm();
}
......
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