summaryrefslogtreecommitdiff
path: root/src/functors/analytical
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-06-24 14:43:36 +0200
committerAdrian Kummerlaender2019-06-24 14:43:36 +0200
commit94d3e79a8617f88dc0219cfdeedfa3147833719d (patch)
treec1a6894679563e271f5c6ea7a17fa3462f7212a3 /src/functors/analytical
downloadgrid_refinement_openlb-94d3e79a8617f88dc0219cfdeedfa3147833719d.tar
grid_refinement_openlb-94d3e79a8617f88dc0219cfdeedfa3147833719d.tar.gz
grid_refinement_openlb-94d3e79a8617f88dc0219cfdeedfa3147833719d.tar.bz2
grid_refinement_openlb-94d3e79a8617f88dc0219cfdeedfa3147833719d.tar.lz
grid_refinement_openlb-94d3e79a8617f88dc0219cfdeedfa3147833719d.tar.xz
grid_refinement_openlb-94d3e79a8617f88dc0219cfdeedfa3147833719d.tar.zst
grid_refinement_openlb-94d3e79a8617f88dc0219cfdeedfa3147833719d.zip
Initialize at openlb-1-3
Diffstat (limited to 'src/functors/analytical')
-rw-r--r--src/functors/analytical/MakeHeader32
-rw-r--r--src/functors/analytical/analyticCalcF.cpp73
-rw-r--r--src/functors/analytical/analyticCalcF.h242
-rw-r--r--src/functors/analytical/analyticCalcF.hh544
-rw-r--r--src/functors/analytical/analyticalBaseF.cpp53
-rw-r--r--src/functors/analytical/analyticalBaseF.h135
-rw-r--r--src/functors/analytical/analyticalBaseF.hh119
-rw-r--r--src/functors/analytical/analyticalF.cpp80
-rw-r--r--src/functors/analytical/analyticalF.h353
-rw-r--r--src/functors/analytical/analyticalF.hh630
-rw-r--r--src/functors/analytical/frameChangeF2D.cpp41
-rw-r--r--src/functors/analytical/frameChangeF2D.h171
-rw-r--r--src/functors/analytical/frameChangeF2D.hh297
-rw-r--r--src/functors/analytical/frameChangeF3D.cpp58
-rw-r--r--src/functors/analytical/frameChangeF3D.h521
-rw-r--r--src/functors/analytical/frameChangeF3D.hh1142
-rw-r--r--src/functors/analytical/fringe2D.h129
-rw-r--r--src/functors/analytical/fringe2D.hh85
-rw-r--r--src/functors/analytical/fringe3D.h127
-rw-r--r--src/functors/analytical/fringe3D.hh94
-rw-r--r--src/functors/analytical/functors2D.h35
-rw-r--r--src/functors/analytical/functors2D.hh35
-rw-r--r--src/functors/analytical/functors3D.h35
-rw-r--r--src/functors/analytical/functors3D.hh35
-rw-r--r--src/functors/analytical/indicator/MakeHeader37
-rw-r--r--src/functors/analytical/indicator/indicCalc2D.cpp56
-rw-r--r--src/functors/analytical/indicator/indicCalc2D.h127
-rw-r--r--src/functors/analytical/indicator/indicCalc2D.hh202
-rw-r--r--src/functors/analytical/indicator/indicCalc3D.cpp50
-rw-r--r--src/functors/analytical/indicator/indicCalc3D.h92
-rw-r--r--src/functors/analytical/indicator/indicCalc3D.hh110
-rw-r--r--src/functors/analytical/indicator/indicator2D.h34
-rw-r--r--src/functors/analytical/indicator/indicator2D.hh34
-rw-r--r--src/functors/analytical/indicator/indicator3D.h34
-rw-r--r--src/functors/analytical/indicator/indicator3D.hh35
-rw-r--r--src/functors/analytical/indicator/indicatorBaseF2D.cpp35
-rw-r--r--src/functors/analytical/indicator/indicatorBaseF2D.h106
-rw-r--r--src/functors/analytical/indicator/indicatorBaseF2D.hh210
-rw-r--r--src/functors/analytical/indicator/indicatorBaseF3D.cpp34
-rw-r--r--src/functors/analytical/indicator/indicatorBaseF3D.h77
-rw-r--r--src/functors/analytical/indicator/indicatorBaseF3D.hh321
-rw-r--r--src/functors/analytical/indicator/indicatorF2D.cpp41
-rw-r--r--src/functors/analytical/indicator/indicatorF2D.h123
-rw-r--r--src/functors/analytical/indicator/indicatorF2D.hh256
-rw-r--r--src/functors/analytical/indicator/indicatorF3D.cpp57
-rw-r--r--src/functors/analytical/indicator/indicatorF3D.h241
-rw-r--r--src/functors/analytical/indicator/indicatorF3D.hh731
-rw-r--r--src/functors/analytical/indicator/module.mk27
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorBaseF2D.cpp34
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorBaseF2D.h144
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorBaseF2D.hh302
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorBaseF3D.cpp34
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorBaseF3D.h146
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorBaseF3D.hh342
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorCalcF2D.cpp35
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorCalcF2D.h55
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorCalcF2D.hh75
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorCalcF3D.cpp34
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorCalcF3D.h55
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorCalcF3D.hh73
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorF2D.cpp39
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorF2D.h79
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorF2D.hh239
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorF3D.cpp40
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorF3D.h95
-rw-r--r--src/functors/analytical/indicator/smoothIndicatorF3D.hh439
-rw-r--r--src/functors/analytical/interpolationF2D.cpp34
-rw-r--r--src/functors/analytical/interpolationF2D.h78
-rw-r--r--src/functors/analytical/interpolationF2D.hh275
-rw-r--r--src/functors/analytical/interpolationF3D.cpp35
-rw-r--r--src/functors/analytical/interpolationF3D.h91
-rw-r--r--src/functors/analytical/interpolationF3D.hh499
-rw-r--r--src/functors/analytical/module.mk27
73 files changed, 11435 insertions, 0 deletions
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
+# <http://www.openlb.net/>
+#
+# 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
+ * <http://www.openlb.net/>
+ *
+ * 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<double,int,util::plus>;
+template class AnalyticCalcF1D<double,double,util::plus>;
+
+template class AnalyticCalcF1D<double,int,util::minus>;
+template class AnalyticCalcF1D<double,double,util::minus>;
+
+template class AnalyticCalcF1D<double,int,util::multiplies>;
+template class AnalyticCalcF1D<double,double,util::multiplies>;
+
+template class AnalyticCalcF1D<double,int,util::divides>;
+template class AnalyticCalcF1D<double,double,util::divides>;
+
+// arithmetic helper class for analytical 2d functors
+
+template class AnalyticCalcF2D<double,int,util::plus>;
+template class AnalyticCalcF2D<double,double,util::plus>;
+
+template class AnalyticCalcF2D<double,int,util::minus>;
+template class AnalyticCalcF2D<double,double,util::minus>;
+
+template class AnalyticCalcF2D<double,int,util::multiplies>;
+template class AnalyticCalcF2D<double,double,util::multiplies>;
+
+template class AnalyticCalcF2D<double,int,util::divides>;
+template class AnalyticCalcF2D<double,double,util::divides>;
+
+// arithmetic helper class for analytical 3d functors
+
+template class AnalyticCalcF3D<double,int,util::plus>;
+template class AnalyticCalcF3D<double,double,util::plus>;
+
+template class AnalyticCalcF3D<double,int,util::minus>;
+template class AnalyticCalcF3D<double,double,util::minus>;
+
+template class AnalyticCalcF3D<double,int,util::multiplies>;
+template class AnalyticCalcF3D<double,double,util::multiplies>;
+
+template class AnalyticCalcF3D<double,int,util::divides>;
+template class AnalyticCalcF3D<double,double,util::divides>;
+
+}
+
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
+ * <http://www.openlb.net/>
+ *
+ * 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 <typename T, typename S, template<typename> class F>
+class AnalyticCalcF1D : public AnalyticalF1D<T,S> {
+protected:
+ FunctorPtr<AnalyticalF1D<T,S>> _f;
+ FunctorPtr<AnalyticalF1D<T,S>> _g;
+public:
+ AnalyticCalcF1D(FunctorPtr<AnalyticalF1D<T,S>>&& f,
+ FunctorPtr<AnalyticalF1D<T,S>>&& g);
+
+ AnalyticCalcF1D(T scalar, FunctorPtr<AnalyticalF1D<T,S>>&& g);
+ AnalyticCalcF1D(FunctorPtr<AnalyticalF1D<T,S>>&& f, T scalar);
+
+ bool operator() (T output[], const S input[]) override;
+};
+
+/// addition functor
+template <typename T, typename S>
+using AnalyticCalcPlus1D = AnalyticCalcF1D<T,S,util::plus>;
+
+/// subtraction functor
+template <typename T, typename S>
+using AnalyticCalcMinus1D = AnalyticCalcF1D<T,S,util::minus>;
+
+/// multiplication functor
+template <typename T, typename S>
+using AnalyticCalcMultiplication1D = AnalyticCalcF1D<T,S,util::multiplies>;
+
+/// division functor
+template <typename T, typename S>
+using AnalyticCalcDivision1D = AnalyticCalcF1D<T,S,util::divides>;
+
+//////////////////////////////// AnalyticCalcF2D ////////////////////////////////
+
+/// arithmetic helper class for analytical 2D functors
+template <typename T, typename S, template<typename> class F>
+class AnalyticCalcF2D : public AnalyticalF2D<T,S> {
+protected:
+ FunctorPtr<AnalyticalF2D<T,S>> _f;
+ FunctorPtr<AnalyticalF2D<T,S>> _g;
+public:
+ AnalyticCalcF2D(FunctorPtr<AnalyticalF2D<T,S>>&& f,
+ FunctorPtr<AnalyticalF2D<T,S>>&& g);
+
+ AnalyticCalcF2D(T scalar, FunctorPtr<AnalyticalF2D<T,S>>&& g);
+ AnalyticCalcF2D(FunctorPtr<AnalyticalF2D<T,S>>&& f, T scalar);
+
+ bool operator() (T output[], const S input[]) override;
+};
+
+/// addition functor
+template <typename T, typename S>
+using AnalyticCalcPlus2D = AnalyticCalcF2D<T,S,util::plus>;
+
+/// subtraction functor
+template <typename T, typename S>
+using AnalyticCalcMinus2D = AnalyticCalcF2D<T,S,util::minus>;
+
+/// multiplication functor
+template <typename T, typename S>
+using AnalyticCalcMultiplication2D = AnalyticCalcF2D<T,S,util::multiplies>;
+
+/// division functor
+template <typename T, typename S>
+using AnalyticCalcDivision2D = AnalyticCalcF2D<T,S,util::divides>;
+
+//////////////////////////////// AnalyticCalcF3D ////////////////////////////////
+
+/// arithmetic helper class for analytical 3D functors
+template <typename T, typename S, template<typename> class F>
+class AnalyticCalcF3D : public AnalyticalF3D<T,S> {
+protected:
+ FunctorPtr<AnalyticalF3D<T,S>> _f;
+ FunctorPtr<AnalyticalF3D<T,S>> _g;
+public:
+ AnalyticCalcF3D(FunctorPtr<AnalyticalF3D<T,S>>&& f,
+ FunctorPtr<AnalyticalF3D<T,S>>&& g);
+
+ AnalyticCalcF3D(T scalar, FunctorPtr<AnalyticalF3D<T,S>>&& g);
+ AnalyticCalcF3D(FunctorPtr<AnalyticalF3D<T,S>>&& f, T scalar);
+
+ bool operator() (T output[], const S input[]) override;
+};
+
+/// addition functor
+template <typename T, typename S>
+using AnalyticCalcPlus3D = AnalyticCalcF3D<T,S,util::plus>;
+
+/// subtraction functor
+template <typename T, typename S>
+using AnalyticCalcMinus3D = AnalyticCalcF3D<T,S,util::minus>;
+
+/// multiplication functor
+template <typename T, typename S>
+using AnalyticCalcMultiplication3D = AnalyticCalcF3D<T,S,util::multiplies>;
+
+/// division functor
+template <typename T, typename S>
+using AnalyticCalcDivision3D = AnalyticCalcF3D<T,S,util::divides>;
+
+
+/**
+ * \name Arithmetic for functors managed by std::shared_ptr
+ * \{
+ **/
+
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF1D<T,S>> operator+(std::shared_ptr<AnalyticalF1D<T,S>> lhs, std::shared_ptr<AnalyticalF1D<T,S>> rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF1D<T,S>> operator+(std::shared_ptr<AnalyticalF1D<T,S>> lhs, T rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF1D<T,S>> operator+(T lhs, std::shared_ptr<AnalyticalF1D<T,S>> rhs);
+
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF1D<T,S>> operator-(std::shared_ptr<AnalyticalF1D<T,S>> lhs, std::shared_ptr<AnalyticalF1D<T,S>> rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF1D<T,S>> operator-(std::shared_ptr<AnalyticalF1D<T,S>> lhs, T rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF1D<T,S>> operator-(T lhs, std::shared_ptr<AnalyticalF1D<T,S>> rhs);
+
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF1D<T,S>> operator*(std::shared_ptr<AnalyticalF1D<T,S>> lhs, std::shared_ptr<AnalyticalF1D<T,S>> rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF1D<T,S>> operator*(std::shared_ptr<AnalyticalF1D<T,S>> lhs, T rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF1D<T,S>> operator*(T lhs, std::shared_ptr<AnalyticalF1D<T,S>> rhs);
+
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF1D<T,S>> operator/(std::shared_ptr<AnalyticalF1D<T,S>> lhs, std::shared_ptr<AnalyticalF1D<T,S>> rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF1D<T,S>> operator/(std::shared_ptr<AnalyticalF1D<T,S>> lhs, T rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF1D<T,S>> operator/(T lhs, std::shared_ptr<AnalyticalF1D<T,S>> rhs);
+
+
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF2D<T,S>> operator+(std::shared_ptr<AnalyticalF2D<T,S>> lhs, std::shared_ptr<AnalyticalF2D<T,S>> rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF2D<T,S>> operator+(std::shared_ptr<AnalyticalF2D<T,S>> lhs, T rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF2D<T,S>> operator+(T lhs, std::shared_ptr<AnalyticalF2D<T,S>> rhs);
+
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF2D<T,S>> operator-(std::shared_ptr<AnalyticalF2D<T,S>> lhs, std::shared_ptr<AnalyticalF2D<T,S>> rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF2D<T,S>> operator-(std::shared_ptr<AnalyticalF2D<T,S>> lhs, T rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF2D<T,S>> operator-(T lhs, std::shared_ptr<AnalyticalF2D<T,S>> rhs);
+
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF2D<T,S>> operator*(std::shared_ptr<AnalyticalF2D<T,S>> lhs, std::shared_ptr<AnalyticalF2D<T,S>> rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF2D<T,S>> operator*(std::shared_ptr<AnalyticalF2D<T,S>> lhs, T rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF2D<T,S>> operator*(T lhs, std::shared_ptr<AnalyticalF2D<T,S>> rhs);
+
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF2D<T,S>> operator/(std::shared_ptr<AnalyticalF2D<T,S>> lhs, std::shared_ptr<AnalyticalF2D<T,S>> rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF2D<T,S>> operator/(std::shared_ptr<AnalyticalF2D<T,S>> lhs, T rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF2D<T,S>> operator/(T lhs, std::shared_ptr<AnalyticalF2D<T,S>> rhs);
+
+
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF3D<T,S>> operator+(std::shared_ptr<AnalyticalF3D<T,S>> lhs, std::shared_ptr<AnalyticalF3D<T,S>> rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF3D<T,S>> operator+(std::shared_ptr<AnalyticalF3D<T,S>> lhs, T rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF3D<T,S>> operator+(T lhs, std::shared_ptr<AnalyticalF3D<T,S>> rhs);
+
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF3D<T,S>> operator-(std::shared_ptr<AnalyticalF3D<T,S>> lhs, std::shared_ptr<AnalyticalF3D<T,S>> rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF3D<T,S>> operator-(std::shared_ptr<AnalyticalF3D<T,S>> lhs, T rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF3D<T,S>> operator-(T lhs, std::shared_ptr<AnalyticalF3D<T,S>> rhs);
+
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF3D<T,S>> operator*(std::shared_ptr<AnalyticalF3D<T,S>> lhs, std::shared_ptr<AnalyticalF3D<T,S>> rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF3D<T,S>> operator*(std::shared_ptr<AnalyticalF3D<T,S>> lhs, T rhs);
+template <typename T, typename S>
+std::shared_ptr<AnalyticalF3D<T,S>> operator*(T lhs, std::shared_ptr<AnalyticalF3D<T,S>> rhs);
+