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/interpolationF3D.h | 91 ++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 src/functors/analytical/interpolationF3D.h (limited to 'src/functors/analytical/interpolationF3D.h') diff --git a/src/functors/analytical/interpolationF3D.h b/src/functors/analytical/interpolationF3D.h new file mode 100644 index 0000000..3f06161 --- /dev/null +++ b/src/functors/analytical/interpolationF3D.h @@ -0,0 +1,91 @@ +/* This file is part of the OpenLB library + * + * Copyright (C) 2012-2017 Lukas Baron, Tim Dornieden, Mathias J. Krause, + * Albert Mink, Benjamin Förster, 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 INTERPOLATION_F_3D_H +#define INTERPOLATION_F_3D_H + +#include "analyticalF.h" +#include "functors/lattice/blockBaseF3D.h" +#include "functors/lattice/superBaseF3D.h" +#include "geometry/cuboidGeometry3D.h" +#include "geometry/blockGeometry3D.h" +#include "geometry/superGeometry3D.h" + +namespace olb { + + +/// Converts block functors to analytical functors (special) +template +class SpecialAnalyticalFfromBlockF3D final : public AnalyticalF3D { +protected: + BlockF3D& _f; + Cuboid3D& _cuboid; + Vector _delta; + T _scale; +public: + SpecialAnalyticalFfromBlockF3D(BlockF3D& f, Cuboid3D& cuboid, Vector delta, T scale = 1.); + bool operator() (W output[], const T physC[]) override; +}; + +/// Converts block functors to analytical functors +template +class AnalyticalFfromBlockF3D final : public AnalyticalF3D { +protected: + BlockF3D& _f; + Cuboid3D& _cuboid; + const int _overlap; +public: + AnalyticalFfromBlockF3D(BlockF3D& f, Cuboid3D& cuboid, const int overlap); + bool operator() (W output[], const T physC[]) override; +}; + +/// Converts super functors to analytical functors +template +class AnalyticalFfromSuperF3D final : public AnalyticalF3D { +protected: + const bool _communicateToAll; + const bool _communicateOverlap; + + SuperF3D& _f; + CuboidGeometry3D& _cuboidGeometry; + int _overlap; + + std::vector>> _blockF; +public: + AnalyticalFfromSuperF3D(SuperF3D& f, + bool communicateToAll=false, + int overlap=-1, + bool communicateOverlap=true); + bool operator() (W output[], const T physC[]) override; + + /// \return Size of _blockF vector + int getBlockFSize() const; + /// \return _blockF[iCloc] + AnalyticalFfromBlockF3D& getBlockF(int iCloc); +}; + + +} // end namespace olb + +#endif -- cgit v1.2.3