Skip to content
Snippets Groups Projects
Commit 96c4fac8 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[function.interface] added (optional) EIGEN evaluate() method

parent e985050a
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,10 @@
#include <dune/common/fvector.hh>
#if HAVE_EIGEN
#include <Eigen/Core>
#endif // HAVE_EIGEN
#ifdef HAVE_DUNE_FEM
#include <dune/fem/function/common/function.hh>
#include <dune/fem/space/common/functionspace.hh>
......@@ -35,6 +39,10 @@ public:
virtual void evaluate(const DomainType&, RangeType&) const = 0;
#if HAVE_EIGEN
virtual void evaluate(const Eigen::VectorXd&, Eigen::VectorXd&) const;
#endif // HAVE_EIGEN
RangeType evaluate(const DomainType& arg) const
{
RangeType ret;
......@@ -43,7 +51,7 @@ public:
}
};
#else
#else // HAVE_DUNE_FEM
/**
* \todo This should have been replaced by Dune::Function? Investigate further!
......@@ -66,6 +74,10 @@ public:
virtual void evaluate(const DomainType&, RangeType&) const = 0;
#if HAVE_EIGEN
virtual void evaluate(const Eigen::VectorXd&, Eigen::VectorXd&) const;
#endif // HAVE_EIGEN
RangeType evaluate(const DomainType& arg) const
{
RangeType ret;
......
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