VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
PressureNonEquilibrium.cuh
Go to the documentation of this file.
1//=======================================================================================
2// ____ ____ __ ______ __________ __ __ __ __
3// \ \ | | | | | _ \ |___ ___| | | | | / \ | |
4// \ \ | | | | | |_) | | | | | | | / \ | |
5// \ \ | | | | | _ / | | | | | | / /\ \ | |
6// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
7// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
8// \ \ | | ________________________________________________________________
9// \ \ | | | ______________________________________________________________|
10// \ \| | | | __ __ __ __ ______ _______
11// \ | | |_____ | | | | | | | | | _ \ / _____)
12// \ | | _____| | | | | | | | | | | \ \ \_______
13// \ | | | | |_____ | \_/ | | | | |_/ / _____ |
14// \ _____| |__| |________| \_______/ |__| |______/ (_______/
15//
16// This file is part of VirtualFluids. VirtualFluids is free software: you can
17// redistribute it and/or modify it under the terms of the GNU General Public
18// License as published by the Free Software Foundation, either version 3 of
19// the License, or (at your option) any later version.
20//
21// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT
22// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24// for more details.
25//
26// SPDX-License-Identifier: GPL-3.0-or-later
27// SPDX-FileCopyrightText: Copyright © VirtualFluids Project contributors, see AUTHORS.md in root folder
28//
29//! \addtogroup gpu_BoundaryConditions BoundaryConditions
30//! \ingroup gpu_core core
31//! \{
32//! \author Martin Schoenherr, Anna Wellmann
33//======================================================================================
34#include "Calculation/Calculation.h"
35#include "lbm/constants/D3Q27.h"
36#include "basics/constants/NumericConstants.h"
37#include "lbm/MacroscopicQuantities.h"
38#include "Utilities/KernelUtilities.h"
39#include "cuda_helper/CudaIndexCalculation.h"
40
41using namespace vf::basics::constant;
42using namespace vf::lbm::dir;
43
44namespace vf::gpu {
45
46template <typename MacroscopicQuantityFunctor>
47__global__ void PressureNonEquilibrium_Device(
48 real* rhoBC,
49 real* distributions,
50 int* bcNodeIndices,
51 int* bcNeighborIndices,
52 int numberOfBCnodes,
53 unsigned int* neighborX,
54 unsigned int* neighborY,
55 unsigned int* neighborZ,
56 unsigned long long numberOfLBnodes,
57 bool isEvenTimestep,
58 size_t direction,
59 MacroscopicQuantityFunctor macroscopicQuantityFunctor)
60{
61 ////////////////////////////////////////////////////////////////////////////////
62 //! The pressure boundary condition is executed in the following steps
63 //!
64
65 ////////////////////////////////////////////////////////////////////////////////
66 //! - Get node index coordinates from threadIdx, blockIdx, blockDim and gridDim.
67 //!
68 const unsigned nodeIndex = vf::cuda::get1DIndexFrom2DBlock();
69
70 ////////////////////////////////////////////////////////////////////////////////
71 //! - Run for all indices in size of boundary condition (numberOfBCnodes)
72 //!
73 if(nodeIndex < numberOfBCnodes)
74 {
75 ////////////////////////////////////////////////////////////////////////////////
76 //! - Set neighbor indices (necessary for indirect addressing) for current node
77 //!
78 ListIndices neighborIndices(bcNodeIndices[nodeIndex], neighborX, neighborY, neighborZ);
79
80 ////////////////////////////////////////////////////////////////////////////////
81 //! - Set neighbor indices (necessary for indirect addressing) for neighboring node
82 //!
83 ListIndices neighborIndicesOfNeighbor(bcNeighborIndices[nodeIndex], neighborX, neighborY, neighborZ);
84
85 //////////////////////////////////////////////////////////////////////////
86 //! - Read distributions: style of reading and writing the distributions from/to stored arrays dependent on timestep is based on the esoteric twist algorithm \ref
87 //! <a href="https://doi.org/10.3390/computation5020019"><b>[ M. Geier et al. (2017), DOI:10.3390/computation5020019 ]</b></a>
88 //!
89 Distributions27 dist;
90 getPointersToDistributions(dist, distributions, numberOfLBnodes, isEvenTimestep);
91
92 ////////////////////////////////////////////////////////////////////////////////
93 //! - Set local distributions for neighboring node
94 //!
95 real f_Neighbor[27];
96 getPreCollisionDistribution(f_Neighbor, dist, neighborIndicesOfNeighbor);
97
98 ////////////////////////////////////////////////////////////////////////////////
99 //! - Calculate macroscopic quantities (for neighboring node)
100 //!
101 real drho1;
102 real vx1;
103 real vx2;
104 real vx3;
105 macroscopicQuantityFunctor(f_Neighbor, drho1, vx1, vx2, vx3);
106 real cusq = c3o2 * (vx1 * vx1 + vx2 * vx2 + vx3 * vx3);
107
108 ////////////////////////////////////////////////////////////////////////////////
109 //! subtract the equilibrium (eq) to obtain the non-equilibrium (neq) (for neighboring node)
110 //!
111 f_Neighbor[d000] -= c8o27* (drho1-(drho1+c1o1)*cusq);
112 f_Neighbor[dP00] -= c2o27* (drho1+(drho1+c1o1)*(c3o1*( vx1 )+c9o2*( vx1 )*( vx1 )-cusq));
113 f_Neighbor[dM00] -= c2o27* (drho1+(drho1+c1o1)*(c3o1*(-vx1 )+c9o2*(-vx1 )*(-vx1 )-cusq));
114 f_Neighbor[d0P0] -= c2o27* (drho1+(drho1+c1o1)*(c3o1*( vx2 )+c9o2*( vx2 )*( vx2 )-cusq));
115 f_Neighbor[d0M0] -= c2o27* (drho1+(drho1+c1o1)*(c3o1*( -vx2 )+c9o2*( -vx2 )*( -vx2 )-cusq));
116 f_Neighbor[d00P] -= c2o27* (drho1+(drho1+c1o1)*(c3o1*( vx3)+c9o2*( vx3)*( vx3)-cusq));
117 f_Neighbor[d00M] -= c2o27* (drho1+(drho1+c1o1)*(c3o1*( -vx3)+c9o2*( -vx3)*( -vx3)-cusq));
118 f_Neighbor[dPP0] -= c1o54* (drho1+(drho1+c1o1)*(c3o1*( vx1+vx2 )+c9o2*( vx1+vx2 )*( vx1+vx2 )-cusq));
119 f_Neighbor[dMM0] -= c1o54* (drho1+(drho1+c1o1)*(c3o1*(-vx1-vx2 )+c9o2*(-vx1-vx2 )*(-vx1-vx2 )-cusq));
120 f_Neighbor[dPM0] -= c1o54* (drho1+(drho1+c1o1)*(c3o1*( vx1-vx2 )+c9o2*( vx1-vx2 )*( vx1-vx2 )-cusq));
121 f_Neighbor[dMP0] -= c1o54* (drho1+(drho1+c1o1)*(c3o1*(-vx1+vx2 )+c9o2*(-vx1+vx2 )*(-vx1+vx2 )-cusq));
122 f_Neighbor[dP0P] -= c1o54* (drho1+(drho1+c1o1)*(c3o1*( vx1 +vx3)+c9o2*( vx1 +vx3)*( vx1 +vx3)-cusq));
123 f_Neighbor[dM0M] -= c1o54* (drho1+(drho1+c1o1)*(c3o1*(-vx1 -vx3)+c9o2*(-vx1 -vx3)*(-vx1 -vx3)-cusq));
124 f_Neighbor[dP0M] -= c1o54* (drho1+(drho1+c1o1)*(c3o1*( vx1 -vx3)+c9o2*( vx1 -vx3)*( vx1 -vx3)-cusq));
125 f_Neighbor[dM0P] -= c1o54* (drho1+(drho1+c1o1)*(c3o1*(-vx1 +vx3)+c9o2*(-vx1 +vx3)*(-vx1 +vx3)-cusq));
126 f_Neighbor[d0PP] -= c1o54* (drho1+(drho1+c1o1)*(c3o1*( vx2+vx3)+c9o2*( vx2+vx3)*( vx2+vx3)-cusq));
127 f_Neighbor[d0MM] -= c1o54* (drho1+(drho1+c1o1)*(c3o1*( -vx2-vx3)+c9o2*( -vx2-vx3)*( -vx2-vx3)-cusq));
128 f_Neighbor[d0PM] -= c1o54* (drho1+(drho1+c1o1)*(c3o1*( vx2-vx3)+c9o2*( vx2-vx3)*( vx2-vx3)-cusq));
129 f_Neighbor[d0MP] -= c1o54* (drho1+(drho1+c1o1)*(c3o1*( -vx2+vx3)+c9o2*( -vx2+vx3)*( -vx2+vx3)-cusq));
130 f_Neighbor[dPPP] -= c1o216*(drho1+(drho1+c1o1)*(c3o1*( vx1+vx2+vx3)+c9o2*( vx1+vx2+vx3)*( vx1+vx2+vx3)-cusq));
131 f_Neighbor[dMMM] -= c1o216*(drho1+(drho1+c1o1)*(c3o1*(-vx1-vx2-vx3)+c9o2*(-vx1-vx2-vx3)*(-vx1-vx2-vx3)-cusq));
132 f_Neighbor[dPPM] -= c1o216*(drho1+(drho1+c1o1)*(c3o1*( vx1+vx2-vx3)+c9o2*( vx1+vx2-vx3)*( vx1+vx2-vx3)-cusq));
133 f_Neighbor[dMMP] -= c1o216*(drho1+(drho1+c1o1)*(c3o1*(-vx1-vx2+vx3)+c9o2*(-vx1-vx2+vx3)*(-vx1-vx2+vx3)-cusq));
134 f_Neighbor[dPMP] -= c1o216*(drho1+(drho1+c1o1)*(c3o1*( vx1-vx2+vx3)+c9o2*( vx1-vx2+vx3)*( vx1-vx2+vx3)-cusq));
135 f_Neighbor[dMPM] -= c1o216*(drho1+(drho1+c1o1)*(c3o1*(-vx1+vx2-vx3)+c9o2*(-vx1+vx2-vx3)*(-vx1+vx2-vx3)-cusq));
136 f_Neighbor[dPMM] -= c1o216*(drho1+(drho1+c1o1)*(c3o1*( vx1-vx2-vx3)+c9o2*( vx1-vx2-vx3)*( vx1-vx2-vx3)-cusq));
137 f_Neighbor[dMPP] -= c1o216*(drho1+(drho1+c1o1)*(c3o1*(-vx1+vx2+vx3)+c9o2*(-vx1+vx2+vx3)*(-vx1+vx2+vx3)-cusq));
138
139 ////////////////////////////////////////////////////////////////////////////////
140 //! redefine drho1 with local rho
141 //!
142 drho1 = rhoBC[nodeIndex];
143
144 ////////////////////////////////////////////////////////////////////////////////
145 //! add the equilibrium (eq), which is calculated with rhoBClocal (for neighboring node)
146 //!
147 f_Neighbor[d000] += c8o27* (drho1-(drho1+c1o1)*cusq);
148 f_Neighbor[dP00] += c2o27* (drho1+(drho1+c1o1)*(c3o1*( vx1 )+c9o2*( vx1 )*( vx1 )-cusq));
149 f_Neighbor[dM00] += c2o27* (drho1+(drho1+c1o1)*(c3o1*(-vx1 )+c9o2*(-vx1 )*(-vx1 )-cusq));
150 f_Neighbor[d0P0] += c2o27* (drho1+(drho1+c1o1)*(c3o1*( vx2 )+c9o2*( vx2 )*( vx2 )-cusq));
151 f_Neighbor[d0M0] += c2o27* (drho1+(drho1+c1o1)*(c3o1*( -vx2 )+c9o2*( -vx2 )*( -vx2 )-cusq));
152 f_Neighbor[d00P] += c2o27* (drho1+(drho1+c1o1)*(c3o1*( vx3)+c9o2*( vx3)*( vx3)-cusq));
153 f_Neighbor[d00M] += c2o27* (drho1+(drho1+c1o1)*(c3o1*( -vx3)+c9o2*( -vx3)*( -vx3)-cusq));
154 f_Neighbor[dPP0] += c1o54* (drho1+(drho1+c1o1)*(c3o1*( vx1+vx2 )+c9o2*( vx1+vx2 )*( vx1+vx2 )-cusq));
155 f_Neighbor[dMM0] += c1o54* (drho1+(drho1+c1o1)*(c3o1*(-vx1-vx2 )+c9o2*(-vx1-vx2 )*(-vx1-vx2 )-cusq));
156 f_Neighbor[dPM0] += c1o54* (drho1+(drho1+c1o1)*(c3o1*( vx1-vx2 )+c9o2*( vx1-vx2 )*( vx1-vx2 )-cusq));
157 f_Neighbor[dMP0] += c1o54* (drho1+(drho1+c1o1)*(c3o1*(-vx1+vx2 )+c9o2*(-vx1+vx2 )*(-vx1+vx2 )-cusq));
158 f_Neighbor[dP0P] += c1o54* (drho1+(drho1+c1o1)*(c3o1*( vx1 +vx3)+c9o2*( vx1 +vx3)*( vx1 +vx3)-cusq));
159 f_Neighbor[dM0M] += c1o54* (drho1+(drho1+c1o1)*(c3o1*(-vx1 -vx3)+c9o2*(-vx1 -vx3)*(-vx1 -vx3)-cusq));
160 f_Neighbor[dP0M] += c1o54* (drho1+(drho1+c1o1)*(c3o1*( vx1 -vx3)+c9o2*( vx1 -vx3)*( vx1 -vx3)-cusq));
161 f_Neighbor[dM0P] += c1o54* (drho1+(drho1+c1o1)*(c3o1*(-vx1 +vx3)+c9o2*(-vx1 +vx3)*(-vx1 +vx3)-cusq));
162 f_Neighbor[d0PP] += c1o54* (drho1+(drho1+c1o1)*(c3o1*( vx2+vx3)+c9o2*( vx2+vx3)*( vx2+vx3)-cusq));
163 f_Neighbor[d0MM] += c1o54* (drho1+(drho1+c1o1)*(c3o1*( -vx2-vx3)+c9o2*( -vx2-vx3)*( -vx2-vx3)-cusq));
164 f_Neighbor[d0PM] += c1o54* (drho1+(drho1+c1o1)*(c3o1*( vx2-vx3)+c9o2*( vx2-vx3)*( vx2-vx3)-cusq));
165 f_Neighbor[d0MP] += c1o54* (drho1+(drho1+c1o1)*(c3o1*( -vx2+vx3)+c9o2*( -vx2+vx3)*( -vx2+vx3)-cusq));
166 f_Neighbor[dPPP] += c1o216*(drho1+(drho1+c1o1)*(c3o1*( vx1+vx2+vx3)+c9o2*( vx1+vx2+vx3)*( vx1+vx2+vx3)-cusq));
167 f_Neighbor[dMMM] += c1o216*(drho1+(drho1+c1o1)*(c3o1*(-vx1-vx2-vx3)+c9o2*(-vx1-vx2-vx3)*(-vx1-vx2-vx3)-cusq));
168 f_Neighbor[dPPM] += c1o216*(drho1+(drho1+c1o1)*(c3o1*( vx1+vx2-vx3)+c9o2*( vx1+vx2-vx3)*( vx1+vx2-vx3)-cusq));
169 f_Neighbor[dMMP] += c1o216*(drho1+(drho1+c1o1)*(c3o1*(-vx1-vx2+vx3)+c9o2*(-vx1-vx2+vx3)*(-vx1-vx2+vx3)-cusq));
170 f_Neighbor[dPMP] += c1o216*(drho1+(drho1+c1o1)*(c3o1*( vx1-vx2+vx3)+c9o2*( vx1-vx2+vx3)*( vx1-vx2+vx3)-cusq));
171 f_Neighbor[dMPM] += c1o216*(drho1+(drho1+c1o1)*(c3o1*(-vx1+vx2-vx3)+c9o2*(-vx1+vx2-vx3)*(-vx1+vx2-vx3)-cusq));
172 f_Neighbor[dPMM] += c1o216*(drho1+(drho1+c1o1)*(c3o1*( vx1-vx2-vx3)+c9o2*( vx1-vx2-vx3)*( vx1-vx2-vx3)-cusq));
173 f_Neighbor[dMPP] += c1o216*(drho1+(drho1+c1o1)*(c3o1*(-vx1+vx2+vx3)+c9o2*(-vx1+vx2+vx3)*(-vx1+vx2+vx3)-cusq));
174
175 //////////////////////////////////////////////////////////////////////////
176
177 __syncthreads();
178
179 ////////////////////////////////////////////////////////////////////////////////
180 //! write the new distributions to the bc nodes (only for the relevant directions)
181 //!
182 switch (direction)
183 {
184 case dM00:
185 (dist.f[d000])[neighborIndices.k_000] = f_Neighbor[d000];
186 (dist.f[d0P0])[neighborIndices.k_000] = f_Neighbor[d0P0];
187 (dist.f[d0M0])[neighborIndices.k_0M0] = f_Neighbor[d0M0];
188 (dist.f[d00P])[neighborIndices.k_000] = f_Neighbor[d00P];
189 (dist.f[d00M])[neighborIndices.k_00M] = f_Neighbor[d00M];
190 (dist.f[d0PP])[neighborIndices.k_000] = f_Neighbor[d0PP];
191 (dist.f[d0MM])[neighborIndices.k_0MM] = f_Neighbor[d0MM];
192 (dist.f[d0PM])[neighborIndices.k_00M] = f_Neighbor[d0PM];
193 (dist.f[d0MP])[neighborIndices.k_0M0] = f_Neighbor[d0MP];
194
195 (dist.f[dP00])[neighborIndices.k_000] = f_Neighbor[dP00];
196 (dist.f[dPP0])[neighborIndices.k_000] = f_Neighbor[dPP0];
197 (dist.f[dPM0])[neighborIndices.k_0M0] = f_Neighbor[dPM0];
198 (dist.f[dP0P])[neighborIndices.k_000] = f_Neighbor[dP0P];
199 (dist.f[dP0M])[neighborIndices.k_00M] = f_Neighbor[dP0M];
200 (dist.f[dPPP])[neighborIndices.k_000] = f_Neighbor[dPPP];
201 (dist.f[dPMP])[neighborIndices.k_0M0] = f_Neighbor[dPMP];
202 (dist.f[dPPM])[neighborIndices.k_00M] = f_Neighbor[dPPM];
203 (dist.f[dPMM])[neighborIndices.k_0MM] = f_Neighbor[dPMM];
204 break;
205 case dP00:
206 (dist.f[d000])[neighborIndices.k_000] = f_Neighbor[d000];
207 (dist.f[d0P0])[neighborIndices.k_000] = f_Neighbor[d0P0];
208 (dist.f[d0M0])[neighborIndices.k_0M0] = f_Neighbor[d0M0];
209 (dist.f[d00P])[neighborIndices.k_000] = f_Neighbor[d00P];
210 (dist.f[d00M])[neighborIndices.k_00M] = f_Neighbor[d00M];
211 (dist.f[d0PP])[neighborIndices.k_000] = f_Neighbor[d0PP];
212 (dist.f[d0MM])[neighborIndices.k_0MM] = f_Neighbor[d0MM];
213 (dist.f[d0PM])[neighborIndices.k_00M] = f_Neighbor[d0PM];
214 (dist.f[d0MP])[neighborIndices.k_0M0] = f_Neighbor[d0MP];
215
216 (dist.f[dM00])[neighborIndices.k_M00] = f_Neighbor[dM00];
217 (dist.f[dMM0])[neighborIndices.k_MM0] = f_Neighbor[dMM0];
218 (dist.f[dMP0])[neighborIndices.k_M00] = f_Neighbor[dMP0];
219 (dist.f[dM0M])[neighborIndices.k_M0M] = f_Neighbor[dM0M];
220 (dist.f[dM0P])[neighborIndices.k_M00] = f_Neighbor[dM0P];
221 (dist.f[dMPP])[neighborIndices.k_M00] = f_Neighbor[dMPP];
222 (dist.f[dMMP])[neighborIndices.k_MM0] = f_Neighbor[dMMP];
223 (dist.f[dMPM])[neighborIndices.k_M0M] = f_Neighbor[dMPM];
224 (dist.f[dMMM])[neighborIndices.k_MMM] = f_Neighbor[dMMM];
225 break;
226 case d0M0:
227 (dist.f[d000])[neighborIndices.k_000] = f_Neighbor[d000];
228 (dist.f[dP00])[neighborIndices.k_000] = f_Neighbor[dP00];
229 (dist.f[dM00])[neighborIndices.k_M00] = f_Neighbor[dM00];
230 (dist.f[d00P])[neighborIndices.k_000] = f_Neighbor[d00P];
231 (dist.f[d00M])[neighborIndices.k_00M] = f_Neighbor[d00M];
232 (dist.f[dP0P])[neighborIndices.k_000] = f_Neighbor[dP0P];
233 (dist.f[dM0M])[neighborIndices.k_M0M] = f_Neighbor[dM0M];
234 (dist.f[dP0M])[neighborIndices.k_00M] = f_Neighbor[dP0M];
235 (dist.f[dM0P])[neighborIndices.k_M00] = f_Neighbor[dM0P];
236
237 (dist.f[d0P0])[neighborIndices.k_000] = f_Neighbor[d0P0];
238 (dist.f[dPP0])[neighborIndices.k_000] = f_Neighbor[dPP0];
239 (dist.f[dMP0])[neighborIndices.k_M00] = f_Neighbor[dMP0];
240 (dist.f[d0PP])[neighborIndices.k_000] = f_Neighbor[d0PP];
241 (dist.f[d0PM])[neighborIndices.k_00M] = f_Neighbor[d0PM];
242 (dist.f[dPPP])[neighborIndices.k_000] = f_Neighbor[dPPP];
243 (dist.f[dMPP])[neighborIndices.k_M00] = f_Neighbor[dMPP];
244 (dist.f[dPPM])[neighborIndices.k_00M] = f_Neighbor[dPPM];
245 (dist.f[dMPM])[neighborIndices.k_M0M] = f_Neighbor[dMPM];
246 break;
247 case d0P0:
248 (dist.f[d000])[neighborIndices.k_000] = f_Neighbor[d000];
249 (dist.f[dP00])[neighborIndices.k_000] = f_Neighbor[dP00];
250 (dist.f[dM00])[neighborIndices.k_M00] = f_Neighbor[dM00];
251 (dist.f[d00P])[neighborIndices.k_000] = f_Neighbor[d00P];
252 (dist.f[d00M])[neighborIndices.k_00M] = f_Neighbor[d00M];
253 (dist.f[dP0P])[neighborIndices.k_000] = f_Neighbor[dP0P];
254 (dist.f[dM0M])[neighborIndices.k_M0M] = f_Neighbor[dM0M];
255 (dist.f[dP0M])[neighborIndices.k_00M] = f_Neighbor[dP0M];
256 (dist.f[dM0P])[neighborIndices.k_M00] = f_Neighbor[dM0P];
257
258 (dist.f[d0M0])[neighborIndices.k_0M0] = f_Neighbor[d0M0];
259 (dist.f[dMM0])[neighborIndices.k_MM0] = f_Neighbor[dMM0];
260 (dist.f[dPM0])[neighborIndices.k_0M0] = f_Neighbor[dPM0];
261 (dist.f[d0MM])[neighborIndices.k_0MM] = f_Neighbor[d0MM];
262 (dist.f[d0MP])[neighborIndices.k_0M0] = f_Neighbor[d0MP];
263 (dist.f[dPMP])[neighborIndices.k_0M0] = f_Neighbor[dPMP];
264 (dist.f[dMMP])[neighborIndices.k_MM0] = f_Neighbor[dMMP];
265 (dist.f[dPMM])[neighborIndices.k_0MM] = f_Neighbor[dPMM];
266 (dist.f[dMMM])[neighborIndices.k_MMM] = f_Neighbor[dMMM];
267 break;
268 case d00M:
269 (dist.f[d000])[neighborIndices.k_000] = f_Neighbor[d000];
270 (dist.f[dP00])[neighborIndices.k_000] = f_Neighbor[dP00];
271 (dist.f[dM00])[neighborIndices.k_M00] = f_Neighbor[dM00];
272 (dist.f[d0P0])[neighborIndices.k_000] = f_Neighbor[d0P0];
273 (dist.f[d0M0])[neighborIndices.k_0M0] = f_Neighbor[d0M0];
274 (dist.f[dPP0])[neighborIndices.k_000] = f_Neighbor[dPP0];
275 (dist.f[dMM0])[neighborIndices.k_MM0] = f_Neighbor[dMM0];
276 (dist.f[dPM0])[neighborIndices.k_0M0] = f_Neighbor[dPM0];
277 (dist.f[dMP0])[neighborIndices.k_M00] = f_Neighbor[dMP0];
278
279 (dist.f[d00P])[neighborIndices.k_000] = f_Neighbor[d00P];
280 (dist.f[dP0P])[neighborIndices.k_000] = f_Neighbor[dP0P];
281 (dist.f[dM0P])[neighborIndices.k_M00] = f_Neighbor[dM0P];
282 (dist.f[d0PP])[neighborIndices.k_000] = f_Neighbor[d0PP];
283 (dist.f[d0MP])[neighborIndices.k_0M0] = f_Neighbor[d0MP];
284 (dist.f[dPPP])[neighborIndices.k_000] = f_Neighbor[dPPP];
285 (dist.f[dMPP])[neighborIndices.k_M00] = f_Neighbor[dMPP];
286 (dist.f[dPMP])[neighborIndices.k_0M0] = f_Neighbor[dPMP];
287 (dist.f[dMMP])[neighborIndices.k_MM0] = f_Neighbor[dMMP];
288 break;
289 case d00P:
290 (dist.f[d000])[neighborIndices.k_000] = f_Neighbor[d000];
291 (dist.f[dP00])[neighborIndices.k_000] = f_Neighbor[dP00];
292 (dist.f[dM00])[neighborIndices.k_M00] = f_Neighbor[dM00];
293 (dist.f[d0P0])[neighborIndices.k_000] = f_Neighbor[d0P0];
294 (dist.f[d0M0])[neighborIndices.k_0M0] = f_Neighbor[d0M0];
295 (dist.f[dPP0])[neighborIndices.k_000] = f_Neighbor[dPP0];
296 (dist.f[dMM0])[neighborIndices.k_MM0] = f_Neighbor[dMM0];
297 (dist.f[dPM0])[neighborIndices.k_0M0] = f_Neighbor[dPM0];
298 (dist.f[dMP0])[neighborIndices.k_M00] = f_Neighbor[dMP0];
299
300 (dist.f[d00M])[neighborIndices.k_00M] = f_Neighbor[d00M];
301 (dist.f[dM0M])[neighborIndices.k_M0M] = f_Neighbor[dM0M];
302 (dist.f[dP0M])[neighborIndices.k_00M] = f_Neighbor[dP0M];
303 (dist.f[d0MM])[neighborIndices.k_0MM] = f_Neighbor[d0MM];
304 (dist.f[d0PM])[neighborIndices.k_00M] = f_Neighbor[d0PM];
305 (dist.f[dPPM])[neighborIndices.k_00M] = f_Neighbor[dPPM];
306 (dist.f[dMPM])[neighborIndices.k_M0M] = f_Neighbor[dMPM];
307 (dist.f[dPMM])[neighborIndices.k_0MM] = f_Neighbor[dPMM];
308 (dist.f[dMMM])[neighborIndices.k_MMM] = f_Neighbor[dMMM];
309 break;
310 default:
311 break;
312 }
313 }
314}
315
316}
317
318//! \}