Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Dominik Mehlich
waLBerla
Commits
5e0f42c8
Commit
5e0f42c8
authored
Sep 06, 2019
by
Sebastian Eibl
Browse files
added shift to make collision points unique
parent
4a79adc5
Changes
9
Hide whitespace changes
Inline
Side-by-side
apps/benchmarks/GranularGas/MESA_PD_GranularGas.cpp
View file @
5e0f42c8
...
...
@@ -125,7 +125,7 @@ int main( int argc, char ** argv )
for
(
auto
&
iBlk
:
*
forest
)
{
for
(
auto
pt
:
grid_generator
::
SCGrid
(
iBlk
.
getAABB
(),
Vector3
<
real_t
>
(
params
.
spacing
)
*
real_c
(
0.5
),
Vector3
<
real_t
>
(
params
.
spacing
)
*
real_c
(
0.5
)
+
params
.
shift
,
params
.
spacing
))
{
WALBERLA_CHECK
(
iBlk
.
getAABB
().
contains
(
pt
));
...
...
apps/benchmarks/GranularGas/MESA_PD_KernelBenchmark.cpp
View file @
5e0f42c8
...
...
@@ -128,7 +128,7 @@ int main( int argc, char ** argv )
for
(
auto
&
iBlk
:
*
forest
)
{
for
(
auto
pt
:
grid_generator
::
SCGrid
(
iBlk
.
getAABB
(),
Vector3
<
real_t
>
(
params
.
spacing
)
*
real_c
(
0.5
),
Vector3
<
real_t
>
(
params
.
spacing
)
*
real_c
(
0.5
)
+
params
.
shift
,
params
.
spacing
))
{
WALBERLA_CHECK
(
iBlk
.
getAABB
().
contains
(
pt
));
...
...
apps/benchmarks/GranularGas/MESA_PD_KernelLoadBalancing.cpp
View file @
5e0f42c8
...
...
@@ -207,7 +207,7 @@ int main( int argc, char ** argv )
for
(
auto
&
iBlk
:
*
forest
)
{
for
(
auto
pt
:
grid_generator
::
SCGrid
(
iBlk
.
getAABB
(),
Vector3
<
real_t
>
(
params
.
spacing
)
*
real_c
(
0.5
),
Vector3
<
real_t
>
(
params
.
spacing
)
*
real_c
(
0.5
)
+
params
.
shift
,
params
.
spacing
))
{
WALBERLA_CHECK
(
iBlk
.
getAABB
().
contains
(
pt
));
...
...
apps/benchmarks/GranularGas/MESA_PD_LoadBalancing.cpp
View file @
5e0f42c8
...
...
@@ -203,7 +203,7 @@ int main( int argc, char ** argv )
for
(
auto
&
iBlk
:
*
forest
)
{
for
(
auto
pt
:
grid_generator
::
SCGrid
(
iBlk
.
getAABB
(),
Vector3
<
real_t
>
(
params
.
spacing
)
*
real_c
(
0.5
),
Vector3
<
real_t
>
(
params
.
spacing
)
*
real_c
(
0.5
)
+
params
.
shift
,
params
.
spacing
))
{
WALBERLA_CHECK
(
iBlk
.
getAABB
().
contains
(
pt
));
...
...
apps/benchmarks/GranularGas/PE_GranularGas.cpp
View file @
5e0f42c8
...
...
@@ -190,7 +190,7 @@ int main( int argc, char ** argv )
for
(
auto
&
currentBlock
:
*
forest
)
{
for
(
auto
it
=
grid_generator
::
SCIterator
(
currentBlock
.
getAABB
().
getIntersection
(
generationDomain
),
Vector3
<
real_t
>
(
params
.
spacing
)
*
real_c
(
0.5
),
Vector3
<
real_t
>
(
params
.
spacing
)
*
real_c
(
0.5
)
+
params
.
shift
,
params
.
spacing
);
it
!=
grid_generator
::
SCIterator
();
++
it
)
...
...
apps/benchmarks/GranularGas/PE_LoadBalancing.cpp
View file @
5e0f42c8
...
...
@@ -268,7 +268,7 @@ int main( int argc, char ** argv )
for
(
auto
&
currentBlock
:
*
forest
)
{
for
(
auto
it
=
grid_generator
::
SCIterator
(
currentBlock
.
getAABB
().
getIntersection
(
generationDomain
),
Vector3
<
real_t
>
(
params
.
spacing
)
*
real_c
(
0.5
),
Vector3
<
real_t
>
(
params
.
spacing
)
*
real_c
(
0.5
)
+
params
.
shift
,
params
.
spacing
);
it
!=
grid_generator
::
SCIterator
();
++
it
)
...
...
apps/benchmarks/GranularGas/Parameters.cpp
View file @
5e0f42c8
...
...
@@ -42,6 +42,9 @@ void loadFromConfig(Parameters& params, const Config::BlockHandle& cfg)
params
.
spacing
=
cfg
.
getParameter
<
real_t
>
(
"spacing"
,
real_t
(
1.0
)
);
WALBERLA_LOG_INFO_ON_ROOT
(
"spacing: "
<<
params
.
spacing
);
params
.
shift
=
cfg
.
getParameter
<
Vec3
>
(
"shift"
,
Vec3
(
real_t
(
0.1
),
real_t
(
0.1
),
real_t
(
0.1
))
);
WALBERLA_LOG_INFO_ON_ROOT
(
"shift: "
<<
params
.
shift
);
params
.
radius
=
cfg
.
getParameter
<
real_t
>
(
"radius"
,
real_t
(
0.5
)
);
WALBERLA_LOG_INFO_ON_ROOT
(
"radius: "
<<
params
.
radius
);
...
...
@@ -135,6 +138,7 @@ void saveToSQL(const Parameters& params,
realProperties
[
"spacing"
]
=
double_c
(
params
.
spacing
);
realProperties
[
"radius"
]
=
double_c
(
params
.
radius
);
...
...
apps/benchmarks/GranularGas/Parameters.h
View file @
5e0f42c8
...
...
@@ -39,6 +39,7 @@ struct Parameters
std
::
string
sorting
=
"none"
;
Vec3
normal
=
Vec3
(
real_t
(
1.0
),
real_t
(
1.0
),
real_t
(
1.0
));
real_t
spacing
=
real_t
(
1.0
);
Vec3
shift
=
Vec3
(
real_t
(
0.1
),
real_t
(
0.1
),
real_t
(
0.1
));
real_t
radius
=
real_t
(
0.5
);
bool
bBarrier
=
false
;
bool
storeNodeTimings
=
false
;
...
...
apps/benchmarks/GranularGas/generateConfig.py
View file @
5e0f42c8
...
...
@@ -7,6 +7,7 @@ cfg = Config()
cfg
.
addParameter
(
"sorting"
,
"std::string"
,
'"none"'
)
cfg
.
addParameter
(
"normal"
,
"Vec3"
,
"Vec3(real_t(1.0), real_t(1.0), real_t(1.0))"
)
cfg
.
addParameter
(
"spacing"
,
"real_t"
,
"real_t(1.0)"
)
cfg
.
addParameter
(
"shift"
,
"Vec3"
,
"Vec3(real_t(0.1), real_t(0.1), real_t(0.1))"
)
cfg
.
addParameter
(
"radius"
,
"real_t"
,
"real_t(0.5)"
)
cfg
.
addParameter
(
"bBarrier"
,
"bool"
,
"false"
)
cfg
.
addParameter
(
"storeNodeTimings"
,
"bool"
,
"false"
)
...
...
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