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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
44578541
Commit
44578541
authored
6 years ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Access to cell_face_is_reversed by function
parent
89a10084
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!6
Feature/crs
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mesh/Connectivity.hpp
+7
-2
7 additions, 2 deletions
src/mesh/Connectivity.hpp
src/mesh/MeshData.hpp
+3
-2
3 additions, 2 deletions
src/mesh/MeshData.hpp
with
10 additions
and
4 deletions
src/mesh/Connectivity.hpp
+
7
−
2
View file @
44578541
...
@@ -227,14 +227,17 @@ class Connectivity
...
@@ -227,14 +227,17 @@ class Connectivity
public:
public:
static
constexpr
size_t
dimension
=
Dimension
;
static
constexpr
size_t
dimension
=
Dimension
;
FaceValuePerCell
<
bool
>
m_cell_face_is_reversed
;
template
<
TypeOfItem
item_type_0
,
TypeOfItem
item_type_1
>
template
<
TypeOfItem
item_type_0
,
TypeOfItem
item_type_1
>
const
ConnectivityMatrix
&
itemToItemMatrix
()
const
const
ConnectivityMatrix
&
itemToItemMatrix
()
const
{
{
return
m_item_to_item_matrix
[
itemId
(
item_type_0
)][
itemId
(
item_type_1
)];
return
m_item_to_item_matrix
[
itemId
(
item_type_0
)][
itemId
(
item_type_1
)];
};
};
const
auto
&
cellFaceIsReversed
()
const
{
return
m_cell_face_is_reversed
;
}
const
auto
&
cellToNodeLocalCell
()
const
const
auto
&
cellToNodeLocalCell
()
const
{
{
return
m_cell_to_node_local_cell
;
return
m_cell_to_node_local_cell
;
...
@@ -263,6 +266,8 @@ class Connectivity
...
@@ -263,6 +266,8 @@ class Connectivity
private
:
private
:
ConnectivityMatrix
m_item_to_item_matrix
[
Dimension
+
1
][
Dimension
+
1
];
ConnectivityMatrix
m_item_to_item_matrix
[
Dimension
+
1
][
Dimension
+
1
];
FaceValuePerCell
<
const
bool
>
m_cell_face_is_reversed
;
NodeValuePerCell
<
const
unsigned
short
>
m_cell_to_node_local_cell
;
NodeValuePerCell
<
const
unsigned
short
>
m_cell_to_node_local_cell
;
CellValuePerFace
<
const
unsigned
short
>
m_face_to_cell_local_face
;
CellValuePerFace
<
const
unsigned
short
>
m_face_to_cell_local_face
;
...
...
This diff is collapsed.
Click to expand it.
src/mesh/MeshData.hpp
+
3
−
2
View file @
44578541
...
@@ -153,11 +153,12 @@ class MeshData
...
@@ -153,11 +153,12 @@ class MeshData
=
getConnectivityMatrix
<
TypeOfItem
::
cell
,
=
getConnectivityMatrix
<
TypeOfItem
::
cell
,
TypeOfItem
::
face
>
(
m_mesh
.
connectivity
());
TypeOfItem
::
face
>
(
m_mesh
.
connectivity
());
const
auto
&
cell_face_is_reversed
=
m_mesh
.
connectivity
().
cellFaceIsReversed
();
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
(),
KOKKOS_LAMBDA
(
const
int
&
j
)
{
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
(),
KOKKOS_LAMBDA
(
const
int
&
j
)
{
const
auto
&
cell_nodes
=
cell_to_node_matrix
.
rowConst
(
j
);
const
auto
&
cell_nodes
=
cell_to_node_matrix
.
rowConst
(
j
);
const
auto
&
cell_faces
=
cell_to_face_matrix
.
rowConst
(
j
);
const
auto
&
cell_faces
=
cell_to_face_matrix
.
rowConst
(
j
);
const
auto
&
cell_
face_is_reversed
=
m_mesh
.
connectivity
().
m_
cell_face_is_reversed
.
itemValues
(
j
);
const
auto
&
face_is_reversed
=
cell_face_is_reversed
.
itemValues
(
j
);
for
(
size_t
L
=
0
;
L
<
cell_faces
.
length
;
++
L
)
{
for
(
size_t
L
=
0
;
L
<
cell_faces
.
length
;
++
L
)
{
const
size_t
l
=
cell_faces
(
L
);
const
size_t
l
=
cell_faces
(
L
);
...
@@ -175,7 +176,7 @@ class MeshData
...
@@ -175,7 +176,7 @@ class MeshData
return
std
::
numeric_limits
<
size_t
>::
max
();
return
std
::
numeric_limits
<
size_t
>::
max
();
};
};
if
(
cell_
face_is_reversed
[
L
])
{
if
(
face_is_reversed
[
L
])
{
for
(
size_t
rl
=
0
;
rl
<
face_nodes
.
length
;
++
rl
)
{
for
(
size_t
rl
=
0
;
rl
<
face_nodes
.
length
;
++
rl
)
{
const
size_t
R
=
local_node_number_in_cell
(
face_nodes
(
rl
));
const
size_t
R
=
local_node_number_in_cell
(
face_nodes
(
rl
));
m_Cjr
(
j
,
R
)
-=
Nlr
(
l
,
rl
);
m_Cjr
(
j
,
R
)
-=
Nlr
(
l
,
rl
);
...
...
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