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
00d01154
Commit
00d01154
authored
7 years ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Use GraphRowViewConst::length instead of number of cells table
parent
44843f95
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!6
Feature/crs
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scheme/AcousticSolver.hpp
+2
-6
2 additions, 6 deletions
src/scheme/AcousticSolver.hpp
with
2 additions
and
6 deletions
src/scheme/AcousticSolver.hpp
+
2
−
6
View file @
00d01154
...
@@ -99,13 +99,11 @@ private:
...
@@ -99,13 +99,11 @@ private:
KOKKOS_INLINE_FUNCTION
KOKKOS_INLINE_FUNCTION
const
Kokkos
::
View
<
const
Rdd
*>
const
Kokkos
::
View
<
const
Rdd
*>
computeAr
(
const
Kokkos
::
View
<
const
Rdd
**>&
Ajr
)
{
computeAr
(
const
Kokkos
::
View
<
const
Rdd
**>&
Ajr
)
{
const
Kokkos
::
View
<
const
unsigned
short
*>
node_nb_cells
=
m_connectivity
.
nodeNbCells
();
Kokkos
::
parallel_for
(
m_mesh
.
numberOfNodes
(),
KOKKOS_LAMBDA
(
const
int
&
r
)
{
Kokkos
::
parallel_for
(
m_mesh
.
numberOfNodes
(),
KOKKOS_LAMBDA
(
const
int
&
r
)
{
Rdd
sum
=
zero
;
Rdd
sum
=
zero
;
const
auto
&
node_to_cell
=
m_connectivity
.
m_node_to_cell_matrix
.
rowConst
(
r
);
const
auto
&
node_to_cell
=
m_connectivity
.
m_node_to_cell_matrix
.
rowConst
(
r
);
const
auto
&
node_to_cell_local_node
=
m_connectivity
.
m_node_to_cell_local_node_matrix
.
rowConst
(
r
);
const
auto
&
node_to_cell_local_node
=
m_connectivity
.
m_node_to_cell_local_node_matrix
.
rowConst
(
r
);
for
(
in
t
j
=
0
;
j
<
node_
nb
_cell
s
(
r
)
;
++
j
)
{
for
(
size_
t
j
=
0
;
j
<
node_
to
_cell
.
length
;
++
j
)
{
const
unsigned
int
J
=
node_to_cell
(
j
);
const
unsigned
int
J
=
node_to_cell
(
j
);
const
unsigned
int
R
=
node_to_cell_local_node
(
j
);
const
unsigned
int
R
=
node_to_cell_local_node
(
j
);
sum
+=
Ajr
(
J
,
R
);
sum
+=
Ajr
(
J
,
R
);
...
@@ -122,14 +120,12 @@ private:
...
@@ -122,14 +120,12 @@ private:
const
Kokkos
::
View
<
const
Rd
**>&
Cjr
,
const
Kokkos
::
View
<
const
Rd
**>&
Cjr
,
const
Kokkos
::
View
<
const
Rd
*>&
uj
,
const
Kokkos
::
View
<
const
Rd
*>&
uj
,
const
Kokkos
::
View
<
const
double
*>&
pj
)
{
const
Kokkos
::
View
<
const
double
*>&
pj
)
{
const
Kokkos
::
View
<
const
unsigned
short
*>&
node_nb_cells
=
m_connectivity
.
nodeNbCells
();
Kokkos
::
parallel_for
(
m_mesh
.
numberOfNodes
(),
KOKKOS_LAMBDA
(
const
int
&
r
)
{
Kokkos
::
parallel_for
(
m_mesh
.
numberOfNodes
(),
KOKKOS_LAMBDA
(
const
int
&
r
)
{
Rd
&
br
=
m_br
(
r
);
Rd
&
br
=
m_br
(
r
);
br
=
zero
;
br
=
zero
;
const
auto
&
node_to_cell
=
m_connectivity
.
m_node_to_cell_matrix
.
rowConst
(
r
);
const
auto
&
node_to_cell
=
m_connectivity
.
m_node_to_cell_matrix
.
rowConst
(
r
);
const
auto
&
node_to_cell_local_node
=
m_connectivity
.
m_node_to_cell_local_node_matrix
.
rowConst
(
r
);
const
auto
&
node_to_cell_local_node
=
m_connectivity
.
m_node_to_cell_local_node_matrix
.
rowConst
(
r
);
for
(
in
t
j
=
0
;
j
<
node_
nb
_cell
s
(
r
)
;
++
j
)
{
for
(
size_
t
j
=
0
;
j
<
node_
to
_cell
.
length
;
++
j
)
{
const
unsigned
int
J
=
node_to_cell
(
j
);
const
unsigned
int
J
=
node_to_cell
(
j
);
const
unsigned
int
R
=
node_to_cell_local_node
(
j
);
const
unsigned
int
R
=
node_to_cell_local_node
(
j
);
br
+=
Ajr
(
J
,
R
)
*
uj
(
J
)
+
pj
(
J
)
*
Cjr
(
J
,
R
);
br
+=
Ajr
(
J
,
R
)
*
uj
(
J
)
+
pj
(
J
)
*
Cjr
(
J
,
R
);
...
...
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