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
4133ece9
Commit
4133ece9
authored
3 years ago
by
Anna Wellmann
Browse files
Options
Downloads
Patches
Plain Diff
Fix formatting in tubulence intensity calculation
parent
79cd2c54
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!104
Add Communication Hiding to GPU version
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/gpu/VirtualFluids_GPU/Calculation/CalcTurbulenceIntensity.cpp
+5
-5
5 additions, 5 deletions
...VirtualFluids_GPU/Calculation/CalcTurbulenceIntensity.cpp
src/gpu/VirtualFluids_GPU/GPU/TurbulenceIntensity.cu
+1
-7
1 addition, 7 deletions
src/gpu/VirtualFluids_GPU/GPU/TurbulenceIntensity.cu
with
6 additions
and
12 deletions
src/gpu/VirtualFluids_GPU/Calculation/CalcTurbulenceIntensity.cpp
+
5
−
5
View file @
4133ece9
...
...
@@ -149,7 +149,7 @@ void writeAllTiDatafToFile(Parameter *para, uint timestep)
void
writeTiStuffToFile
(
Parameter
*
para
,
uint
timestep
,
int
sizeOfTiArray
,
std
::
vector
<
real
*>
&
data
,
std
::
vector
<
std
::
string
>
&
datanames
)
{
////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////
// set filename
std
::
string
names
;
std
::
for_each
(
datanames
.
begin
(),
datanames
.
end
(),
[
&
names
](
const
std
::
string
&
s
)
{
return
names
+=
"_"
+
s
;
});
...
...
@@ -159,10 +159,10 @@ void writeTiStuffToFile(Parameter *para, uint timestep, int sizeOfTiArray, std::
////////////////////////////////////////////////////////////////////////
// set ofstream
std
::
ofstream
ostr
;
////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////
// open file
ostr
.
open
(
fname
);
////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////
// add header
ostr
<<
"index_sp"
;
for
(
auto
name
:
datanames
)
ostr
<<
"
\t
"
<<
name
;
...
...
@@ -175,8 +175,8 @@ void writeTiStuffToFile(Parameter *para, uint timestep, int sizeOfTiArray, std::
ostr
<<
"
\t
"
<<
dataset
[
i
];
ostr
<<
std
::
endl
;
}
////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////
// close file
ostr
.
close
();
////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/gpu/VirtualFluids_GPU/GPU/TurbulenceIntensity.cu
+
1
−
7
View file @
4133ece9
...
...
@@ -37,11 +37,6 @@ extern "C" __global__ void CalcTurbulenceIntensity(
unsigned
int
size_Mat
,
bool
isEvenTimestep
)
{
//////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
const
unsigned
k
=
vf
::
gpu
::
getNodeIndex
();
if
(
k
>=
size_Mat
)
...
...
@@ -73,7 +68,6 @@ extern "C" __global__ void CalcTurbulenceIntensity(
// velocity (for mean velocity)
vx_mean
[
k
]
=
vx_mean
[
k
]
+
vx
;
vy_mean
[
k
]
=
vy_mean
[
k
]
+
vy
;
vz_mean
[
k
]
=
vz_mean
[
k
]
+
vz
;
vz_mean
[
k
]
=
vz_mean
[
k
]
+
vz
;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
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