OpenLB 1.7
Loading...
Searching...
No Matches
shanChenForcedSingleComponentPostProcessor3D.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_3D_H
25#define SHAN_CHEN_FORCED_SINGLE_COMPONENT_POST_PROCESSOR_3D_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:
45 int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, T G_, std::vector<T> rho0_,
46 AnalyticalF<1,T,T>& iP_, std::vector<BlockStructureD<3>*> partners_);
48 T G_, std::vector<T> rho0_,
49 AnalyticalF<1,T,T>& iP_, std::vector<BlockStructureD<3>*> partners_);
50 int extent() const override
51 {
52 return 1;
53 }
54 int extent(int whichDirection) const override
55 {
56 return 1;
57 }
58 void process(BlockLattice<T,DESCRIPTOR>& blockLattice) override;
60 int x0_, int x1_, int y0_, int y1_, int z0_, int z1_) override;
61private:
62 using RHO_CACHE = descriptors::FIELD_BASE<1, 0, 0>;
63 int x0, x1, y0, y1, z0, z1;
64 T G;
65 std::vector<T> rho0;
66 AnalyticalF<1,T,T>& interactionPotential;
67 std::vector<BlockStructureD<3>*> partners;
68};
69
70template<typename T, typename DESCRIPTOR>
72public:
73 ShanChenForcedSingleComponentGenerator3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, T G_, std::vector<T> rho0_, AnalyticalF<1,T,T>& iP_);
74 ShanChenForcedSingleComponentGenerator3D(T G_, std::vector<T> rho0_, AnalyticalF<1,T,T>& iP_);
75 PostProcessor3D<T,DESCRIPTOR>* generate(std::vector<BlockStructureD<3>*> partners) const override;
77private:
78 T G;
79 std::vector<T> rho0;
80 AnalyticalF<1,T,T>& interactionPotential;
81};
82
83}
84
85#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.
PostProcessor3D< T, DESCRIPTOR > * generate(std::vector< BlockStructureD< 3 > * > partners) const override
LatticeCouplingGenerator3D< T, DESCRIPTOR > * clone() const override
ShanChenForcedSingleComponentGenerator3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, T G_, std::vector< T > rho0_, AnalyticalF< 1, T, T > &iP_)
LatticeCouplingGenerator for NS coupling.
Multiphysics class for coupling between different lattices.
int extent() const override
Extent of application area (0 for purely local operations)
int extent(int whichDirection) const override
Extent of application area along a direction (0 or 1)
void process(BlockLattice< T, DESCRIPTOR > &blockLattice) override
Execute post-processing step.
void processSubDomain(BlockLattice< T, DESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_) override
Execute post-processing step on a sublattice.
ShanChenForcedSingleComponentPostProcessor3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, T G_, std::vector< T > rho0_, AnalyticalF< 1, T, T > &iP_, std::vector< BlockStructureD< 3 > * > partners_)
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].