From 94d3e79a8617f88dc0219cfdeedfa3147833719d Mon Sep 17 00:00:00 2001
From: Adrian Kummerlaender
Date: Mon, 24 Jun 2019 14:43:36 +0200
Subject: Initialize at openlb-1-3
---
src/functors/analytical/MakeHeader | 32 +
src/functors/analytical/analyticCalcF.cpp | 73 ++
src/functors/analytical/analyticCalcF.h | 242 +++++
src/functors/analytical/analyticCalcF.hh | 544 ++++++++++
src/functors/analytical/analyticalBaseF.cpp | 53 +
src/functors/analytical/analyticalBaseF.h | 135 +++
src/functors/analytical/analyticalBaseF.hh | 119 ++
src/functors/analytical/analyticalF.cpp | 80 ++
src/functors/analytical/analyticalF.h | 353 ++++++
src/functors/analytical/analyticalF.hh | 630 +++++++++++
src/functors/analytical/frameChangeF2D.cpp | 41 +
src/functors/analytical/frameChangeF2D.h | 171 +++
src/functors/analytical/frameChangeF2D.hh | 297 +++++
src/functors/analytical/frameChangeF3D.cpp | 58 +
src/functors/analytical/frameChangeF3D.h | 521 +++++++++
src/functors/analytical/frameChangeF3D.hh | 1142 ++++++++++++++++++++
src/functors/analytical/fringe2D.h | 129 +++
src/functors/analytical/fringe2D.hh | 85 ++
src/functors/analytical/fringe3D.h | 127 +++
src/functors/analytical/fringe3D.hh | 94 ++
src/functors/analytical/functors2D.h | 35 +
src/functors/analytical/functors2D.hh | 35 +
src/functors/analytical/functors3D.h | 35 +
src/functors/analytical/functors3D.hh | 35 +
src/functors/analytical/indicator/MakeHeader | 37 +
src/functors/analytical/indicator/indicCalc2D.cpp | 56 +
src/functors/analytical/indicator/indicCalc2D.h | 127 +++
src/functors/analytical/indicator/indicCalc2D.hh | 202 ++++
src/functors/analytical/indicator/indicCalc3D.cpp | 50 +
src/functors/analytical/indicator/indicCalc3D.h | 92 ++
src/functors/analytical/indicator/indicCalc3D.hh | 110 ++
src/functors/analytical/indicator/indicator2D.h | 34 +
src/functors/analytical/indicator/indicator2D.hh | 34 +
src/functors/analytical/indicator/indicator3D.h | 34 +
src/functors/analytical/indicator/indicator3D.hh | 35 +
.../analytical/indicator/indicatorBaseF2D.cpp | 35 +
.../analytical/indicator/indicatorBaseF2D.h | 106 ++
.../analytical/indicator/indicatorBaseF2D.hh | 210 ++++
.../analytical/indicator/indicatorBaseF3D.cpp | 34 +
.../analytical/indicator/indicatorBaseF3D.h | 77 ++
.../analytical/indicator/indicatorBaseF3D.hh | 321 ++++++
src/functors/analytical/indicator/indicatorF2D.cpp | 41 +
src/functors/analytical/indicator/indicatorF2D.h | 123 +++
src/functors/analytical/indicator/indicatorF2D.hh | 256 +++++
src/functors/analytical/indicator/indicatorF3D.cpp | 57 +
src/functors/analytical/indicator/indicatorF3D.h | 241 +++++
src/functors/analytical/indicator/indicatorF3D.hh | 731 +++++++++++++
src/functors/analytical/indicator/module.mk | 27 +
.../indicator/smoothIndicatorBaseF2D.cpp | 34 +
.../analytical/indicator/smoothIndicatorBaseF2D.h | 144 +++
.../analytical/indicator/smoothIndicatorBaseF2D.hh | 302 ++++++
.../indicator/smoothIndicatorBaseF3D.cpp | 34 +
.../analytical/indicator/smoothIndicatorBaseF3D.h | 146 +++
.../analytical/indicator/smoothIndicatorBaseF3D.hh | 342 ++++++
.../indicator/smoothIndicatorCalcF2D.cpp | 35 +
.../analytical/indicator/smoothIndicatorCalcF2D.h | 55 +
.../analytical/indicator/smoothIndicatorCalcF2D.hh | 75 ++
.../indicator/smoothIndicatorCalcF3D.cpp | 34 +
.../analytical/indicator/smoothIndicatorCalcF3D.h | 55 +
.../analytical/indicator/smoothIndicatorCalcF3D.hh | 73 ++
.../analytical/indicator/smoothIndicatorF2D.cpp | 39 +
.../analytical/indicator/smoothIndicatorF2D.h | 79 ++
.../analytical/indicator/smoothIndicatorF2D.hh | 239 ++++
.../analytical/indicator/smoothIndicatorF3D.cpp | 40 +
.../analytical/indicator/smoothIndicatorF3D.h | 95 ++
.../analytical/indicator/smoothIndicatorF3D.hh | 439 ++++++++
src/functors/analytical/interpolationF2D.cpp | 34 +
src/functors/analytical/interpolationF2D.h | 78 ++
src/functors/analytical/interpolationF2D.hh | 275 +++++
src/functors/analytical/interpolationF3D.cpp | 35 +
src/functors/analytical/interpolationF3D.h | 91 ++
src/functors/analytical/interpolationF3D.hh | 499 +++++++++
src/functors/analytical/module.mk | 27 +
73 files changed, 11435 insertions(+)
create mode 100644 src/functors/analytical/MakeHeader
create mode 100644 src/functors/analytical/analyticCalcF.cpp
create mode 100644 src/functors/analytical/analyticCalcF.h
create mode 100644 src/functors/analytical/analyticCalcF.hh
create mode 100644 src/functors/analytical/analyticalBaseF.cpp
create mode 100644 src/functors/analytical/analyticalBaseF.h
create mode 100644 src/functors/analytical/analyticalBaseF.hh
create mode 100644 src/functors/analytical/analyticalF.cpp
create mode 100644 src/functors/analytical/analyticalF.h
create mode 100644 src/functors/analytical/analyticalF.hh
create mode 100644 src/functors/analytical/frameChangeF2D.cpp
create mode 100644 src/functors/analytical/frameChangeF2D.h
create mode 100644 src/functors/analytical/frameChangeF2D.hh
create mode 100644 src/functors/analytical/frameChangeF3D.cpp
create mode 100644 src/functors/analytical/frameChangeF3D.h
create mode 100644 src/functors/analytical/frameChangeF3D.hh
create mode 100644 src/functors/analytical/fringe2D.h
create mode 100644 src/functors/analytical/fringe2D.hh
create mode 100644 src/functors/analytical/fringe3D.h
create mode 100644 src/functors/analytical/fringe3D.hh
create mode 100644 src/functors/analytical/functors2D.h
create mode 100644 src/functors/analytical/functors2D.hh
create mode 100644 src/functors/analytical/functors3D.h
create mode 100644 src/functors/analytical/functors3D.hh
create mode 100644 src/functors/analytical/indicator/MakeHeader
create mode 100644 src/functors/analytical/indicator/indicCalc2D.cpp
create mode 100644 src/functors/analytical/indicator/indicCalc2D.h
create mode 100644 src/functors/analytical/indicator/indicCalc2D.hh
create mode 100644 src/functors/analytical/indicator/indicCalc3D.cpp
create mode 100644 src/functors/analytical/indicator/indicCalc3D.h
create mode 100644 src/functors/analytical/indicator/indicCalc3D.hh
create mode 100644 src/functors/analytical/indicator/indicator2D.h
create mode 100644 src/functors/analytical/indicator/indicator2D.hh
create mode 100644 src/functors/analytical/indicator/indicator3D.h
create mode 100644 src/functors/analytical/indicator/indicator3D.hh
create mode 100644 src/functors/analytical/indicator/indicatorBaseF2D.cpp
create mode 100644 src/functors/analytical/indicator/indicatorBaseF2D.h
create mode 100644 src/functors/analytical/indicator/indicatorBaseF2D.hh
create mode 100644 src/functors/analytical/indicator/indicatorBaseF3D.cpp
create mode 100644 src/functors/analytical/indicator/indicatorBaseF3D.h
create mode 100644 src/functors/analytical/indicator/indicatorBaseF3D.hh
create mode 100644 src/functors/analytical/indicator/indicatorF2D.cpp
create mode 100644 src/functors/analytical/indicator/indicatorF2D.h
create mode 100644 src/functors/analytical/indicator/indicatorF2D.hh
create mode 100644 src/functors/analytical/indicator/indicatorF3D.cpp
create mode 100644 src/functors/analytical/indicator/indicatorF3D.h
create mode 100644 src/functors/analytical/indicator/indicatorF3D.hh
create mode 100644 src/functors/analytical/indicator/module.mk
create mode 100644 src/functors/analytical/indicator/smoothIndicatorBaseF2D.cpp
create mode 100644 src/functors/analytical/indicator/smoothIndicatorBaseF2D.h
create mode 100644 src/functors/analytical/indicator/smoothIndicatorBaseF2D.hh
create mode 100644 src/functors/analytical/indicator/smoothIndicatorBaseF3D.cpp
create mode 100644 src/functors/analytical/indicator/smoothIndicatorBaseF3D.h
create mode 100644 src/functors/analytical/indicator/smoothIndicatorBaseF3D.hh
create mode 100644 src/functors/analytical/indicator/smoothIndicatorCalcF2D.cpp
create mode 100644 src/functors/analytical/indicator/smoothIndicatorCalcF2D.h
create mode 100644 src/functors/analytical/indicator/smoothIndicatorCalcF2D.hh
create mode 100644 src/functors/analytical/indicator/smoothIndicatorCalcF3D.cpp
create mode 100644 src/functors/analytical/indicator/smoothIndicatorCalcF3D.h
create mode 100644 src/functors/analytical/indicator/smoothIndicatorCalcF3D.hh
create mode 100644 src/functors/analytical/indicator/smoothIndicatorF2D.cpp
create mode 100644 src/functors/analytical/indicator/smoothIndicatorF2D.h
create mode 100644 src/functors/analytical/indicator/smoothIndicatorF2D.hh
create mode 100644 src/functors/analytical/indicator/smoothIndicatorF3D.cpp
create mode 100644 src/functors/analytical/indicator/smoothIndicatorF3D.h
create mode 100644 src/functors/analytical/indicator/smoothIndicatorF3D.hh
create mode 100644 src/functors/analytical/interpolationF2D.cpp
create mode 100644 src/functors/analytical/interpolationF2D.h
create mode 100644 src/functors/analytical/interpolationF2D.hh
create mode 100644 src/functors/analytical/interpolationF3D.cpp
create mode 100644 src/functors/analytical/interpolationF3D.h
create mode 100644 src/functors/analytical/interpolationF3D.hh
create mode 100644 src/functors/analytical/module.mk
(limited to 'src/functors/analytical')
diff --git a/src/functors/analytical/MakeHeader b/src/functors/analytical/MakeHeader
new file mode 100644
index 0000000..a86fd85
--- /dev/null
+++ b/src/functors/analytical/MakeHeader
@@ -0,0 +1,32 @@
+# This file is part of the OpenLB library
+#
+# Copyright (C) 2017 Adrian Kummerlaender
+# E-mail contact: info@openlb.net
+# The most recent release of OpenLB can be downloaded at
+#
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+
+generic :=
+
+precompiled := analyticalBaseF \
+ analyticalF \
+ analyticCalcF \
+ frameChangeF2D \
+ frameChangeF3D \
+ interpolationF2D \
+ interpolationF3D
diff --git a/src/functors/analytical/analyticCalcF.cpp b/src/functors/analytical/analyticCalcF.cpp
new file mode 100644
index 0000000..7598aca
--- /dev/null
+++ b/src/functors/analytical/analyticCalcF.cpp
@@ -0,0 +1,73 @@
+/* This file is part of the OpenLB library
+ *
+ * Copyright (C) 2011-2013 Lukas Baron, Tim Dornieden, Mathias J. Krause
+ * E-mail contact: info@openlb.net
+ * The most recent release of OpenLB can be downloaded at
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#include "analyticCalcF.h"
+#include "analyticCalcF.hh"
+
+namespace olb {
+
+
+// arithmetic helper class for analytical 1d functors
+
+template class AnalyticCalcF1D;
+template class AnalyticCalcF1D;
+
+template class AnalyticCalcF1D;
+template class AnalyticCalcF1D;
+
+template class AnalyticCalcF1D;
+template class AnalyticCalcF1D;
+
+template class AnalyticCalcF1D;
+template class AnalyticCalcF1D;
+
+// arithmetic helper class for analytical 2d functors
+
+template class AnalyticCalcF2D;
+template class AnalyticCalcF2D;
+
+template class AnalyticCalcF2D;
+template class AnalyticCalcF2D;
+
+template class AnalyticCalcF2D;
+template class AnalyticCalcF2D;
+
+template class AnalyticCalcF2D;
+template class AnalyticCalcF2D;
+
+// arithmetic helper class for analytical 3d functors
+
+template class AnalyticCalcF3D;
+template class AnalyticCalcF3D;
+
+template class AnalyticCalcF3D;
+template class AnalyticCalcF3D;
+
+template class AnalyticCalcF3D;
+template class AnalyticCalcF3D;
+
+template class AnalyticCalcF3D;
+template class AnalyticCalcF3D;
+
+}
+
diff --git a/src/functors/analytical/analyticCalcF.h b/src/functors/analytical/analyticCalcF.h
new file mode 100644
index 0000000..7496292
--- /dev/null
+++ b/src/functors/analytical/analyticCalcF.h
@@ -0,0 +1,242 @@
+/* This file is part of the OpenLB library
+ *
+ * Copyright (C) 2012-2018 Lukas Baron, Tim Dornieden, Mathias J. Krause,
+ * Albert Mink, Adrian Kummerlaender
+ * E-mail contact: info@openlb.net
+ * The most recent release of OpenLB can be downloaded at
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ANALYTICAL_CALC_F_H
+#define ANALYTICAL_CALC_F_H
+
+
+#include "analyticalBaseF.h"
+#include "utilities/functorPtr.h"
+#include "utilities/arithmetic.h"
+
+
+namespace olb {
+
+/*
+ arithmetic helper classes for AnalyticalF1D, AnalyticalF3D, AnalyticalF3D
+
+ pointwise: difference, plus, multiplication, division
+
+*/
+
+//////////////////////////////// AnalyticCalcF1D ////////////////////////////////
+
+/// arithmetic helper class for analytical 1D functors
+template class F>
+class AnalyticCalcF1D : public AnalyticalF1D {
+protected:
+ FunctorPtr> _f;
+ FunctorPtr> _g;
+public:
+ AnalyticCalcF1D(FunctorPtr>&& f,
+ FunctorPtr>&& g);
+
+ AnalyticCalcF1D(T scalar, FunctorPtr>&& g);
+ AnalyticCalcF1D(FunctorPtr>&& f, T scalar);
+
+ bool operator() (T output[], const S input[]) override;
+};
+
+/// addition functor
+template
+using AnalyticCalcPlus1D = AnalyticCalcF1D;
+
+/// subtraction functor
+template
+using AnalyticCalcMinus1D = AnalyticCalcF1D;
+
+/// multiplication functor
+template
+using AnalyticCalcMultiplication1D = AnalyticCalcF1D;
+
+/// division functor
+template
+using AnalyticCalcDivision1D = AnalyticCalcF1D;
+
+//////////////////////////////// AnalyticCalcF2D ////////////////////////////////
+
+/// arithmetic helper class for analytical 2D functors
+template class F>
+class AnalyticCalcF2D : public AnalyticalF2D {
+protected:
+ FunctorPtr> _f;
+ FunctorPtr> _g;
+public:
+ AnalyticCalcF2D(FunctorPtr>&& f,
+ FunctorPtr>&& g);
+
+ AnalyticCalcF2D(T scalar, FunctorPtr>&& g);
+ AnalyticCalcF2D(FunctorPtr>&& f, T scalar);
+
+ bool operator() (T output[], const S input[]) override;
+};
+
+/// addition functor
+template
+using AnalyticCalcPlus2D = AnalyticCalcF2D;
+
+/// subtraction functor
+template
+using AnalyticCalcMinus2D = AnalyticCalcF2D;
+
+/// multiplication functor
+template
+using AnalyticCalcMultiplication2D = AnalyticCalcF2D;
+
+/// division functor
+template
+using AnalyticCalcDivision2D = AnalyticCalcF2D;
+
+//////////////////////////////// AnalyticCalcF3D ////////////////////////////////
+
+/// arithmetic helper class for analytical 3D functors
+template class F>
+class AnalyticCalcF3D : public AnalyticalF3D {
+protected:
+ FunctorPtr> _f;
+ FunctorPtr> _g;
+public:
+ AnalyticCalcF3D(FunctorPtr>&& f,
+ FunctorPtr>&& g);
+
+ AnalyticCalcF3D(T scalar, FunctorPtr>&& g);
+ AnalyticCalcF3D(FunctorPtr>&& f, T scalar);
+
+ bool operator() (T output[], const S input[]) override;
+};
+
+/// addition functor
+template
+using AnalyticCalcPlus3D = AnalyticCalcF3D;
+
+/// subtraction functor
+template
+using AnalyticCalcMinus3D = AnalyticCalcF3D;
+
+/// multiplication functor
+template
+using AnalyticCalcMultiplication3D = AnalyticCalcF3D;
+
+/// division functor
+template
+using AnalyticCalcDivision3D = AnalyticCalcF3D;
+
+
+/**
+ * \name Arithmetic for functors managed by std::shared_ptr
+ * \{
+ **/
+
+template
+std::shared_ptr> operator+(std::shared_ptr> lhs, std::shared_ptr> rhs);
+template
+std::shared_ptr> operator+(std::shared_ptr> lhs, T rhs);
+template
+std::shared_ptr> operator+(T lhs, std::shared_ptr> rhs);
+
+template
+std::shared_ptr> operator-(std::shared_ptr> lhs, std::shared_ptr> rhs);
+template
+std::shared_ptr> operator-(std::shared_ptr> lhs, T rhs);
+template
+std::shared_ptr> operator-(T lhs, std::shared_ptr> rhs);
+
+template
+std::shared_ptr> operator*(std::shared_ptr> lhs, std::shared_ptr> rhs);
+template
+std::shared_ptr> operator*(std::shared_ptr> lhs, T rhs);
+template
+std::shared_ptr> operator*(T lhs, std::shared_ptr> rhs);
+
+template
+std::shared_ptr> operator/(std::shared_ptr> lhs, std::shared_ptr> rhs);
+template
+std::shared_ptr> operator/(std::shared_ptr> lhs, T rhs);
+template
+std::shared_ptr> operator/(T lhs, std::shared_ptr> rhs);
+
+
+template
+std::shared_ptr> operator+(std::shared_ptr> lhs, std::shared_ptr> rhs);
+template
+std::shared_ptr> operator+(std::shared_ptr> lhs, T rhs);
+template
+std::shared_ptr> operator+(T lhs, std::shared_ptr> rhs);
+
+template
+std::shared_ptr> operator-(std::shared_ptr> lhs, std::shared_ptr> rhs);
+template
+std::shared_ptr> operator-(std::shared_ptr> lhs, T rhs);
+template
+std::shared_ptr> operator-(T lhs, std::shared_ptr> rhs);
+
+template
+std::shared_ptr> operator*(std::shared_ptr> lhs, std::shared_ptr> rhs);
+template
+std::shared_ptr> operator*(std::shared_ptr> lhs, T rhs);
+template
+std::shared_ptr> operator*(T lhs, std::shared_ptr> rhs);
+
+template
+std::shared_ptr> operator/(std::shared_ptr> lhs, std::shared_ptr> rhs);
+template
+std::shared_ptr> operator/(std::shared_ptr> lhs, T rhs);
+template
+std::shared_ptr> operator/(T lhs, std::shared_ptr> rhs);
+
+
+template
+std::shared_ptr> operator+(std::shared_ptr> lhs, std::shared_ptr> rhs);
+template
+std::shared_ptr> operator+(std::shared_ptr> lhs, T rhs);
+template
+std::shared_ptr> operator+(T lhs, std::shared_ptr> rhs);
+
+template
+std::shared_ptr> operator-(std::shared_ptr> lhs, std::shared_ptr> rhs);
+template
+std::shared_ptr> operator-(std::shared_ptr> lhs, T rhs);
+template
+std::shared_ptr> operator-(T lhs, std::shared_ptr> rhs);
+
+template
+std::shared_ptr> operator*(std::shared_ptr> lhs, std::shared_ptr> rhs);
+template
+std::shared_ptr> operator*(std::shared_ptr> lhs, T rhs);
+template
+std::shared_ptr> operator*(T lhs, std::shared_ptr> rhs);
+
+template
+std::shared_ptr> operator/(std::shared_ptr> lhs, std::shared_ptr> rhs);
+template
+std::shared_ptr> operator/(std::shared_ptr> lhs, T rhs);
+template
+std::shared_ptr> operator/(T lhs, std::shared_ptr> rhs);
+
+///\}
+
+
+} // end namespace olb
+
+#endif
diff --git a/src/functors/analytical/analyticCalcF.hh b/src/functors/analytical/analyticCalcF.hh
new file mode 100644
index 0000000..bca8f6f
--- /dev/null
+++ b/src/functors/analytical/analyticCalcF.hh
@@ -0,0 +1,544 @@
+/* This file is part of the OpenLB library
+ *
+ * Copyright (C) 2012-2018 Lukas Baron, Tim Dornieden, Mathias J. Krause,
+ * Albert Mink, Adrian Kummerlaender
+ * E-mail contact: info@openlb.net
+ * The most recent release of OpenLB can be downloaded at
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ANALYTICAL_CALC_F_HH
+#define ANALYTICAL_CALC_F_HH
+
+
+#include "analyticCalcF.h"
+#include "analyticalF.h"
+#include "core/olbDebug.h"
+
+namespace olb {
+
+
+
+//////////////////////////////// AnalyticCalcF1D ////////////////////////////////
+template class F>
+AnalyticCalcF1D::AnalyticCalcF1D(FunctorPtr>&& f,
+ FunctorPtr>&& g)
+ : AnalyticalF1D(f->getTargetDim()),
+ _f(std::move(f)),
+ _g(std::move(g))
+{
+ OLB_ASSERT(g->getTargetDim() == f->getTargetDim(),
+ "the dimensions of both functors need to be equal");
+ std::swap(f->_ptrCalcC, this->_ptrCalcC);
+ this->getName() = "(" + _f->getName() + F::symbol + _g->getName() + ")";
+}
+
+template class F>
+AnalyticCalcF1D::AnalyticCalcF1D(T scalar, FunctorPtr>&& g)
+ : AnalyticCalcF1D(
+ std::unique_ptr>(
+ new AnalyticalConst1D(std::vector(g->getTargetDim(), scalar))),
+ std::forward(g))
+{ }
+
+template class F>
+AnalyticCalcF1D::AnalyticCalcF1D(FunctorPtr>&& f, T scalar)
+ : AnalyticCalcF1D(
+ std::forward(f),
+ std::unique_ptr>(
+ new AnalyticalConst1D(std::vector(f->getTargetDim(), scalar))))
+{ }
+
+template class F>
+bool AnalyticCalcF1D::operator()(T output[], const S input[])
+{
+ T outputTmp[this->_g->getTargetDim()];
+ this->_g(outputTmp, input);
+ this->_f(output, input);
+ for (int i = 0; i < this->_f->getTargetDim(); ++i) {
+ output[i] = F()(output[i], outputTmp[i]);
+ }
+ return true;
+}
+
+
+template
+std::shared_ptr> operator+(std::shared_ptr> lhs, std::shared_ptr> rhs)
+{
+ return std::shared_ptr>(
+ new AnalyticCalcPlus1D(std::move(lhs), std::move(rhs)));
+}
+
+template
+std::shared_ptr> operator+(std::shared_ptr> lhs, T rhs)
+{
+ return std::shared_ptr>(
+ new AnalyticCalcPlus1D(std::move(lhs), rhs));
+}
+
+template
+std::shared_ptr> operator+(T lhs, std::shared_ptr> rhs)
+{
+ return std::shared_ptr>(
+ new AnalyticCalcPlus1D(lhs, std::move(rhs)));
+}
+
+template
+std::shared_ptr> operator-(std::shared_ptr> lhs, std::shared_ptr> rhs)
+{
+ return std::shared_ptr>(
+ new AnalyticCalcMinus1D(std::move(lhs), std::move(rhs)));
+}
+
+template
+std::shared_ptr> operator-(std::shared_ptr> lhs, T rhs)
+{
+ return std::shared_ptr>(
+ new AnalyticCalcMinus1D(std::move(lhs), rhs));
+}
+
+template
+std::shared_ptr> operator-(T lhs, std::shared_ptr> rhs)
+{
+ return std::shared_ptr>(
+ new AnalyticCalcMinus1D(lhs, std::move(rhs)));
+}
+
+template
+std::shared_ptr> operator*(std::shared_ptr> lhs, std::shared_ptr> rhs)
+{
+ return std::shared_ptr>(
+ new AnalyticCalcMultiplication1D(std::move(lhs), std::move(rhs)));
+}
+
+template
+std::shared_ptr