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 --- .../analytical/indicator/smoothIndicatorF2D.h | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 src/functors/analytical/indicator/smoothIndicatorF2D.h (limited to 'src/functors/analytical/indicator/smoothIndicatorF2D.h') diff --git a/src/functors/analytical/indicator/smoothIndicatorF2D.h b/src/functors/analytical/indicator/smoothIndicatorF2D.h new file mode 100644 index 0000000..85f4acd --- /dev/null +++ b/src/functors/analytical/indicator/smoothIndicatorF2D.h @@ -0,0 +1,79 @@ +/* This file is part of the OpenLB library + * + * Copyright (C) 2016 Thomas Henn, Cyril Masquelier, Jan Marquardt, 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. +*/ + +#ifndef SMOOTH_INDICATOR_F_2D_H +#define SMOOTH_INDICATOR_F_2D_H + +#include + +#include "smoothIndicatorBaseF2D.h" +#include "io/xmlReader.h" + +#include "core/blockData2D.h" +#include "core/unitConverter.h" +#include "smoothIndicatorBaseF3D.h" +#include "functors/analytical/indicator/indicatorBaseF2D.h" +#include "functors/analytical/indicator/indicatorBaseF3D.h" + +namespace olb { + +/// implements a smooth particle cuboid in 2D with an _epsilon sector +template +class SmoothIndicatorCuboid2D final : public SmoothIndicatorF2D { +private: + S _xLength; + S _yLength; +public: + SmoothIndicatorCuboid2D(Vector center, S xLength, S yLength, S epsilon, S theta=0, S density=0, Vector vel = Vector (0.,0.)); + bool operator()(T output[],const S input[]) override; +}; + +/// implements a smooth circle in 2D with an _epsilon sector +template +class SmoothIndicatorCircle2D final : public SmoothIndicatorF2D { +private: + S _radius; +public: + SmoothIndicatorCircle2D(Vector center, S radius, S epsilon, S density=0, Vector vel = Vector (0.,0.)); + bool operator() (T output[], const S input[]) override; +}; + +/// implements a smooth triangle in 2D with an _epsilon sector +template +class SmoothIndicatorTriangle2D final : public SmoothIndicatorF2D { +private: + /// corner points + Vector _PointA, _PointB, _PointC; + /// vectors connecting corner points (_ab: from a to b) + Vector _ab, _bc, _ca; + /// normal on _ab * _A = _ab_d + S _ab_d, _bc_d, _ca_d; +public: + SmoothIndicatorTriangle2D(Vector center, S radius, S epsilon, S theta=0, S density=0, Vector vel = Vector (0.,0.)); + bool operator() (T output[], const S input[]); +}; + +} + +#endif + -- cgit v1.2.3