Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itischler
waLBerla
Commits
4e4bd7f2
Commit
4e4bd7f2
authored
Apr 06, 2021
by
Christoph Rettinger
Browse files
Adapted benchmark cases to comply with asserts, fixed test case
parent
28d455fc
Changes
11
Hide whitespace changes
Inline
Side-by-side
apps/benchmarks/FluidParticleCoupling/ForcesOnSphereNearPlane.cpp
View file @
4e4bd7f2
...
...
@@ -309,6 +309,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
// create bounding planes
mesa_pd
::
data
::
Particle
p0
=
*
ps
->
create
(
true
);
p0
.
setPosition
(
simulationDomain
.
minCorner
());
p0
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p0
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
0
,
0
,
1
)
));
p0
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p0
.
setType
(
0
);
...
...
@@ -317,6 +318,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
mesa_pd
::
data
::
Particle
p1
=
*
ps
->
create
(
true
);
p1
.
setPosition
(
simulationDomain
.
maxCorner
());
p1
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p1
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
0
,
0
,
-
1
)
));
p1
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p1
.
setType
(
0
);
...
...
apps/benchmarks/FluidParticleCoupling/LubricationForceEvaluation.cpp
View file @
4e4bd7f2
...
...
@@ -443,6 +443,7 @@ int main( int argc, char **argv )
// create two planes
mesa_pd
::
data
::
Particle
&&
p0
=
*
ps
->
create
(
true
);
p0
.
setPosition
(
referenceVector
);
p0
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p0
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
1
,
0
,
0
)
));
p0
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
mesa_pd
::
data
::
particle_flags
::
set
(
p0
.
getFlagsRef
(),
mesa_pd
::
data
::
particle_flags
::
INFINITE
);
...
...
@@ -451,6 +452,7 @@ int main( int argc, char **argv )
mesa_pd
::
data
::
Particle
&&
p1
=
*
ps
->
create
(
true
);
p1
.
setPosition
(
Vector3
<
real_t
>
(
real_c
(
xSize
),
0
,
0
));
p1
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p1
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
-
1
,
0
,
0
)
));
p1
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
mesa_pd
::
data
::
particle_flags
::
set
(
p1
.
getFlagsRef
(),
mesa_pd
::
data
::
particle_flags
::
INFINITE
);
...
...
apps/benchmarks/FluidParticleCoupling/ObliqueDryCollision.cpp
View file @
4e4bd7f2
...
...
@@ -119,11 +119,13 @@ int main( int argc, char ** argv )
data
::
Particle
&&
p
=
*
ps
->
create
();
p
.
setPosition
(
Vec3
(
0
,
0
,
2
*
radius
));
p
.
setLinearVelocity
(
Vec3
(
uTin
,
0.
,
-
uNin
));
p
.
setInteractionRadius
(
radius
);
p
.
setType
(
0
);
// create plane
data
::
Particle
&&
p0
=
*
ps
->
create
(
true
);
p0
.
setPosition
(
Vec3
(
0
,
0
,
0
));
p0
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p0
.
setShapeID
(
ss
->
create
<
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
0
,
0
,
1
)));
p0
.
setType
(
0
);
data
::
particle_flags
::
set
(
p0
.
getFlagsRef
(),
data
::
particle_flags
::
INFINITE
);
...
...
apps/benchmarks/FluidParticleCoupling/ObliqueWetCollision.cpp
View file @
4e4bd7f2
...
...
@@ -370,6 +370,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
// create bounding planes
mesa_pd
::
data
::
Particle
&&
p0
=
*
ps
->
create
(
true
);
p0
.
setPosition
(
simulationDomain
.
minCorner
());
p0
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p0
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
0
,
0
,
1
)
));
p0
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p0
.
setType
(
0
);
...
...
@@ -381,6 +382,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
//only create top plane when no outflow BC should be set there
mesa_pd
::
data
::
Particle
&&
p1
=
*
ps
->
create
(
true
);
p1
.
setPosition
(
simulationDomain
.
maxCorner
());
p1
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p1
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
0
,
0
,
-
1
)
));
p1
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p1
.
setType
(
0
);
...
...
apps/benchmarks/FluidParticleCoupling/SettlingSphereInBox.cpp
View file @
4e4bd7f2
...
...
@@ -290,6 +290,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
// create bounding planes
mesa_pd
::
data
::
Particle
p0
=
*
ps
->
create
(
true
);
p0
.
setPosition
(
simulationDomain
.
minCorner
());
p0
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p0
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
0
,
0
,
1
)
));
p0
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p0
.
setType
(
0
);
...
...
@@ -298,6 +299,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
mesa_pd
::
data
::
Particle
p1
=
*
ps
->
create
(
true
);
p1
.
setPosition
(
simulationDomain
.
maxCorner
());
p1
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p1
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
0
,
0
,
-
1
)
));
p1
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p1
.
setType
(
0
);
...
...
@@ -306,6 +308,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
mesa_pd
::
data
::
Particle
p2
=
*
ps
->
create
(
true
);
p2
.
setPosition
(
simulationDomain
.
minCorner
());
p2
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p2
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
1
,
0
,
0
)
));
p2
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p2
.
setType
(
0
);
...
...
@@ -314,6 +317,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
mesa_pd
::
data
::
Particle
p3
=
*
ps
->
create
(
true
);
p3
.
setPosition
(
simulationDomain
.
maxCorner
());
p3
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p3
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
-
1
,
0
,
0
)
));
p3
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p3
.
setType
(
0
);
...
...
@@ -322,6 +326,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
mesa_pd
::
data
::
Particle
p4
=
*
ps
->
create
(
true
);
p4
.
setPosition
(
simulationDomain
.
minCorner
());
p4
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p4
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
0
,
1
,
0
)
));
p4
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p4
.
setType
(
0
);
...
...
@@ -330,6 +335,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
mesa_pd
::
data
::
Particle
p5
=
*
ps
->
create
(
true
);
p5
.
setPosition
(
simulationDomain
.
maxCorner
());
p5
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p5
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
0
,
-
1
,
0
)
));
p5
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p5
.
setType
(
0
);
...
...
apps/benchmarks/FluidParticleCoupling/SphereMovingWithPrescribedVelocity.cpp
View file @
4e4bd7f2
...
...
@@ -288,6 +288,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
{
mesa_pd
::
data
::
Particle
p2
=
*
ps
->
create
(
true
);
p2
.
setPosition
(
simulationDomain
.
minCorner
());
p2
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p2
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
1
,
0
,
0
)
));
p2
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p2
.
setType
(
0
);
...
...
@@ -297,6 +298,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
mesa_pd
::
data
::
Particle
p3
=
*
ps
->
create
(
true
);
p3
.
setPosition
(
simulationDomain
.
maxCorner
());
p3
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p3
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
-
1
,
0
,
0
)
));
p3
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p3
.
setType
(
0
);
...
...
@@ -306,6 +308,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
mesa_pd
::
data
::
Particle
p4
=
*
ps
->
create
(
true
);
p4
.
setPosition
(
simulationDomain
.
minCorner
());
p4
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p4
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
0
,
1
,
0
)
));
p4
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p4
.
setType
(
0
);
...
...
@@ -315,6 +318,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
mesa_pd
::
data
::
Particle
p5
=
*
ps
->
create
(
true
);
p5
.
setPosition
(
simulationDomain
.
maxCorner
());
p5
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p5
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
0
,
-
1
,
0
)
));
p5
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p5
.
setType
(
0
);
...
...
apps/benchmarks/FluidParticleCoupling/SphereWallCollision.cpp
View file @
4e4bd7f2
...
...
@@ -367,6 +367,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
// create bounding planes
mesa_pd
::
data
::
Particle
&&
p0
=
*
ps
->
create
(
true
);
p0
.
setPosition
(
simulationDomain
.
minCorner
());
p0
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p0
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
0
,
0
,
1
)
));
p0
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p0
.
setType
(
0
);
...
...
@@ -378,6 +379,7 @@ void createPlaneSetup(const shared_ptr<mesa_pd::data::ParticleStorage> & ps, con
//only create top plane when no outflow BC should be set there
mesa_pd
::
data
::
Particle
&&
p1
=
*
ps
->
create
(
true
);
p1
.
setPosition
(
simulationDomain
.
maxCorner
());
p1
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p1
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
0
,
0
,
-
1
)
));
p1
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p1
.
setType
(
0
);
...
...
apps/benchmarks/FluidParticleCouplingWithLoadBalancing/FluidParticleWorkloadDistribution.cpp
View file @
4e4bd7f2
...
...
@@ -389,6 +389,7 @@ void createPlane( const shared_ptr<mesa_pd::data::ParticleStorage> & ps, const s
{
mesa_pd
::
data
::
Particle
&&
p0
=
*
ps
->
create
(
true
);
p0
.
setPosition
(
position
);
p0
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p0
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
normal
.
getNormalized
()
));
p0
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p0
.
setType
(
0
);
...
...
apps/benchmarks/FluidParticleCouplingWithLoadBalancing/FluidParticleWorkloadEvaluation.cpp
View file @
4e4bd7f2
...
...
@@ -460,6 +460,7 @@ int main( int argc, char **argv )
mesa_pd
::
data
::
Particle
&&
p0
=
*
ps
->
create
(
true
);
p0
.
setPosition
(
generationDomain
.
minCorner
());
p0
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p0
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
0
,
0
,
1
)
));
p0
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p0
.
setType
(
0
);
...
...
@@ -468,6 +469,7 @@ int main( int argc, char **argv )
mesa_pd
::
data
::
Particle
&&
p1
=
*
ps
->
create
(
true
);
p1
.
setPosition
(
generationDomain
.
maxCorner
());
p1
.
setInteractionRadius
(
std
::
numeric_limits
<
real_t
>::
infinity
());
p1
.
setShapeID
(
ss
->
create
<
mesa_pd
::
data
::
HalfSpace
>
(
Vector3
<
real_t
>
(
0
,
0
,
-
1
)
));
p1
.
setOwner
(
mpi
::
MPIManager
::
instance
()
->
rank
());
p1
.
setType
(
0
);
...
...
apps/benchmarks/GranularGas/CreateParticles.cpp
View file @
4e4bd7f2
...
...
@@ -30,6 +30,7 @@ data::ParticleStorage::iterator createPlane( data::ParticleStorage& ps,
{
auto
p0
=
ps
.
create
(
true
);
p0
->
getPositionRef
()
=
pos
;
p0
->
getInteractionRadiusRef
()
=
std
::
numeric_limits
<
real_t
>::
infinity
();
p0
->
getShapeIDRef
()
=
ss
.
create
<
data
::
HalfSpace
>
(
normal
);
p0
->
getOwnerRef
()
=
walberla
::
mpi
::
MPIManager
::
instance
()
->
rank
();
p0
->
getTypeRef
()
=
0
;
...
...
tests/mesa_pd/ContactDetection.cpp
View file @
4e4bd7f2
...
...
@@ -80,7 +80,7 @@ int main( const int particlesPerAxis = 2, const real_t radius = real_t(0.9) )
math
::
seedRandomGenerator
(
static_cast
<
unsigned
int
>
(
1337
*
walberla
::
mpi
::
MPIManager
::
instance
()
->
worldRank
())
);
const
real_t
s
pacing
=
2.
1
_r
*
radius
;
const
real_t
generationS
pacing
=
1
_r
;
WALBERLA_LOG_INFO_ON_ROOT
(
"*** BLOCKFOREST ***"
);
const
int
centerParticles
=
particlesPerAxis
*
particlesPerAxis
*
particlesPerAxis
;
...
...
@@ -115,13 +115,14 @@ int main( const int particlesPerAxis = 2, const real_t radius = real_t(0.9) )
auto
ps
=
std
::
make_shared
<
data
::
ParticleStorage
>
(
100
);
auto
ss
=
std
::
make_shared
<
data
::
ShapeStorage
>
();
ParticleAccessorWithShape
accessor
(
ps
,
ss
);
data
::
LinkedCells
lc
(
localDomain
.
getExtended
(
spacing
),
spacing
);
const
real_t
linkedCellSize
=
2.1
_r
*
radius
;
data
::
LinkedCells
lc
(
localDomain
.
getExtended
(
linkedCellSize
),
linkedCellSize
);
auto
smallSphere
=
ss
->
create
<
data
::
Sphere
>
(
radius
);
ss
->
shapes
[
smallSphere
]
->
updateMassAndInertia
(
real_t
(
2707
));
for
(
auto
&
iBlk
:
*
forest
)
{
for
(
auto
pt
:
grid_generator
::
SCGrid
(
iBlk
.
getAABB
(),
Vector3
<
real_t
>
(
spacing
,
spacing
,
s
pacing
)
*
real_c
(
0.5
),
s
pacing
))
for
(
auto
pt
:
grid_generator
::
SCGrid
(
iBlk
.
getAABB
(),
Vector3
<
real_t
>
(
generationSpacing
,
generationSpacing
,
generationS
pacing
)
*
real_c
(
0.5
),
generationS
pacing
))
{
WALBERLA_CHECK
(
iBlk
.
getAABB
().
contains
(
pt
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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