Skip to content
Snippets Groups Projects
Commit 6c189ae2 authored by Patrick Jaap's avatar Patrick Jaap
Browse files

Move deprecated warnings to member variables

Otherwise they get triggert even if the deprecated classes are not used.
Maybe not the best solution, but it will be removed soon anyway.
parent 8b27c630
No related branches found
No related tags found
1 merge request!33Move deprecated warnings to member variables
Pipeline #28497 passed
...@@ -179,7 +179,7 @@ namespace Dune ...@@ -179,7 +179,7 @@ namespace Dune
/** \brief A global FE assembler for variational problems (old fufem bases version) /** \brief A global FE assembler for variational problems (old fufem bases version)
*/ */
template <class Basis, class VectorType > template <class Basis, class VectorType >
class DUNE_DEPRECATED_MSG("dune-elasticity with dune-fufem bases is now deprecated. Use Elasticity::FEAssembler with dune-functions bases.") class
FEAssembler FEAssembler
{ {
...@@ -195,7 +195,8 @@ FEAssembler ...@@ -195,7 +195,8 @@ FEAssembler
typedef Dune::FieldMatrix<double, blocksize, blocksize> MatrixBlock; typedef Dune::FieldMatrix<double, blocksize, blocksize> MatrixBlock;
public: public:
const Basis basis_; const Basis
DUNE_DEPRECATED_MSG("dune-elasticity with dune-fufem bases is now deprecated. Use Elasticity::FEAssembler with dune-functions bases.") basis_;
/** \brief Partition type on which to assemble /** \brief Partition type on which to assemble
* *
......
...@@ -136,7 +136,7 @@ assembleGradientAndHessian(const LocalView& localView, ...@@ -136,7 +136,7 @@ assembleGradientAndHessian(const LocalView& localView,
/** \brief Assembles energy gradient and Hessian with ADOL-C (automatic differentiation) /** \brief Assembles energy gradient and Hessian with ADOL-C (automatic differentiation)
*/ */
template<class GridView, class LocalFiniteElement, class VectorType> template<class GridView, class LocalFiniteElement, class VectorType>
class DUNE_DEPRECATED_MSG("dune-elasticity with dune-fufem bases is now deprecated. Use Elasticity::LocalADOLCStiffness with LocalView concept!") class
LocalADOLCStiffness LocalADOLCStiffness
: public LocalFEStiffness<GridView,LocalFiniteElement,VectorType> : public LocalFEStiffness<GridView,LocalFiniteElement,VectorType>
{ {
...@@ -158,7 +158,7 @@ public: ...@@ -158,7 +158,7 @@ public:
LocalADOLCStiffness(const Dune::LocalEnergy<GridView, LocalFiniteElement, AVectorType>* energy) LocalADOLCStiffness(const Dune::LocalEnergy<GridView, LocalFiniteElement, AVectorType>* energy)
: localEnergy_(energy) : localEnergy_(energy)
{} {} DUNE_DEPRECATED_MSG("dune-elasticity with dune-fufem bases is now deprecated. Use Elasticity::LocalADOLCStiffness with LocalView concept!")
/** \brief Compute the energy at the current configuration */ /** \brief Compute the energy at the current configuration */
virtual RT energy (const Entity& e, virtual RT energy (const Entity& e,
......
...@@ -26,9 +26,11 @@ public: ...@@ -26,9 +26,11 @@ public:
namespace Dune { namespace Dune {
// WARNING: This interface is deprecated and will be removed!
/** \brief Base class for energies defined by integrating over one grid element */ /** \brief Base class for energies defined by integrating over one grid element */
template<class GridView, class LocalFiniteElement, class VectorType> template<class GridView, class LocalFiniteElement, class VectorType>
class DUNE_DEPRECATED_MSG("dune-elasticity with dune-fufem bases is now deprecated. Use Elasticity::LocalEnergy with LocalView concept!") class
LocalEnergy LocalEnergy
{ {
typedef typename VectorType::value_type::field_type RT; typedef typename VectorType::value_type::field_type RT;
......
...@@ -30,7 +30,7 @@ public: ...@@ -30,7 +30,7 @@ public:
template<class GridView, class LocalFiniteElement, class VectorType> template<class GridView, class LocalFiniteElement, class VectorType>
class DUNE_DEPRECATED_MSG("dune-elasticity with dune-fufem bases is now deprecated. Use Elasticity::LocalFEStiffness with LocalView concept!") class
LocalFEStiffness LocalFEStiffness
: public Dune::LocalEnergy<GridView, LocalFiniteElement, VectorType> : public Dune::LocalEnergy<GridView, LocalFiniteElement, VectorType>
{ {
...@@ -55,7 +55,8 @@ public: ...@@ -55,7 +55,8 @@ public:
VectorType& localGradient) = 0; VectorType& localGradient) = 0;
// assembled data // assembled data
Dune::Matrix<Dune::FieldMatrix<RT,blocksize,blocksize> > A_; Dune::Matrix<Dune::FieldMatrix<RT,blocksize,blocksize> >
DUNE_DEPRECATED_MSG("Use dune-functions powerBases with LocalView concept. See Dune::Elasticity::LocalFEStiffness") A_;
}; };
......
...@@ -97,7 +97,7 @@ energy(const LocalView& localView, ...@@ -97,7 +97,7 @@ energy(const LocalView& localView,
namespace Dune { namespace Dune {
template<class GridView, class LocalFiniteElement, class field_type=double> template<class GridView, class LocalFiniteElement, class field_type=double>
class DUNE_DEPRECATED_MSG("Use dune-functions powerBases with LocalView concept. See Elasticity::LocalIntegralEnergy") class
LocalIntegralEnergy LocalIntegralEnergy
: public LocalEnergy<GridView,LocalFiniteElement,std::vector<FieldVector<field_type,GridView::dimension>>> : public LocalEnergy<GridView,LocalFiniteElement,std::vector<FieldVector<field_type,GridView::dimension>>>
{ {
...@@ -125,7 +125,8 @@ public: ...@@ -125,7 +125,8 @@ public:
const std::vector<Dune::FieldVector<field_type,gridDim> >& localConfiguration) const; const std::vector<Dune::FieldVector<field_type,gridDim> >& localConfiguration) const;
protected: protected:
const std::shared_ptr<Elasticity::LocalDensity<gridDim,field_type,DT>> localDensity_ = nullptr; const std::shared_ptr<Elasticity::LocalDensity<gridDim,field_type,DT>>
DUNE_DEPRECATED_MSG("Use dune-functions powerBases with LocalView concept. See Elasticity::LocalIntegralEnergy") localDensity_ = nullptr;
}; };
......
...@@ -98,7 +98,7 @@ private: ...@@ -98,7 +98,7 @@ private:
namespace Dune { namespace Dune {
template<class GridView, class LocalFiniteElement, class field_type=double> template<class GridView, class LocalFiniteElement, class field_type=double>
class DUNE_DEPRECATED_MSG("Use dune-functions powerBases with LocalView concept. See Elasticity::NeumannEnergy") class
NeumannEnergy NeumannEnergy
: public LocalEnergy<GridView,LocalFiniteElement,std::vector<FieldVector<field_type,GridView::dimension> > > : public LocalEnergy<GridView,LocalFiniteElement,std::vector<FieldVector<field_type,GridView::dimension> > >
{ {
...@@ -174,7 +174,8 @@ public: ...@@ -174,7 +174,8 @@ public:
private: private:
/** \brief The Neumann boundary */ /** \brief The Neumann boundary */
const BoundaryPatch<GridView>* neumannBoundary_; const BoundaryPatch<GridView>*
DUNE_DEPRECATED_MSG("Use dune-functions powerBases with LocalView concept. See Elasticity::NeumannEnergy") neumannBoundary_;
/** \brief The function implementing the Neumann data */ /** \brief The function implementing the Neumann data */
const Dune::VirtualFunction<Dune::FieldVector<double,dim>, Dune::FieldVector<double,dim> >* neumannFunction_; const Dune::VirtualFunction<Dune::FieldVector<double,dim>, Dune::FieldVector<double,dim> >* neumannFunction_;
......
...@@ -52,7 +52,7 @@ private: ...@@ -52,7 +52,7 @@ private:
namespace Dune { namespace Dune {
template<class GridView, class LocalFiniteElement, class field_type=double> template<class GridView, class LocalFiniteElement, class field_type=double>
class DUNE_DEPRECATED_MSG("Use dune-functions powerBases with LocalView concept. See Elasticity::SumEnergy") class
SumEnergy SumEnergy
: public LocalEnergy<GridView,LocalFiniteElement,std::vector<Dune::FieldVector<field_type,GridView::dimension> > > : public LocalEnergy<GridView,LocalFiniteElement,std::vector<Dune::FieldVector<field_type,GridView::dimension> > >
{ {
...@@ -85,7 +85,8 @@ public: ...@@ -85,7 +85,8 @@ public:
private: private:
std::shared_ptr<LocalEnergy<GridView,LocalFiniteElement,std::vector<FieldVector<field_type,dim> > > > a_; std::shared_ptr<LocalEnergy<GridView,LocalFiniteElement,std::vector<FieldVector<field_type,dim> > > >
DUNE_DEPRECATED_MSG("Use dune-functions powerBases with LocalView concept. See Elasticity::SumEnergy") a_;
std::shared_ptr<LocalEnergy<GridView,LocalFiniteElement,std::vector<FieldVector<field_type,dim> > > > b_; std::shared_ptr<LocalEnergy<GridView,LocalFiniteElement,std::vector<FieldVector<field_type,dim> > > > b_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment