Commit aded2b58 authored by Carsten Gräser's avatar Carsten Gräser
Browse files

Remove OLD_TNNMG switch

In order to still allow using the old solver, the old style
SumFunctional is now called VintageSumFunctional for transition
parent 6090e399
Pipeline #32287 passed with stage
in 3 minutes and 2 seconds
#ifndef DUNE_TNNMG_FUNCTIONALS_SUMFUNCTIONAL_HH
#define DUNE_TNNMG_FUNCTIONALS_SUMFUNCTIONAL_HH
#ifdef USE_OLD_TNNMG
#include <memory>
#include <dune/common/shared_ptr.hh>
#include "dune/tnnmg/functionals/nonsmoothconvexfunctional.hh"
#else
#include <dune/common/hybridutilities.hh>
#include <dune/common/std/apply.hh>
#endif
#ifndef USE_OLD_TNNMG
namespace Dune {
namespace TNNMG {
......@@ -149,13 +145,12 @@ auto coordinateRestriction(const ShiftedSumFunctional<F...>& f, const Index& i)
} // end namespace TNNMG
} // end namespace Dune
#else
namespace Dune {
namespace TNNMG {
template < class LocalVectorType=Dune::FieldVector<double,1>, class LocalMatrixType=Dune::FieldMatrix<double,1,1> >
class SumFunctional: public NonsmoothConvexFunctional<LocalVectorType, LocalMatrixType>
class VintageSumFunctional: public NonsmoothConvexFunctional<LocalVectorType, LocalMatrixType>
{
public:
typedef NonsmoothConvexFunctional<LocalVectorType, LocalMatrixType> NonlinearityType;
......@@ -166,13 +161,13 @@ namespace Dune {
typedef typename NonlinearityType::MatrixType MatrixType;
typedef typename NonlinearityType::IndexSet IndexSet;
SumFunctional(NonlinearityType& phi, NonlinearityType& psi)
VintageSumFunctional(NonlinearityType& phi, NonlinearityType& psi)
{
phi_ = Dune::stackobject_to_shared_ptr(phi);
psi_ = Dune::stackobject_to_shared_ptr(psi);
}
SumFunctional(std::shared_ptr<NonlinearityType>& phi, std::shared_ptr<NonlinearityType>& psi) :
VintageSumFunctional(std::shared_ptr<NonlinearityType>& phi, std::shared_ptr<NonlinearityType>& psi) :
phi_(phi),
psi_(psi)
{}
......@@ -269,6 +264,5 @@ namespace Dune {
} // namespace TNNMG
} // namespace Dune
#endif
#endif
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