Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VirtualFluids
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iRMB
VirtualFluids
Commits
ad6983e3
Commit
ad6983e3
authored
1 year ago
by
Martin Schönherr
Browse files
Options
Downloads
Patches
Plain Diff
fix merge conflicts
parent
df328891
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!365
Measure points
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/gpu/core/Calculation/Simulation.cpp
+22
-11
22 additions, 11 deletions
src/gpu/core/Calculation/Simulation.cpp
with
22 additions
and
11 deletions
src/gpu/core/Calculation/Simulation.cpp
+
22
−
11
View file @
ad6983e3
...
...
@@ -515,25 +515,36 @@ void Simulation::calculateTimestep(uint timestep)
////////////////////////////////////////////////////////////////////////////////
// set MP-Time
if
(
para
->
getUseMeasurePoints
())
{
if
((
timestep
%
para
->
getTimestepForM
P
())
==
0
)
{
unsigned
int
valuesPerClockCycle
=
(
unsigned
int
)(
para
->
getclockCycleForM
P
()
/
para
->
getTimestepForM
P
());
if
((
timestep
%
para
->
getTimestepForM
easurePoints
())
==
0
)
{
unsigned
int
valuesPerClockCycle
=
(
unsigned
int
)(
para
->
getclockCycleForM
easurePoints
()
/
para
->
getTimestepForM
easurePoints
());
for
(
int
lev
=
para
->
getCoarse
();
lev
<=
para
->
getFine
();
lev
++
)
{
calculateMeasurePoints
(
para
->
getParD
(
lev
)
->
VxMP
,
para
->
getParD
(
lev
)
->
VyMP
,
para
->
getParD
(
lev
)
->
VzMP
,
para
->
getParD
(
lev
)
->
RhoMP
,
para
->
getParD
(
lev
)
->
kMP
,
para
->
getParD
(
lev
)
->
numberOfPointskMP
,
valuesPerClockCycle
,
timestepForMeasuringPoints
,
para
->
getParD
(
lev
)
->
typeOfGridNode
,
para
->
getParD
(
lev
)
->
neighborX
,
para
->
getParD
(
lev
)
->
neighborY
,
para
->
getParD
(
lev
)
->
neighborZ
,
para
->
getParD
(
lev
)
->
numberOfNodes
,
para
->
getParD
(
lev
)
->
distributions
.
f
[
0
],
para
->
getParD
(
lev
)
->
numberofthreads
,
para
->
getParD
(
lev
)
->
isEvenTimestep
);
calculateMeasurePoints
(
para
->
getParD
(
lev
)
->
velocityInXdirectionAtMeasurePoints
,
para
->
getParD
(
lev
)
->
velocityInYdirectionAtMeasurePoints
,
para
->
getParD
(
lev
)
->
velocityInZdirectionAtMeasurePoints
,
para
->
getParD
(
lev
)
->
densityAtMeasurePoints
,
para
->
getParD
(
lev
)
->
indicesOfMeasurePoints
,
para
->
getParD
(
lev
)
->
numberOfMeasurePoints
,
valuesPerClockCycle
,
timestepForMeasuringPoints
,
para
->
getParD
(
lev
)
->
typeOfGridNode
,
para
->
getParD
(
lev
)
->
neighborX
,
para
->
getParD
(
lev
)
->
neighborY
,
para
->
getParD
(
lev
)
->
neighborZ
,
para
->
getParD
(
lev
)
->
numberOfNodes
,
para
->
getParD
(
lev
)
->
distributions
.
f
[
0
],
para
->
getParD
(
lev
)
->
numberofthreads
,
para
->
getParD
(
lev
)
->
isEvenTimestep
);
}
timestepForMeasuringPoints
++
;
}
// Copy Measure Values
if
((
timestep
%
(
unsigned
int
)
para
->
getclockCycleForM
P
())
==
0
)
{
if
((
timestep
%
(
unsigned
int
)
para
->
getclockCycleForM
easurePoints
())
==
0
)
{
for
(
int
lev
=
para
->
getCoarse
();
lev
<=
para
->
getFine
();
lev
++
)
{
cudaMemoryManager
->
cudaCopyMeasurePointsToHost
(
lev
);
para
->
copyMeasurePointsArrayToVector
(
lev
);
VF_LOG_INFO
(
"Write MeasurePoints at level = {} and timestep = {}"
,
lev
,
timestep
);
for
(
int
j
=
0
;
j
<
(
int
)
para
->
getParH
(
lev
)
->
M
P
.
size
();
j
++
)
for
(
int
j
=
0
;
j
<
(
int
)
para
->
getParH
(
lev
)
->
M
easurePointVector
.
size
();
j
++
)
{
MeasurePointWriter
::
writeMeasurePoints
(
para
.
get
(),
lev
,
j
,
timestep
);
}
...
...
@@ -765,7 +776,7 @@ void Simulation::readAndWriteFiles(uint timestep)
////////////////////////////////////////////////////////////////////////
//calculate mean on host
////////////////////////////////////////////////////////////////////////
if
(
para
->
getCalcMean
()
&&
((
int
)
timestep
>
para
->
getTimeCalcMedStart
())
&&
((
int
)
timestep
<=
para
->
getTimeCalcMedEnd
())
&&
((
timestep
%
(
unsigned
int
)
para
->
getclockCycleForM
P
())
==
0
))
{
if
(
para
->
getCalcMean
()
&&
((
int
)
timestep
>
para
->
getTimeCalcMedStart
())
&&
((
int
)
timestep
<=
para
->
getTimeCalcMedEnd
())
&&
((
timestep
%
(
unsigned
int
)
para
->
getclockCycleForM
easurePoints
())
==
0
))
{
unsigned
int
tdiff
=
timestep
-
previousTimestepForAveraging
;
calcMean
(
para
.
get
(),
tdiff
);
/////////////////////////////////
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment