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
Kirill Terekhov
INMOST
Commits
09a12f7a
Commit
09a12f7a
authored
Apr 20, 2017
by
Kirill Terekhov
Browse files
Fix MFD-ES with openmp
parent
0c62d384
Changes
1
Hide whitespace changes
Inline
Side-by-side
Examples/MFD-ES/main.cpp
View file @
09a12f7a
...
...
@@ -410,7 +410,6 @@ int main(int argc,char ** argv)
real
yF
[
3
];
//center of the face
real
nF
[
3
];
//normal to the face
real
aF
;
//area of the face
real
vP
=
c
.
Volume
();
//volume of the cell
c
.
Centroid
(
xP
);
rMatrix
N
(
faces
.
size
(),
3
),
R
(
faces
.
size
(),
3
);
//big gradient matrix, co-normals, directions
for
(
int
k
=
0
;
k
<
faces
.
size
();
++
k
)
//loop over faces
...
...
@@ -431,7 +430,7 @@ int main(int argc,char ** argv)
tag_i
[
faces
[
k
]]
=
k
;
}
//end of loop over faces
W
=
N
*
(
N
.
Transpose
()
*
R
).
Invert
(
true
).
first
*
N
.
Transpose
();
//stability part
W
+=
(
rMatrix
::
Unit
(
faces
.
size
())
-
R
*
(
R
.
Transpose
()
*
R
).
Invert
(
true
).
first
*
R
.
Transpose
())
*
(
4.0
/
faces
.
size
()
*
W
.
Trace
());
W
+=
(
rMatrix
::
Unit
(
faces
.
size
())
-
R
*
(
R
.
Transpose
()
*
R
).
Invert
(
true
).
first
*
R
.
Transpose
())
*
(
4.0
/
(
faces
.
size
()
)
*
W
.
Trace
());
}
//end of loop over cells
//initialize normal velocity
...
...
@@ -629,7 +628,7 @@ int main(int argc,char ** argv)
Automatizator
::
MakeCurrent
(
&
aut
);
#if defined(USE_OMP)
#pragma omp parallel
#pragma omp parallel
for
#endif
for
(
integer
it
=
0
;
it
<
m
.
CellLastLocalID
();
++
it
)
if
(
m
.
isValidCell
(
it
)
)
//loop over cells
{
...
...
@@ -851,4 +850,4 @@ int main(int argc,char ** argv)
#endif
Solver
::
Finalize
();
// Finalize solver and close MPI activity
return
0
;
}
\ No newline at end of file
}
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