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/MakeHeader | 26 + 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 + src/functors/functors2D.h | 30 + src/functors/functors2D.hh | 30 + src/functors/functors3D.h | 30 + src/functors/functors3D.hh | 30 + src/functors/genericF.cpp | 43 + src/functors/genericF.h | 92 ++ src/functors/genericF.hh | 107 ++ src/functors/lattice/MakeHeader | 66 + src/functors/lattice/blockAverage3D.cpp | 31 + src/functors/lattice/blockAverage3D.h | 46 + src/functors/lattice/blockAverage3D.hh | 59 + src/functors/lattice/blockBaseF2D.cpp | 50 + src/functors/lattice/blockBaseF2D.h | 140 ++ src/functors/lattice/blockBaseF2D.hh | 195 +++ src/functors/lattice/blockBaseF3D.cpp | 47 + src/functors/lattice/blockBaseF3D.h | 204 +++ src/functors/lattice/blockBaseF3D.hh | 309 ++++ src/functors/lattice/blockCalcF2D.cpp | 50 + src/functors/lattice/blockCalcF2D.h | 97 ++ src/functors/lattice/blockCalcF2D.hh | 148 ++ src/functors/lattice/blockCalcF3D.cpp | 50 + src/functors/lattice/blockCalcF3D.h | 97 ++ src/functors/lattice/blockCalcF3D.hh | 153 ++ src/functors/lattice/blockGeometryFaces3D.cpp | 31 + src/functors/lattice/blockGeometryFaces3D.h | 46 + src/functors/lattice/blockGeometryFaces3D.hh | 97 ++ src/functors/lattice/blockLatticeIntegralF2D.cpp | 43 + src/functors/lattice/blockLatticeIntegralF2D.h | 184 +++ src/functors/lattice/blockLatticeIntegralF2D.hh | 458 ++++++ src/functors/lattice/blockLatticeIntegralF3D.cpp | 37 + src/functors/lattice/blockLatticeIntegralF3D.h | 118 ++ src/functors/lattice/blockLatticeIntegralF3D.hh | 184 +++ src/functors/lattice/blockLatticeLocalF2D.cpp | 51 + src/functors/lattice/blockLatticeLocalF2D.h | 463 ++++++ src/functors/lattice/blockLatticeLocalF2D.hh | 1229 ++++++++++++++++ src/functors/lattice/blockLatticeLocalF3D.cpp | 50 + src/functors/lattice/blockLatticeLocalF3D.h | 587 ++++++++ src/functors/lattice/blockLatticeLocalF3D.hh | 1556 ++++++++++++++++++++ .../lattice/blockLatticeRefinementMetricF2D.cpp | 35 + .../lattice/blockLatticeRefinementMetricF2D.h | 59 + .../lattice/blockLatticeRefinementMetricF2D.hh | 129 ++ src/functors/lattice/blockLocalAverage2D.cpp | 31 + src/functors/lattice/blockLocalAverage2D.h | 66 + src/functors/lattice/blockLocalAverage2D.hh | 94 ++ src/functors/lattice/blockLocalAverage3D.cpp | 31 + src/functors/lattice/blockLocalAverage3D.h | 66 + src/functors/lattice/blockLocalAverage3D.hh | 96 ++ src/functors/lattice/blockMax3D.cpp | 33 + src/functors/lattice/blockMax3D.h | 51 + src/functors/lattice/blockMax3D.hh | 74 + src/functors/lattice/blockMin3D.cpp | 33 + src/functors/lattice/blockMin3D.h | 51 + src/functors/lattice/blockMin3D.hh | 74 + src/functors/lattice/blockReduction2D1D.cpp | 32 + src/functors/lattice/blockReduction2D1D.h | 145 ++ src/functors/lattice/blockReduction2D1D.hh | 253 ++++ src/functors/lattice/blockReduction2D2D.cpp | 32 + src/functors/lattice/blockReduction2D2D.h | 99 ++ src/functors/lattice/blockReduction2D2D.hh | 193 +++ src/functors/lattice/blockReduction3D2D.cpp | 32 + src/functors/lattice/blockReduction3D2D.h | 169 +++ src/functors/lattice/blockReduction3D2D.hh | 278 ++++ src/functors/lattice/functors2D.h | 47 + src/functors/lattice/functors2D.hh | 48 + src/functors/lattice/functors3D.h | 55 + src/functors/lattice/functors3D.hh | 55 + src/functors/lattice/indicator/MakeHeader | 33 + .../lattice/indicator/blockIndicatorBaseF2D.cpp | 32 + .../lattice/indicator/blockIndicatorBaseF2D.h | 87 ++ .../lattice/indicator/blockIndicatorBaseF2D.hh | 87 ++ .../lattice/indicator/blockIndicatorBaseF3D.cpp | 32 + .../lattice/indicator/blockIndicatorBaseF3D.h | 107 ++ .../lattice/indicator/blockIndicatorBaseF3D.hh | 88 ++ .../lattice/indicator/blockIndicatorF2D.cpp | 35 + src/functors/lattice/indicator/blockIndicatorF2D.h | 144 ++ .../lattice/indicator/blockIndicatorF2D.hh | 215 +++ .../lattice/indicator/blockIndicatorF3D.cpp | 35 + src/functors/lattice/indicator/blockIndicatorF3D.h | 140 ++ .../lattice/indicator/blockIndicatorF3D.hh | 228 +++ src/functors/lattice/indicator/indicator2D.h | 32 + src/functors/lattice/indicator/indicator2D.hh | 32 + src/functors/lattice/indicator/indicator3D.h | 32 + src/functors/lattice/indicator/indicator3D.hh | 32 + src/functors/lattice/indicator/module.mk | 27 + .../lattice/indicator/superIndicatorBaseF2D.cpp | 32 + .../lattice/indicator/superIndicatorBaseF2D.h | 95 ++ .../lattice/indicator/superIndicatorBaseF2D.hh | 102 ++ .../lattice/indicator/superIndicatorBaseF3D.cpp | 32 + .../lattice/indicator/superIndicatorBaseF3D.h | 104 ++ .../lattice/indicator/superIndicatorBaseF3D.hh | 102 ++ .../lattice/indicator/superIndicatorF2D.cpp | 34 + src/functors/lattice/indicator/superIndicatorF2D.h | 119 ++ .../lattice/indicator/superIndicatorF2D.hh | 164 +++ .../lattice/indicator/superIndicatorF3D.cpp | 35 + src/functors/lattice/indicator/superIndicatorF3D.h | 129 ++ .../lattice/indicator/superIndicatorF3D.hh | 171 +++ src/functors/lattice/integral/MakeHeader | 37 + src/functors/lattice/integral/blockIntegralF3D.cpp | 35 + src/functors/lattice/integral/blockIntegralF3D.h | 61 + src/functors/lattice/integral/blockIntegralF3D.hh | 117 ++ src/functors/lattice/integral/blockLpNorm2D.cpp | 33 + src/functors/lattice/integral/blockLpNorm2D.h | 53 + src/functors/lattice/integral/blockLpNorm2D.hh | 77 + src/functors/lattice/integral/blockLpNorm3D.cpp | 33 + src/functors/lattice/integral/blockLpNorm3D.h | 50 + src/functors/lattice/integral/blockLpNorm3D.hh | 80 + src/functors/lattice/integral/integral2D.h | 32 + src/functors/lattice/integral/integral2D.hh | 32 + src/functors/lattice/integral/integral3D.h | 34 + src/functors/lattice/integral/integral3D.hh | 34 + .../lattice/integral/latticeIntegralCommon.h | 94 ++ src/functors/lattice/integral/module.mk | 27 + src/functors/lattice/integral/superIntegralF3D.cpp | 35 + src/functors/lattice/integral/superIntegralF3D.h | 95 ++ src/functors/lattice/integral/superIntegralF3D.hh | 200 +++ src/functors/lattice/integral/superLpNorm2D.cpp | 33 + src/functors/lattice/integral/superLpNorm2D.h | 106 ++ src/functors/lattice/integral/superLpNorm2D.hh | 133 ++ src/functors/lattice/integral/superLpNorm3D.cpp | 33 + src/functors/lattice/integral/superLpNorm3D.h | 106 ++ src/functors/lattice/integral/superLpNorm3D.hh | 137 ++ .../lattice/integral/superPlaneIntegralF2D.cpp | 31 + .../lattice/integral/superPlaneIntegralF2D.h | 203 +++ .../lattice/integral/superPlaneIntegralF2D.hh | 222 +++ .../lattice/integral/superPlaneIntegralF3D.cpp | 31 + .../lattice/integral/superPlaneIntegralF3D.h | 279 ++++ .../lattice/integral/superPlaneIntegralF3D.hh | 322 ++++ .../lattice/integral/superPlaneIntegralFluxF2D.cpp | 90 ++ .../lattice/integral/superPlaneIntegralFluxF2D.h | 127 ++ .../lattice/integral/superPlaneIntegralFluxF2D.hh | 191 +++ .../lattice/integral/superPlaneIntegralFluxF3D.cpp | 144 ++ .../lattice/integral/superPlaneIntegralFluxF3D.h | 173 +++ .../lattice/integral/superPlaneIntegralFluxF3D.hh | 317 ++++ .../integral/superPlaneIntegralFluxMass2D.cpp | 31 + .../integral/superPlaneIntegralFluxMass2D.h | 200 +++ .../integral/superPlaneIntegralFluxMass2D.hh | 203 +++ .../integral/superPlaneIntegralFluxMass3D.cpp | 31 + .../integral/superPlaneIntegralFluxMass3D.h | 240 +++ .../integral/superPlaneIntegralFluxMass3D.hh | 249 ++++ src/functors/lattice/latticeFrameChangeF3D.cpp | 33 + src/functors/lattice/latticeFrameChangeF3D.h | 130 ++ src/functors/lattice/latticeFrameChangeF3D.hh | 160 ++ src/functors/lattice/module.mk | 27 + src/functors/lattice/reductionF2D.cpp | 37 + src/functors/lattice/reductionF2D.h | 84 ++ src/functors/lattice/reductionF2D.hh | 90 ++ src/functors/lattice/reductionF3D.cpp | 47 + src/functors/lattice/reductionF3D.h | 223 +++ src/functors/lattice/reductionF3D.hh | 542 +++++++ src/functors/lattice/superAverage3D.cpp | 31 + src/functors/lattice/superAverage3D.h | 74 + src/functors/lattice/superAverage3D.hh | 115 ++ src/functors/lattice/superBaseF2D.cpp | 44 + src/functors/lattice/superBaseF2D.h | 139 ++ src/functors/lattice/superBaseF2D.hh | 150 ++ src/functors/lattice/superBaseF3D.cpp | 46 + src/functors/lattice/superBaseF3D.h | 231 +++ src/functors/lattice/superBaseF3D.hh | 342 +++++ src/functors/lattice/superCalcF2D.cpp | 50 + src/functors/lattice/superCalcF2D.h | 127 ++ src/functors/lattice/superCalcF2D.hh | 257 ++++ src/functors/lattice/superCalcF3D.cpp | 50 + src/functors/lattice/superCalcF3D.h | 130 ++ src/functors/lattice/superCalcF3D.hh | 257 ++++ src/functors/lattice/superConst2D.cpp | 33 + src/functors/lattice/superConst2D.h | 72 + src/functors/lattice/superConst2D.hh | 58 + src/functors/lattice/superConst3D.cpp | 33 + src/functors/lattice/superConst3D.h | 72 + src/functors/lattice/superConst3D.hh | 58 + src/functors/lattice/superErrorNorm2D.cpp | 37 + src/functors/lattice/superErrorNorm2D.h | 94 ++ src/functors/lattice/superErrorNorm2D.hh | 99 ++ src/functors/lattice/superErrorNorm3D.cpp | 37 + src/functors/lattice/superErrorNorm3D.h | 94 ++ src/functors/lattice/superErrorNorm3D.hh | 99 ++ src/functors/lattice/superGeometryFaces3D.cpp | 31 + src/functors/lattice/superGeometryFaces3D.h | 70 + src/functors/lattice/superGeometryFaces3D.hh | 80 + src/functors/lattice/superLatticeIntegralF2D.cpp | 42 + src/functors/lattice/superLatticeIntegralF2D.h | 167 +++ src/functors/lattice/superLatticeIntegralF2D.hh | 346 +++++ src/functors/lattice/superLatticeIntegralF3D.cpp | 36 + src/functors/lattice/superLatticeIntegralF3D.h | 107 ++ src/functors/lattice/superLatticeIntegralF3D.hh | 143 ++ src/functors/lattice/superLatticeLocalF2D.cpp | 49 + src/functors/lattice/superLatticeLocalF2D.h | 375 +++++ src/functors/lattice/superLatticeLocalF2D.hh | 994 +++++++++++++ src/functors/lattice/superLatticeLocalF3D.cpp | 51 + src/functors/lattice/superLatticeLocalF3D.h | 494 +++++++ src/functors/lattice/superLatticeLocalF3D.hh | 1269 ++++++++++++++++ .../lattice/superLatticeRefinementMetricF2D.cpp | 35 + .../lattice/superLatticeRefinementMetricF2D.h | 91 ++ .../lattice/superLatticeRefinementMetricF2D.hh | 142 ++ src/functors/lattice/superLocalAverage2D.cpp | 31 + src/functors/lattice/superLocalAverage2D.h | 63 + src/functors/lattice/superLocalAverage2D.hh | 121 ++ src/functors/lattice/superLocalAverage3D.cpp | 31 + src/functors/lattice/superLocalAverage3D.h | 63 + src/functors/lattice/superLocalAverage3D.hh | 123 ++ src/functors/lattice/superMax3D.cpp | 33 + src/functors/lattice/superMax3D.h | 65 + src/functors/lattice/superMax3D.hh | 117 ++ src/functors/lattice/superMin3D.cpp | 33 + src/functors/lattice/superMin3D.h | 65 + src/functors/lattice/superMin3D.hh | 117 ++ .../timeAveraged/superLatticeTimeAveraged2D.h | 96 ++ .../timeAveraged/superLatticeTimeAveraged2D.hh | 197 +++ .../timeAveraged/superLatticeTimeAveraged3D.h | 96 ++ .../timeAveraged/superLatticeTimeAveraged3D.hh | 209 +++ src/functors/lattice/turbulentF3D.cpp | 40 + src/functors/lattice/turbulentF3D.h | 477 ++++++ src/functors/lattice/turbulentF3D.hh | 1394 ++++++++++++++++++ src/functors/module.mk | 27 + 288 files changed, 40510 insertions(+) create mode 100644 src/functors/MakeHeader 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 create mode 100644 src/functors/functors2D.h create mode 100644 src/functors/functors2D.hh create mode 100644 src/functors/functors3D.h create mode 100644 src/functors/functors3D.hh create mode 100644 src/functors/genericF.cpp create mode 100644 src/functors/genericF.h create mode 100644 src/functors/genericF.hh create mode 100644 src/functors/lattice/MakeHeader create mode 100644 src/functors/lattice/blockAverage3D.cpp create mode 100644 src/functors/lattice/blockAverage3D.h create mode 100644 src/functors/lattice/blockAverage3D.hh create mode 100644 src/functors/lattice/blockBaseF2D.cpp create mode 100644 src/functors/lattice/blockBaseF2D.h create mode 100644 src/functors/lattice/blockBaseF2D.hh create mode 100644 src/functors/lattice/blockBaseF3D.cpp create mode 100644 src/functors/lattice/blockBaseF3D.h create mode 100644 src/functors/lattice/blockBaseF3D.hh create mode 100644 src/functors/lattice/blockCalcF2D.cpp create mode 100644 src/functors/lattice/blockCalcF2D.h create mode 100644 src/functors/lattice/blockCalcF2D.hh create mode 100644 src/functors/lattice/blockCalcF3D.cpp create mode 100644 src/functors/lattice/blockCalcF3D.h create mode 100644 src/functors/lattice/blockCalcF3D.hh create mode 100644 src/functors/lattice/blockGeometryFaces3D.cpp create mode 100644 src/functors/lattice/blockGeometryFaces3D.h create mode 100644 src/functors/lattice/blockGeometryFaces3D.hh create mode 100644 src/functors/lattice/blockLatticeIntegralF2D.cpp create mode 100644 src/functors/lattice/blockLatticeIntegralF2D.h create mode 100644 src/functors/lattice/blockLatticeIntegralF2D.hh create mode 100644 src/functors/lattice/blockLatticeIntegralF3D.cpp create mode 100644 src/functors/lattice/blockLatticeIntegralF3D.h create mode 100644 src/functors/lattice/blockLatticeIntegralF3D.hh create mode 100644 src/functors/lattice/blockLatticeLocalF2D.cpp create mode 100644 src/functors/lattice/blockLatticeLocalF2D.h create mode 100644 src/functors/lattice/blockLatticeLocalF2D.hh create mode 100644 src/functors/lattice/blockLatticeLocalF3D.cpp create mode 100644 src/functors/lattice/blockLatticeLocalF3D.h create mode 100644 src/functors/lattice/blockLatticeLocalF3D.hh create mode 100644 src/functors/lattice/blockLatticeRefinementMetricF2D.cpp create mode 100644 src/functors/lattice/blockLatticeRefinementMetricF2D.h create mode 100644 src/functors/lattice/blockLatticeRefinementMetricF2D.hh create mode 100644 src/functors/lattice/blockLocalAverage2D.cpp create mode 100644 src/functors/lattice/blockLocalAverage2D.h create mode 100644 src/functors/lattice/blockLocalAverage2D.hh create mode 100644 src/functors/lattice/blockLocalAverage3D.cpp create mode 100644 src/functors/lattice/blockLocalAverage3D.h create mode 100644 src/functors/lattice/blockLocalAverage3D.hh create mode 100644 src/functors/lattice/blockMax3D.cpp create mode 100644 src/functors/lattice/blockMax3D.h create mode 100644 src/functors/lattice/blockMax3D.hh create mode 100644 src/functors/lattice/blockMin3D.cpp create mode 100644 src/functors/lattice/blockMin3D.h create mode 100644 src/functors/lattice/blockMin3D.hh create mode 100644 src/functors/lattice/blockReduction2D1D.cpp create mode 100644 src/functors/lattice/blockReduction2D1D.h create mode 100644 src/functors/lattice/blockReduction2D1D.hh create mode 100644 src/functors/lattice/blockReduction2D2D.cpp create mode 100644 src/functors/lattice/blockReduction2D2D.h create mode 100644 src/functors/lattice/blockReduction2D2D.hh create mode 100644 src/functors/lattice/blockReduction3D2D.cpp create mode 100644 src/functors/lattice/blockReduction3D2D.h create mode 100644 src/functors/lattice/blockReduction3D2D.hh create mode 100644 src/functors/lattice/functors2D.h create mode 100644 src/functors/lattice/functors2D.hh create mode 100644 src/functors/lattice/functors3D.h create mode 100644 src/functors/lattice/functors3D.hh create mode 100644 src/functors/lattice/indicator/MakeHeader create mode 100644 src/functors/lattice/indicator/blockIndicatorBaseF2D.cpp create mode 100644 src/functors/lattice/indicator/blockIndicatorBaseF2D.h create mode 100644 src/functors/lattice/indicator/blockIndicatorBaseF2D.hh create mode 100644 src/functors/lattice/indicator/blockIndicatorBaseF3D.cpp create mode 100644 src/functors/lattice/indicator/blockIndicatorBaseF3D.h create mode 100644 src/functors/lattice/indicator/blockIndicatorBaseF3D.hh create mode 100644 src/functors/lattice/indicator/blockIndicatorF2D.cpp create mode 100644 src/functors/lattice/indicator/blockIndicatorF2D.h create mode 100644 src/functors/lattice/indicator/blockIndicatorF2D.hh create mode 100644 src/functors/lattice/indicator/blockIndicatorF3D.cpp create mode 100644 src/functors/lattice/indicator/blockIndicatorF3D.h create mode 100644 src/functors/lattice/indicator/blockIndicatorF3D.hh create mode 100644 src/functors/lattice/indicator/indicator2D.h create mode 100644 src/functors/lattice/indicator/indicator2D.hh create mode 100644 src/functors/lattice/indicator/indicator3D.h create mode 100644 src/functors/lattice/indicator/indicator3D.hh create mode 100644 src/functors/lattice/indicator/module.mk create mode 100644 src/functors/lattice/indicator/superIndicatorBaseF2D.cpp create mode 100644 src/functors/lattice/indicator/superIndicatorBaseF2D.h create mode 100644 src/functors/lattice/indicator/superIndicatorBaseF2D.hh create mode 100644 src/functors/lattice/indicator/superIndicatorBaseF3D.cpp create mode 100644 src/functors/lattice/indicator/superIndicatorBaseF3D.h create mode 100644 src/functors/lattice/indicator/superIndicatorBaseF3D.hh create mode 100644 src/functors/lattice/indicator/superIndicatorF2D.cpp create mode 100644 src/functors/lattice/indicator/superIndicatorF2D.h create mode 100644 src/functors/lattice/indicator/superIndicatorF2D.hh create mode 100644 src/functors/lattice/indicator/superIndicatorF3D.cpp create mode 100644 src/functors/lattice/indicator/superIndicatorF3D.h create mode 100644 src/functors/lattice/indicator/superIndicatorF3D.hh create mode 100644 src/functors/lattice/integral/MakeHeader create mode 100644 src/functors/lattice/integral/blockIntegralF3D.cpp create mode 100644 src/functors/lattice/integral/blockIntegralF3D.h create mode 100644 src/functors/lattice/integral/blockIntegralF3D.hh create mode 100644 src/functors/lattice/integral/blockLpNorm2D.cpp create mode 100644 src/functors/lattice/integral/blockLpNorm2D.h create mode 100644 src/functors/lattice/integral/blockLpNorm2D.hh create mode 100644 src/functors/lattice/integral/blockLpNorm3D.cpp create mode 100644 src/functors/lattice/integral/blockLpNorm3D.h create mode 100644 src/functors/lattice/integral/blockLpNorm3D.hh create mode 100644 src/functors/lattice/integral/integral2D.h create mode 100644 src/functors/lattice/integral/integral2D.hh create mode 100644 src/functors/lattice/integral/integral3D.h create mode 100644 src/functors/lattice/integral/integral3D.hh create mode 100644 src/functors/lattice/integral/latticeIntegralCommon.h create mode 100644 src/functors/lattice/integral/module.mk create mode 100644 src/functors/lattice/integral/superIntegralF3D.cpp create mode 100644 src/functors/lattice/integral/superIntegralF3D.h create mode 100644 src/functors/lattice/integral/superIntegralF3D.hh create mode 100644 src/functors/lattice/integral/superLpNorm2D.cpp create mode 100644 src/functors/lattice/integral/superLpNorm2D.h create mode 100644 src/functors/lattice/integral/superLpNorm2D.hh create mode 100644 src/functors/lattice/integral/superLpNorm3D.cpp create mode 100644 src/functors/lattice/integral/superLpNorm3D.h create mode 100644 src/functors/lattice/integral/superLpNorm3D.hh create mode 100644 src/functors/lattice/integral/superPlaneIntegralF2D.cpp create mode 100644 src/functors/lattice/integral/superPlaneIntegralF2D.h create mode 100644 src/functors/lattice/integral/superPlaneIntegralF2D.hh create mode 100644 src/functors/lattice/integral/superPlaneIntegralF3D.cpp create mode 100644 src/functors/lattice/integral/superPlaneIntegralF3D.h create mode 100644 src/functors/lattice/integral/superPlaneIntegralF3D.hh create mode 100644 src/functors/lattice/integral/superPlaneIntegralFluxF2D.cpp create mode 100644 src/functors/lattice/integral/superPlaneIntegralFluxF2D.h create mode 100644 src/functors/lattice/integral/superPlaneIntegralFluxF2D.hh create mode 100644 src/functors/lattice/integral/superPlaneIntegralFluxF3D.cpp create mode 100644 src/functors/lattice/integral/superPlaneIntegralFluxF3D.h create mode 100644 src/functors/lattice/integral/superPlaneIntegralFluxF3D.hh create mode 100644 src/functors/lattice/integral/superPlaneIntegralFluxMass2D.cpp create mode 100644 src/functors/lattice/integral/superPlaneIntegralFluxMass2D.h create mode 100644 src/functors/lattice/integral/superPlaneIntegralFluxMass2D.hh create mode 100644 src/functors/lattice/integral/superPlaneIntegralFluxMass3D.cpp create mode 100644 src/functors/lattice/integral/superPlaneIntegralFluxMass3D.h create mode 100644 src/functors/lattice/integral/superPlaneIntegralFluxMass3D.hh create mode 100644 src/functors/lattice/latticeFrameChangeF3D.cpp create mode 100644 src/functors/lattice/latticeFrameChangeF3D.h create mode 100644 src/functors/lattice/latticeFrameChangeF3D.hh create mode 100644 src/functors/lattice/module.mk create mode 100644 src/functors/lattice/reductionF2D.cpp create mode 100644 src/functors/lattice/reductionF2D.h create mode 100644 src/functors/lattice/reductionF2D.hh create mode 100644 src/functors/lattice/reductionF3D.cpp create mode 100644 src/functors/lattice/reductionF3D.h create mode 100644 src/functors/lattice/reductionF3D.hh create mode 100644 src/functors/lattice/superAverage3D.cpp create mode 100644 src/functors/lattice/superAverage3D.h create mode 100644 src/functors/lattice/superAverage3D.hh create mode 100644 src/functors/lattice/superBaseF2D.cpp create mode 100644 src/functors/lattice/superBaseF2D.h create mode 100644 src/functors/lattice/superBaseF2D.hh create mode 100644 src/functors/lattice/superBaseF3D.cpp create mode 100644 src/functors/lattice/superBaseF3D.h create mode 100644 src/functors/lattice/superBaseF3D.hh create mode 100644 src/functors/lattice/superCalcF2D.cpp create mode 100644 src/functors/lattice/superCalcF2D.h create mode 100644 src/functors/lattice/superCalcF2D.hh create mode 100644 src/functors/lattice/superCalcF3D.cpp create mode 100644 src/functors/lattice/superCalcF3D.h create mode 100644 src/functors/lattice/superCalcF3D.hh create mode 100644 src/functors/lattice/superConst2D.cpp create mode 100644 src/functors/lattice/superConst2D.h create mode 100644 src/functors/lattice/superConst2D.hh create mode 100644 src/functors/lattice/superConst3D.cpp create mode 100644 src/functors/lattice/superConst3D.h create mode 100644 src/functors/lattice/superConst3D.hh create mode 100644 src/functors/lattice/superErrorNorm2D.cpp create mode 100644 src/functors/lattice/superErrorNorm2D.h create mode 100644 src/functors/lattice/superErrorNorm2D.hh create mode 100644 src/functors/lattice/superErrorNorm3D.cpp create mode 100644 src/functors/lattice/superErrorNorm3D.h create mode 100644 src/functors/lattice/superErrorNorm3D.hh create mode 100644 src/functors/lattice/superGeometryFaces3D.cpp create mode 100644 src/functors/lattice/superGeometryFaces3D.h create mode 100644 src/functors/lattice/superGeometryFaces3D.hh create mode 100644 src/functors/lattice/superLatticeIntegralF2D.cpp create mode 100644 src/functors/lattice/superLatticeIntegralF2D.h create mode 100644 src/functors/lattice/superLatticeIntegralF2D.hh create mode 100644 src/functors/lattice/superLatticeIntegralF3D.cpp create mode 100644 src/functors/lattice/superLatticeIntegralF3D.h create mode 100644 src/functors/lattice/superLatticeIntegralF3D.hh create mode 100644 src/functors/lattice/superLatticeLocalF2D.cpp create mode 100644 src/functors/lattice/superLatticeLocalF2D.h create mode 100644 src/functors/lattice/superLatticeLocalF2D.hh create mode 100644 src/functors/lattice/superLatticeLocalF3D.cpp create mode 100644 src/functors/lattice/superLatticeLocalF3D.h create mode 100644 src/functors/lattice/superLatticeLocalF3D.hh create mode 100644 src/functors/lattice/superLatticeRefinementMetricF2D.cpp create mode 100644 src/functors/lattice/superLatticeRefinementMetricF2D.h create mode 100644 src/functors/lattice/superLatticeRefinementMetricF2D.hh create mode 100644 src/functors/lattice/superLocalAverage2D.cpp create mode 100644 src/functors/lattice/superLocalAverage2D.h create mode 100644 src/functors/lattice/superLocalAverage2D.hh create mode 100644 src/functors/lattice/superLocalAverage3D.cpp create mode 100644 src/functors/lattice/superLocalAverage3D.h create mode 100644 src/functors/lattice/superLocalAverage3D.hh create mode 100644 src/functors/lattice/superMax3D.cpp create mode 100644 src/functors/lattice/superMax3D.h create mode 100644 src/functors/lattice/superMax3D.hh create mode 100644 src/functors/lattice/superMin3D.cpp create mode 100644 src/functors/lattice/superMin3D.h create mode 100644 src/functors/lattice/superMin3D.hh create mode 100644 src/functors/lattice/timeAveraged/superLatticeTimeAveraged2D.h create mode 100644 src/functors/lattice/timeAveraged/superLatticeTimeAveraged2D.hh create mode 100644 src/functors/lattice/timeAveraged/superLatticeTimeAveraged3D.h create mode 100644 src/functors/lattice/timeAveraged/superLatticeTimeAveraged3D.hh create mode 100644 src/functors/lattice/turbulentF3D.cpp create mode 100644 src/functors/lattice/turbulentF3D.h create mode 100644 src/functors/lattice/turbulentF3D.hh create mode 100644 src/functors/module.mk (limited to 'src/functors') diff --git a/src/functors/MakeHeader b/src/functors/MakeHeader new file mode 100644 index 0000000..025ac4d --- /dev/null +++ b/src/functors/MakeHeader @@ -0,0 +1,26 @@ +# This file is part of the OpenLB library +# +# Copyright (C) 2007 Mathias 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. + + +generic := + +precompiled := genericF 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> operator*(std::shared_ptr> lhs, T rhs) +{ + return std::shared_ptr>( + new AnalyticCalcMultiplication1D(std::move(lhs), rhs)); +} + +template +std::shared_ptr> operator*(T lhs, std::shared_ptr> rhs) +{ + return std::shared_ptr>( + new AnalyticCalcMultiplication1D(lhs, std::move(rhs))); +} + +template +std::shared_ptr> operator/(std::shared_ptr> lhs, std::shared_ptr> rhs) +{ + return std::shared_ptr>( + new AnalyticCalcDivision1D(std::move(lhs), std::move(rhs))); +} + +template +std::shared_ptr> operator/(std::shared_ptr> lhs, T rhs) +{ + return std::shared_ptr>( + new AnalyticCalcDivision1D(std::move(lhs), rhs)); +} + +template +std::shared_ptr> operator/(T lhs, std::shared_ptr> rhs) +{ + return std::shared_ptr>( + new AnalyticCalcDivision1D(lhs, std::move(rhs))); +} + +/////////////////////////////////operator()/// //////////////////////////////// +template +AnalyticalF1D& AnalyticalF1D::operator+(AnalyticalF1D& rhs) +{ + auto tmp = std::make_shared< AnalyticCalcPlus1D >(*this,rhs); + this->_ptrCalcC = tmp; + return *tmp; +} + +template +AnalyticalF1D& AnalyticalF1D::operator-(AnalyticalF1D& rhs) +{ + auto tmp = std::make_shared< AnalyticCalcMinus1D >(*this,rhs); + this->_ptrCalcC = tmp; + return *tmp; +} + +template +AnalyticalF1D& AnalyticalF1D::operator*(AnalyticalF1D& rhs) +{ + auto tmp = std::make_shared< AnalyticCalcMultiplication1D >(*this,rhs); + this->_ptrCalcC = tmp; + return *tmp; +} + +template +AnalyticalF1D& AnalyticalF1D::operator/(AnalyticalF1D& rhs) +{ + auto tmp = std::make_shared< AnalyticCalcDivision1D >(*this,rhs); + this->_ptrCalcC = tmp; + return *tmp; +} + + +//////////////////////////////// AnalyticCalcF2D //////////////////////////////// +template class F> +AnalyticCalcF2D::AnalyticCalcF2D(FunctorPtr>&& f, + FunctorPtr>&& g) + : AnalyticalF2D(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"); + // pass through the shared_ptr from the first argument f to the arithmetic class itself. + // used by secsessive calls: e.g. (functorA + functor B) followed by (functorA + functorC) + // the result of the first operation is overwritten by the second. + + // equivalent operations + // std::swap(f._ptrCalcC, this->_ptrCalcC); + // this->_ptrCalcC = f._ptrCalcC; + this->_ptrCalcC.swap(f->_ptrCalcC); + + this->getName() = "(" + _f->getName() + F::symbol + _g->getName() + ")"; +} + +template class F> +AnalyticCalcF2D::AnalyticCalcF2D(T scalar, FunctorPtr>&& g) + : AnalyticCalcF2D( + std::unique_ptr>( + new AnalyticalConst2D(std::vector(g->getTargetDim(), scalar))), + std::forward(g)) +{ } + +template class F> +AnalyticCalcF2D::AnalyticCalcF2D(FunctorPtr>&& f, T scalar) + : AnalyticCalcF2D( + std::forward(f), + std::unique_ptr>( + new AnalyticalConst2D(std::vector(f->getTargetDim(), scalar)))) +{ } + +template class F> +bool AnalyticCalcF2D::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 AnalyticCalcPlus2D(std::move(lhs), std::move(rhs))); +} + +template +std::shared_ptr> operator+(std::shared_ptr> lhs, T rhs) +{ + return std::shared_ptr>( + new AnalyticCalcPlus2D(std::move(lhs), rhs)); +} + +template +std::shared_ptr> operator+(T lhs, std::shared_ptr> rhs) +{ + return std::shared_ptr>( + new AnalyticCalcPlus2D(lhs, std::move(rhs))); +} + +template +std::shared_ptr> operator-(std::shared_ptr> lhs, std::shared_ptr> rhs) +{ + return std::shared_ptr>( + new AnalyticCalcMinus2D(std::move(lhs), std::move(rhs))); +} + +template +std::shared_ptr> operator-(std::shared_ptr> lhs, T rhs) +{ + return std::shared_ptr>( + new AnalyticCalcMinus2D(std::move(lhs), rhs)); +} + +template +std::shared_ptr> operator-(T lhs, std::shared_ptr> rhs) +{ + return std::shared_ptr>( + new AnalyticCalcMinus2D(lhs, std::move(rhs))); +} + +template +std::shared_ptr> operator*(std::shared_ptr> lhs, std::shared_ptr> rhs) +{ + return std::shared_ptr>( + new AnalyticCalcMultiplication2D(std::move(lhs), std::move(rhs))); +} + +template +std::shared_ptr> operator*(std::shared_ptr> lhs, T rhs) +{ + return std::shared_ptr>( + new AnalyticCalcMultiplication2D(std::move(lhs), rhs)); +} + +template +std::shared_ptr> operator*(T lhs, std::shared_ptr> rhs) +{ + return std::shared_ptr>( + new AnalyticCalcMultiplication2D(lhs, std::move(rhs))); +} + +template +std::shared_ptr> operator/(std::shared_ptr> lhs, std::shared_ptr> rhs) +{ + return std::shared_ptr>( + new AnalyticCalcDivision2D(std::move(lhs), std::move(rhs))); +} + +template +std::shared_ptr