Skip to content
Snippets Groups Projects
Commit f9d3076f authored by René Fritze's avatar René Fritze
Browse files

Revert "[functioninterface] rewire visualize"

This reverts commit 9ab7afb6a85a422908ff6fbfa454fc140475c149.
no idea wtf I've commited here...
parent 0453229d
No related branches found
No related tags found
No related merge requests found
...@@ -14,41 +14,30 @@ ...@@ -14,41 +14,30 @@
#include <dune/stuff/common/disable_warnings.hh> #include <dune/stuff/common/disable_warnings.hh>
#include <dune/common/fmatrix.hh> #include <dune/common/fmatrix.hh>
#include <dune/common/fvector.hh> #include <dune/common/fvector.hh>
#include <dune/stuff/common/reenable_warnings.hh>
#include <dune/common/dynvector.hh> #include <dune/common/dynvector.hh>
#include <dune/common/version.hh> #include <dune/common/version.hh>
#include <dune/common/deprecated.hh> #include <dune/common/deprecated.hh>
#include <dune/stuff/common/memory.hh>
#include <dune/stuff/common/disable_warnings.hh>
#include <dune/geometry/referenceelements.hh> #include <dune/geometry/referenceelements.hh>
#include <dune/stuff/common/reenable_warnings.hh> #include <dune/geometry/quadraturerules.hh>
#if HAVE_DUNE_GRID #if HAVE_DUNE_GRID
#include <dune/grid/io/file/vtk.hh> #include <dune/grid/io/file/vtk.hh>
#include <dune/stuff/common/filesystem.hh>
#endif #endif
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#include <dune/stuff/common/disable_warnings.hh>
#include <dune/fem/function/common/function.hh> #include <dune/fem/function/common/function.hh>
#include <dune/fem/space/common/functionspace.hh> #include <dune/fem/space/common/functionspace.hh>
#include <dune/stuff/common/reenable_warnings.hh> #endif // HAVE_DUNE_FEM
#endif
#if HAVE_DUNE_PDELAB #if HAVE_DUNE_PDELAB
#include <dune/stuff/common/disable_warnings.hh>
#include <dune/typetree/nodetags.hh> #include <dune/typetree/nodetags.hh>
#include <dune/pdelab/common/function.hh> #include <dune/pdelab/common/function.hh>
#endif // HAVE_DUNE_PDELAB
#include <dune/stuff/common/reenable_warnings.hh> #include <dune/stuff/common/reenable_warnings.hh>
#endif
#if HAVE_DUNE_GEOMETRY #include <dune/stuff/common/memory.hh>
#include <dune/stuff/common/disable_warnings.hh>
#include <dune/geometry/quadraturerules.hh>
#include <dune/stuff/common/reenable_warnings.hh>
#endif
namespace Dune { namespace Dune {
namespace Stuff { namespace Stuff {
...@@ -56,20 +45,33 @@ namespace Functions { ...@@ -56,20 +45,33 @@ namespace Functions {
// forwards, include is below // forwards, include is below
#if HAVE_DUNE_GRID #if HAVE_DUNE_GRID
template <class GridViewType, int dimRange, int dimRangeCols = 1> template <class GridViewType, int dimRange, int dimRangeCols = 1>
class VisualizationAdapter; class VisualizationAdapter;
#endif // HAVE_DUNE_GRID #endif // HAVE_DUNE_GRID
template <class MinuendType, class SubtrahendType> template <class MinuendType, class SubtrahendType>
class Difference; class Difference;
}
template <class LeftSummandType, class RightSummandType>
class Sum;
} // namespace Functions
namespace Tags { namespace Tags {
class LocalizableFunction class LocalizableFunction
{ {
}; };
}
} // namespace Tags
/** /**
...@@ -266,9 +268,8 @@ public: ...@@ -266,9 +268,8 @@ public:
return ret; return ret;
} }
#if HAVE_DUNE_GEOMETRY
//! evaluate at N quadrature points into vector of size >= N //! evaluate at N quadrature points into vector of size >= N
void evaluate(const Dune::QuadratureRule<DomainFieldImp, domainDim>& quadrature, std::vector<RangeType>& ret) void evaluate(const Dune::QuadratureRule<DomainFieldType, dimDomain>& quadrature, std::vector<RangeType>& ret)
{ {
assert(ret.size() >= quadrature.size()); assert(ret.size() >= quadrature.size());
std::size_t i = 0; std::size_t i = 0;
...@@ -277,14 +278,13 @@ public: ...@@ -277,14 +278,13 @@ public:
} }
//! jacobian at N quadrature points into vector of size >= N //! jacobian at N quadrature points into vector of size >= N
void jacobian(const Dune::QuadratureRule<DomainFieldImp, domainDim>& quadrature, std::vector<JacobianRangeType>& ret) void jacobian(const Dune::QuadratureRule<DomainFieldType, dimDomain>& quadrature, std::vector<JacobianRangeType>& ret)
{ {
assert(ret.size() >= quadrature.size()); assert(ret.size() >= quadrature.size());
std::size_t i = 0; std::size_t i = 0;
for (const auto& point : quadrature) for (const auto& point : quadrature)
jacobian(point.position(), ret[i++]); jacobian(point.position(), ret[i++]);
} }
#endif
/* @} */ /* @} */
}; // class LocalfunctionInterface }; // class LocalfunctionInterface
...@@ -321,6 +321,7 @@ public: ...@@ -321,6 +321,7 @@ public:
typedef typename LocalfunctionType::JacobianRangeType JacobianRangeType; typedef typename LocalfunctionType::JacobianRangeType JacobianRangeType;
typedef Functions::Difference<ThisType, ThisType> DifferenceType; typedef Functions::Difference<ThisType, ThisType> DifferenceType;
typedef Functions::Sum<ThisType, ThisType> SumType;
virtual ~LocalizableFunctionInterface() virtual ~LocalizableFunctionInterface()
{ {
...@@ -337,7 +338,7 @@ public: ...@@ -337,7 +338,7 @@ public:
**/ **/
virtual std::unique_ptr<LocalfunctionType> local_function(const EntityType& /*entity*/) const = 0; virtual std::unique_ptr<LocalfunctionType> local_function(const EntityType& /*entity*/) const = 0;
virtual ThisType* copy() const = 0; virtual ThisType* DUNE_DEPRECATED_MSG("Will be removed, does not work (05.09.2014)!") copy() const = 0;
/* @} */ /* @} */
/** \defgroup info ´´These methods should be implemented in order to identify the function.'' */ /** \defgroup info ´´These methods should be implemented in order to identify the function.'' */
...@@ -358,6 +359,11 @@ public: ...@@ -358,6 +359,11 @@ public:
return DifferenceType(*this, other); return DifferenceType(*this, other);
} }
SumType operator+(const ThisType& other) const
{
return SumType(*this, other);
}
#if HAVE_DUNE_GRID #if HAVE_DUNE_GRID
/** /**
* \note We use the SubsamplingVTKWriter (which is better for higher orders) by default. This means that the grid you * \note We use the SubsamplingVTKWriter (which is better for higher orders) by default. This means that the grid you
...@@ -401,9 +407,11 @@ std::ostream& operator<<(std::ostream& out, const LocalizableFunctionInterface<E ...@@ -401,9 +407,11 @@ std::ostream& operator<<(std::ostream& out, const LocalizableFunctionInterface<E
return out; return out;
} // ... operator<<(...) } // ... operator<<(...)
template <class OtherEntityImp, class GlobalFunctionImp> template <class OtherEntityImp, class GlobalFunctionImp>
struct TransferredGlobalFunction; struct TransferredGlobalFunction;
/** /**
* base class for global matrix-valued valued functions that provides automatic local functions via * base class for global matrix-valued valued functions that provides automatic local functions via
* LocalizableFunctionInterface * LocalizableFunctionInterface
...@@ -433,7 +441,7 @@ public: ...@@ -433,7 +441,7 @@ public:
{ {
} }
virtual ThisType* copy() const virtual ThisType* DUNE_DEPRECATED_MSG("Will be removed, does not work (05.09.2014)!") copy() const
{ {
DUNE_THROW(NotImplemented, "not needed, no meaningful default implementation possible -> exception"); DUNE_THROW(NotImplemented, "not needed, no meaningful default implementation possible -> exception");
} }
...@@ -547,7 +555,7 @@ public: ...@@ -547,7 +555,7 @@ public:
{ {
} }
virtual ThisType* copy() const virtual ThisType* DUNE_DEPRECATED_MSG("Will be removed, does not work (05.09.2014)!") copy() const
{ {
DUNE_THROW(NotImplemented, "not needed, no meaningful default implementation possible -> exception"); DUNE_THROW(NotImplemented, "not needed, no meaningful default implementation possible -> exception");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment