OpenLB 1.7
Loading...
Searching...
No Matches
extendedFiniteDifferenceBoundary2D.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2007 Orestis Malaspinas, 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
25#ifndef EXTENDED_FINITE_DIFFERENCE_BOUNDARY_2D_H
26#define EXTENDED_FINITE_DIFFERENCE_BOUNDARY_2D_H
27
28#include "core/postProcessing.h"
30
31
32namespace olb {
33
41template<typename T, typename DESCRIPTOR, int direction, int orientation>
43public:
44 ExtendedStraightFdBoundaryPostProcessor2D(int x0_, int x1_, int y0_, int y1_);
45 int extent() const override
46 {
47 return 1;
48 }
49 int extent(int whichDirection) const override
50 {
51 return 1;
52 }
53 void process(BlockLattice<T,DESCRIPTOR>& blockLattice) override;
55 int x0_, int x1_, int y0_, int y1_ ) override;
56private:
57 template<int deriveDirection>
58 void interpolateGradients(BlockLattice<T,DESCRIPTOR> const& blockLattice,
59 T velDeriv[DESCRIPTOR::d], int iX, int iY) const;
60 template<int deriveDirection>
61 void interpolateGradients (
62 BlockLattice<T,DESCRIPTOR> const& blockLattice,T& rhoDeriv,
63 int iX, int iY ) const;
64private:
65 int x0, x1, y0, y1;
66};
67
68template<typename T, typename DESCRIPTOR, int direction, int orientation>
70public:
71 ExtendedStraightFdBoundaryProcessorGenerator2D(int x0_, int x1_, int y0_, int y1_);
74};
75
76} // namespace olb
77
78#endif
Platform-abstracted block lattice for external access and inter-block interaction.
This class computes the finite difference approximation to LB boundary conditions on a flat wall in 2...
int extent(int whichDirection) const override
Extent of application area along a direction (0 or 1)
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.
ExtendedStraightFdBoundaryPostProcessor2D(int x0_, int x1_, int y0_, int y1_)
void process(BlockLattice< T, DESCRIPTOR > &blockLattice) override
Execute post-processing step.
PostProcessor2D< T, DESCRIPTOR > * generate() const override
PostProcessorGenerator2D< T, DESCRIPTOR > * clone() const override
Interface of 2D post-processing steps.
Instantiation of Momenta tuples which define the computation and definition of momenta in a specific ...
Top level namespace for all of OpenLB.
Interface for post-processing steps – header file.