([&]()
{
using namespace functor_dsl;
auto wantedLatticeF = restrict(wantedF.toShared(), sLattice);
return norm(wantedLatticeF - f.toShared(), indicatorF.toShared())
/ norm
(wantedLatticeF, indicatorF.toShared());
}())
{
this->getName() = "relErrorNormL" + std::to_string(P);
}
template
template
SuperRelativeErrorLpNorm2D::SuperRelativeErrorLpNorm2D(
SuperLatticeF2D& f,
FunctorPtr>&& wantedF,
FunctorPtr>&& indicatorF)
: SuperRelativeErrorLpNorm2D(f.getSuperLattice(),
f,
std::forward(wantedF),
std::forward(indicatorF))
{ }
template
template
SuperAbsoluteErrorLpNorm2D::SuperAbsoluteErrorLpNorm2D(
SuperLattice2D& sLattice,
FunctorPtr>&& f,
FunctorPtr>&& wantedF,
FunctorPtr>&& indicatorF)
: SuperIdentity2D([&]()
{
using namespace functor_dsl;
return norm(restrict(wantedF.toShared(), sLattice) - f.toShared(),
indicatorF.toShared());
}())
{
this->getName() = "absErrorNormL" + std::to_string(P);
}
template
template
SuperAbsoluteErrorLpNorm2D::SuperAbsoluteErrorLpNorm2D(
SuperLatticeF2D& f,
FunctorPtr>&& wantedF,
FunctorPtr>&& indicatorF)
: SuperAbsoluteErrorLpNorm2D(f.getSuperLattice(),
f,
std::forward(wantedF),
std::forward(indicatorF))
{ }
}
#endif