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
03a5843c
Commit
03a5843c
authored
Jul 6, 2018
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Begin connectivity crs storage (test for efficiency)
parent
97f6e3e8
No related branches found
No related tags found
1 merge request
!6
Feature/crs
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mesh/Connectivity3D.hpp
+19
-0
19 additions, 0 deletions
src/mesh/Connectivity3D.hpp
with
19 additions
and
0 deletions
src/mesh/Connectivity3D.hpp
+
19
−
0
View file @
03a5843c
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#define CONNECTIVITY_3D_HPP
#define CONNECTIVITY_3D_HPP
#include
<Kokkos_Core.hpp>
#include
<Kokkos_Core.hpp>
#include
<Kokkos_StaticCrsGraph.hpp>
#include
<PastisAssert.hpp>
#include
<PastisAssert.hpp>
#include
<TinyVector.hpp>
#include
<TinyVector.hpp>
...
@@ -297,6 +298,24 @@ private:
...
@@ -297,6 +298,24 @@ private:
}
}
m_face_nb_cells
=
face_nb_cells
;
m_face_nb_cells
=
face_nb_cells
;
std
::
vector
<
std
::
vector
<
unsigned
int
>>
face_to_cell_vector
(
m_number_of_faces
);
{
size_t
l
=
0
;
for
(
const
auto
&
face_cells_vector
:
face_cells_map
)
{
const
auto
&
cells_info_vector
=
face_cells_vector
.
second
;
std
::
vector
<
unsigned
int
>&
cells_vector
=
face_to_cell_vector
[
l
];
cells_vector
.
resize
(
cells_info_vector
.
size
());
for
(
size_t
j
=
0
;
j
<
cells_info_vector
.
size
();
++
j
)
{
const
auto
&
[
cell_number
,
local_face_in_cell
,
reversed
]
=
cells_info_vector
[
j
];
cells_vector
[
j
]
=
cell_number
;
}
++
l
;
}
}
typedef
Kokkos
::
StaticCrsGraph
<
unsigned
int
,
Kokkos
::
HostSpace
>
StaticCrsGraphType
;
StaticCrsGraphType
face_to_cell_matrix
=
Kokkos
::
create_staticcrsgraph
<
StaticCrsGraphType
>
(
"face_to_cell_matrix"
,
face_to_cell_vector
);
#warning check that the number of cell per faces is <=2
#warning check that the number of cell per faces is <=2
Kokkos
::
View
<
unsigned
int
**>
face_cells
(
"face_cells"
,
face_cells_map
.
size
(),
2
);
Kokkos
::
View
<
unsigned
int
**>
face_cells
(
"face_cells"
,
face_cells_map
.
size
(),
2
);
...
...
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