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

FiniteScalarIncreasingConvexFunction->NiceFunction

parent 89d10adb
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ noinst_PROGRAMS = \
test_gradient_method_SOURCES = \
test-gradient-method.cc \
mynonlinearity.hh \
finitescalarincreasingconvexfunction.hh \
nicefunction.hh \
samplefunctional.hh
check-am:
......
......@@ -10,7 +10,7 @@
#include <limits>
#include "finitescalarincreasingconvexfunction.hh"
#include "nicefunction.hh"
namespace Dune {
template <int dimension, class OuterFunction = Dune::TrivialFunction>
......
/* -*- mode:c++; mode:semantic -*- */
#ifndef FINITE_SCALAR_INCREASING_CONVEX_FUNCTION_HH
#define FINITE_SCALAR_INCREASING_CONVEX_FUNCTION_HH
#ifndef NICE_FUNCTION_HH
#define NICE_FUNCTION_HH
#include <dune/common/function.hh>
namespace Dune {
class FiniteScalarIncreasingConvexFunction
: public VirtualFunction<double, double> {
class NiceFunction : public VirtualFunction<double, double> {
public:
virtual double leftDifferential(const double s) const = 0;
virtual double rightDifferential(const double s) const = 0;
};
class SampleFunction : public FiniteScalarIncreasingConvexFunction {
class SampleFunction : public NiceFunction {
public:
void evaluate(const double& x, double& y) const {
y = (x < 1) ? x : (2 * x - 1);
......@@ -24,7 +23,7 @@ class SampleFunction : public FiniteScalarIncreasingConvexFunction {
double rightDifferential(const double s) const { return (s < 1) ? 1 : 2; }
};
class TrivialFunction : public FiniteScalarIncreasingConvexFunction {
class TrivialFunction : public NiceFunction {
public:
void evaluate(const double& x, double& y) const { y = 0; }
......
......@@ -11,7 +11,7 @@
#include <dune/tnnmg/problem-classes/directionalconvexfunction.hh>
#include "mynonlinearity.hh"
#include "finitescalarincreasingconvexfunction.hh"
#include "nicefunction.hh"
namespace Dune {
template <int dimension, class Function = TrivialFunction>
......
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