Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Markus Holzer
waLBerla
Commits
60289a94
Commit
60289a94
authored
Jun 23, 2021
by
Daniel Bauer
Committed by
Markus Holzer
Jun 23, 2021
Browse files
Fix SimpleDiffusionDirichlet
parent
6b0e8cab
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lbm/boundary/SimpleDiffusionDirichlet.h
View file @
60289a94
//======================================================================================================================
//
// This file is part of waLBerla. waLBerla is free software: you can
// This file is part of waLBerla. waLBerla 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 3 of
// License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// waLBerla 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
//
// waLBerla 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 waLBerla (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
//
...
...
@@ -108,9 +108,9 @@ private:
template
<
typename
LatticeModel_T
,
typename
flag_t
>
inline
SimpleDiffusionDirichlet
<
LatticeModel_T
,
flag_t
>::
SimpleDiffusionDirichlet
(
const
BoundaryUID
&
boundaryUID
,
const
FlagUID
&
uid
,
PDFField
*
const
pdfField
,
const
real_t
val
)
:
Boundary
<
flag_t
>
(
boundaryUID
),
uid_
(
uid
),
pdfField_
(
pdfField
),
val_
(
val
),
init_
(
false
)
Boundary
<
flag_t
>
(
boundaryUID
),
uid_
(
uid
),
pdfField_
(
pdfField
),
val_
(
val
),
init_
(
false
)
{
WALBERLA_ASSERT_NOT_NULLPTR
(
pdfField_
);
WALBERLA_ASSERT_NOT_NULLPTR
(
pdfField_
);
}
...
...
@@ -139,17 +139,8 @@ inline void SimpleDiffusionDirichlet< LatticeModel_T, flag_t >::registerCell( Bu
template
<
typename
LatticeModel_T
,
typename
flag_t
>
inline
void
SimpleDiffusionDirichlet
<
LatticeModel_T
,
flag_t
>::
registerCell
(
const
flag_t
,
const
cell_idx_t
,
const
cell_idx_t
,
const
cell_idx_t
,
const
BoundaryConfiguration
&
bc
)
const
BoundaryConfiguration
&
)
{
WALBERLA_ASSERT_EQUAL
(
dynamic_cast
<
const
ScalarConfiguration
*
>
(
&
bc
),
&
bc
);
const
ScalarConfiguration
&
sclConfig
=
dynamic_cast
<
const
ScalarConfiguration
&
>
(
bc
);
if
(
init_
)
WALBERLA_ASSERT_FLOAT_EQUAL
(
val_
,
sclConfig
.
val
()
);
init_
=
true
;
val_
=
sclConfig
.
val
();
}
...
...
@@ -183,7 +174,7 @@ inline void SimpleDiffusionDirichlet< LatticeModel_T, flag_t >::treatDirection(
WALBERLA_ASSERT_EQUAL
(
ny
,
y
+
cell_idx_c
(
stencil
::
cy
[
dir
]
)
);
WALBERLA_ASSERT_EQUAL
(
nz
,
z
+
cell_idx_c
(
stencil
::
cz
[
dir
]
)
);
WALBERLA_ASSERT_UNEQUAL
(
mask
&
this
->
mask_
,
numeric_cast
<
flag_t
>
(
0
)
);
WALBERLA_ASSERT_EQUAL
(
mask
&
this
->
mask_
,
this
->
mask_
);
WALBERLA_ASSERT_EQUAL
(
mask
&
this
->
mask_
,
this
->
mask_
);
// only true if "this->mask_" only contains one single flag, which is the case for the current implementation of this boundary condition (SimpleDiffusionDirichlet)
pdfField_
->
get
(
nx
,
ny
,
nz
,
Stencil
::
invDirIdx
(
dir
)
)
=
real_t
(
2
)
*
val_
*
LatticeModel_T
::
w
[
Stencil
::
idx
[
dir
]]
-
pdfField_
->
get
(
x
,
y
,
z
,
Stencil
::
idx
[
dir
]
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment