Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
ee9eeaac
Commit
ee9eeaac
authored
7 years ago
by
Fanny CHOPOT
Browse files
Options
Downloads
Patches
Plain Diff
correction fonction updateVolumeCenter()
parent
4f8921a0
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mesh/MeshData.hpp
+11
-10
11 additions, 10 deletions
src/mesh/MeshData.hpp
with
11 additions
and
10 deletions
src/mesh/MeshData.hpp
+
11
−
10
View file @
ee9eeaac
...
...
@@ -72,12 +72,11 @@ private:
});
}
// Ajout fonction pour calculer h_i+1/2
KOKKOS_INLINE_FUNCTION
void
_updateVolumeCenter
()
{
const
Kokkos
::
View
<
const
unsigned
int
**>&
cell_node
s
=
m_mesh
.
connectivity
().
cellNode
s
();
const
Kokkos
::
View
<
const
unsigned
int
**>&
face_cell
s
=
m_mesh
.
connectivity
().
faceCell
s
();
const
Kokkos
::
View
<
const
unsigned
short
*>
face_nb_cells
=
m_mesh
.
connectivity
().
faceNbCells
();
...
...
@@ -88,14 +87,16 @@ private:
const
Kokkos
::
View
<
const
unsigned
short
*>
cell_nb_faces
=
m_mesh
.
connectivity
().
cellNbFaces
();
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
(),
KOKKOS_LAMBDA
(
const
int
&
j
){
const
Kokkos
::
View
<
const
Rd
*>
xr
=
m_mesh
.
xr
();
Kokkos
::
parallel_for
(
m_mesh
.
numberOfFaces
(),
KOKKOS_LAMBDA
(
const
int
&
l
){
double
sum_cjr_xj
=
0
;
for
(
int
l
=
0
;
l
<
cell_nb_face
s
(
j
);
++
l
)
{
for
(
int
R
=
0
;
R
<
face_
nb_
cells
[
l
];
R
++
)
{
sum_cjr_xj
+=
(
m_xj
[
cell_nodes
(
j
,
R
)],
m_Cjr
(
j
,
face_cell_local_face
(
l
,
R
))
);
}
for
(
int
l
ocal_cell_number
=
0
;
local_cell_number
<
face_nb_cell
s
(
l
);
++
l
ocal_cell_number
)
{
int
j
=
face_cells
(
l
,
local_cell_number
);
int
local_face_number_in_cell
=
face_cell_local_face
(
l
,
local_cell_number
);
sum_cjr_xj
-=
(
m_xj
[
j
]
-
xr
(
l
),
m_Cjr
(
j
,
local_face_number_in_cell
));
}
m_Vl
[
j
]
=
inv_dimension
*
sum_cjr_xj
;
m_Vl
[
l
]
=
sum_cjr_xj
;
});
}
...
...
@@ -151,7 +152,7 @@ public:
m_Cjr
(
"Cjr"
,
mesh
.
numberOfCells
(),
mesh
.
connectivity
().
maxNbNodePerCell
()),
m_xj
(
"xj"
,
mesh
.
numberOfCells
()),
m_Vj
(
"Vj"
,
mesh
.
numberOfCells
()),
m_Vl
(
"Vl"
,
mesh
.
numberOf
Cell
s
())
m_Vl
(
"Vl"
,
mesh
.
numberOf
Face
s
())
{
if
(
dimension
==
1
)
{
// in 1d Cjr are computed once for all
...
...
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