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

Rename: CurvedFunction -> CircularConvexFunction

parent 30f4c4da
No related branches found
No related tags found
No related merge requests found
#ifndef CURVED_FUNCTION_HH #ifndef CIRCULAR_CONVEX_FUNCTION_HH
#define CURVED_FUNCTION_HH #define CIRCULAR_CONVEX_FUNCTION_HH
#include <cmath> #include <cmath>
#include <dune/fufem/interval.hh> #include <dune/fufem/interval.hh>
namespace Dune { namespace Dune {
template <class NonlinearityType> class CurvedFunction { template <class NonlinearityType> class CircularConvexFunction {
typedef typename NonlinearityType::VectorType VectorType; typedef typename NonlinearityType::VectorType VectorType;
typedef typename NonlinearityType::MatrixType MatrixType; typedef typename NonlinearityType::MatrixType MatrixType;
public: public:
CurvedFunction(MatrixType const &A, VectorType const &b, CircularConvexFunction(MatrixType const &A, VectorType const &b,
NonlinearityType const &phi, VectorType const &x, NonlinearityType const &phi, VectorType const &x,
VectorType const &dir) VectorType const &dir)
: A(A), b(b), phi(phi), x(x), dir(dir) {} : A(A), b(b), phi(phi), x(x), dir(dir) {}
double quadraticPart() const { return 0; } double quadraticPart() const { return 0; }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "mydirectionalconvexfunction.hh" #include "mydirectionalconvexfunction.hh"
#include "localnonlinearity.hh" #include "localnonlinearity.hh"
#include "curvedfunction.hh" #include "circularconvexfunction.hh"
namespace Dune { namespace Dune {
template <int dim> class SampleFunctional { template <int dim> class SampleFunctional {
...@@ -197,7 +197,8 @@ void minimise(Functional const J, typename Functional::SmallVector &x, ...@@ -197,7 +197,8 @@ void minimise(Functional const J, typename Functional::SmallVector &x,
Bisection slowBisection(bisection); Bisection slowBisection(bisection);
slowBisection.setFastQuadratic(false); slowBisection.setFastQuadratic(false);
CurvedFunction<LocalNonlinearityType> JRest(J.A, J.b, *J.phi, x, descDir); CircularConvexFunction<LocalNonlinearityType> JRest(J.A, J.b, *J.phi, x,
descDir);
int count; int count;
double const stepsize = slowBisection.minimize(JRest, 0.0, 1.0, count); double const stepsize = slowBisection.minimize(JRest, 0.0, 1.0, count);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment