Commit fd0913ca authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

Merge branch 'fix/deprecations' into 'master'

Move deprecated warnings to member variables

See merge request agnumpde/dune-elasticity!33
parents 8b27c630 6c189ae2
......@@ -179,7 +179,7 @@ namespace Dune
/** \brief A global FE assembler for variational problems (old fufem bases version)
*/
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
{
......@@ -195,7 +195,8 @@ FEAssembler
typedef Dune::FieldMatrix<double, blocksize, blocksize> MatrixBlock;
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
*
......
......@@ -136,7 +136,7 @@ assembleGradientAndHessian(const LocalView& localView,
/** \brief Assembles energy gradient and Hessian with ADOL-C (automatic differentiation)
*/
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
: public LocalFEStiffness<GridView,LocalFiniteElement,VectorType>
{
......@@ -158,7 +158,7 @@ public:
LocalADOLCStiffness(const Dune::LocalEnergy<GridView, LocalFiniteElement, AVectorType>* 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 */
virtual RT energy (const Entity& e,
......
......@@ -26,9 +26,11 @@ public:
namespace Dune {
// WARNING: This interface is deprecated and will be removed!
/** \brief Base class for energies defined by integrating over one grid element */
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
{
typedef typename VectorType::value_type::field_type RT;
......
......@@ -30,7 +30,7 @@ public:
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
: public Dune::LocalEnergy<GridView, LocalFiniteElement, VectorType>
{
......@@ -55,7 +55,8 @@ public:
VectorType& localGradient) = 0;
// 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,
namespace Dune {
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
: public LocalEnergy<GridView,LocalFiniteElement,std::vector<FieldVector<field_type,GridView::dimension>>>
{
......@@ -125,7 +125,8 @@ public:
const std::vector<Dune::FieldVector<field_type,gridDim> >& localConfiguration) const;
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:
namespace Dune {
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
: public LocalEnergy<GridView,LocalFiniteElement,std::vector<FieldVector<field_type,GridView::dimension> > >
{
......@@ -174,7 +174,8 @@ public:
private:
/** \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 */
const Dune::VirtualFunction<Dune::FieldVector<double,dim>, Dune::FieldVector<double,dim> >* neumannFunction_;
......
......@@ -52,7 +52,7 @@ private:
namespace Dune {
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
: public LocalEnergy<GridView,LocalFiniteElement,std::vector<Dune::FieldVector<field_type,GridView::dimension> > >
{
......@@ -85,7 +85,8 @@ public:
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_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment