OpenLB 1.7
Loading...
Searching...
No Matches
shanChenForcedSingleComponentPostProcessor2D.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2008 Orestis Malaspinas, Andrea Parmigiani, Jonas Latt
4 * E-mail contact: info@openlb.net
5 * The most recent release of OpenLB can be downloaded at
6 * <http://www.openlb.net/>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22*/
23
24#ifndef SHAN_CHEN_FORCED_SINGLE_COMPONENT_POST_PROCESSOR_2D_H
25#define SHAN_CHEN_FORCED_SINGLE_COMPONENT_POST_PROCESSOR_2D_H
26
27#include "core/blockStructure.h"
28#include "core/postProcessing.h"
29
30
31namespace olb {
32
37// =========================================================================//
38// ===========Shan Chen coupling without wall interaction===================//
39// =========================================================================//
40
41template<typename T, typename DESCRIPTOR>
43public:
44 ShanChenForcedSingleComponentPostProcessor2D(int x0_, int x1_, int y0_, int y1_, T G_,
45 std::vector<T> rho0_,
47 std::vector<BlockStructureD<2>*> partners_);
49 std::vector<T> rho0_,
51 std::vector<BlockStructureD<2>*> partners_);
52 int extent() const override
53 {
54 return 1;
55 }
56 int extent(int whichDirection) const override
57 {
58 return 1;
59 }
60 void process(BlockLattice<T,DESCRIPTOR>& blockLattice) override;
62 int x0_, int x1_, int y0_, int y1_) override;
63private:
64 using RHO_CACHE = descriptors::FIELD_BASE<1, 0, 0>;
65 int x0, x1, y0, y1;
66 T G;
67 std::vector<T> rho0;
68 AnalyticalF<1,T,T>& interactionPotential;
69 std::vector<BlockStructureD<2>*> partners;
70};
71
72template<typename T, typename DESCRIPTOR>
74public:
75 ShanChenForcedSingleComponentGenerator2D(int x0_, int x1_, int y0_, int y1_, T G_, std::vector<T> rho0_, AnalyticalF<1,T,T>& iP_);
76 ShanChenForcedSingleComponentGenerator2D(T G_, std::vector<T> rho0_, AnalyticalF<1,T,T>& iP_);
77 PostProcessor2D<T,DESCRIPTOR>* generate(std::vector<BlockStructureD<2>*> partners) const override;
79private:
80 T G;
81 std::vector<T> rho0;
82 AnalyticalF<1,T,T>& interactionPotential;
83};
84
85}
86
87#endif
AnalyticalF are applications from DD to XD, where X is set by the constructor.
Platform-abstracted block lattice for external access and inter-block interaction.
Base of a regular block.
Interface of 2D post-processing steps.
ShanChenForcedSingleComponentGenerator2D(int x0_, int x1_, int y0_, int y1_, T G_, std::vector< T > rho0_, AnalyticalF< 1, T, T > &iP_)
LatticeCouplingGenerator for NS coupling.
LatticeCouplingGenerator2D< T, DESCRIPTOR > * clone() const override
PostProcessor2D< T, DESCRIPTOR > * generate(std::vector< BlockStructureD< 2 > * > partners) const override
Multiphysics class for coupling between different lattices.
void process(BlockLattice< T, DESCRIPTOR > &blockLattice) override
Execute post-processing step.
int extent() const override
Extent of application area (0 for purely local operations)
void processSubDomain(BlockLattice< T, DESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_) override
Execute post-processing step on a sublattice.
ShanChenForcedSingleComponentPostProcessor2D(int x0_, int x1_, int y0_, int y1_, T G_, std::vector< T > rho0_, AnalyticalF< 1, T, T > &iP_, std::vector< BlockStructureD< 2 > * > partners_)
int extent(int whichDirection) const override
Extent of application area along a direction (0 or 1)
Top level namespace for all of OpenLB.
Interface for post-processing steps – header file.
Base of a field whose size is defined by [C,U_1,...,U_N]^T * [1,V_1,...V_N].