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
f71f5db7
Commit
f71f5db7
authored
Sep 4, 2018
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Add number of item access
parent
a0d1c80f
No related branches found
No related tags found
1 merge request
!7
Feature/itemvalue
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mesh/Connectivity.hpp
+11
-3
11 additions, 3 deletions
src/mesh/Connectivity.hpp
src/mesh/IConnectivity.hpp
+36
-0
36 additions, 0 deletions
src/mesh/IConnectivity.hpp
with
47 additions
and
3 deletions
src/mesh/Connectivity.hpp
+
11
−
3
View file @
f71f5db7
...
...
@@ -439,7 +439,7 @@ class Connectivity final
}
KOKKOS_INLINE_FUNCTION
size_t
numberOfNodes
()
const
size_t
numberOfNodes
()
const
final
{
const
auto
&
node_to_cell_matrix
=
this
->
getMatrix
(
ItemType
::
node
,
ItemType
::
cell
);
...
...
@@ -447,7 +447,15 @@ class Connectivity final
}
KOKKOS_INLINE_FUNCTION
size_t
numberOfFaces
()
const
size_t
numberOfEdges
()
const
final
{
const
auto
&
edge_to_node_matrix
=
this
->
getMatrix
(
ItemType
::
edge
,
ItemType
::
node
);
return
edge_to_node_matrix
.
numRows
();
}
KOKKOS_INLINE_FUNCTION
size_t
numberOfFaces
()
const
final
{
const
auto
&
face_to_node_matrix
=
this
->
getMatrix
(
ItemType
::
face
,
ItemType
::
cell
);
...
...
@@ -455,7 +463,7 @@ class Connectivity final
}
KOKKOS_INLINE_FUNCTION
size_t
numberOfCells
()
const
size_t
numberOfCells
()
const
final
{
const
auto
&
cell_to_node_matrix
=
this
->
getMatrix
(
ItemType
::
cell
,
ItemType
::
node
);
...
...
This diff is collapsed.
Click to expand it.
src/mesh/IConnectivity.hpp
+
36
−
0
View file @
f71f5db7
...
...
@@ -10,6 +10,42 @@ struct IConnectivity
getMatrix
(
const
ItemType
&
item_type_0
,
const
ItemType
&
item_type_1
)
const
=
0
;
virtual
size_t
numberOfNodes
()
const
=
0
;
virtual
size_t
numberOfEdges
()
const
=
0
;
virtual
size_t
numberOfFaces
()
const
=
0
;
virtual
size_t
numberOfCells
()
const
=
0
;
template
<
ItemType
item_type
>
size_t
numberOf
()
const
=
delete
;
template
<
>
KOKKOS_INLINE_FUNCTION
size_t
numberOf
<
ItemType
::
node
>
()
const
{
return
this
->
numberOfNodes
();
}
template
<
>
KOKKOS_INLINE_FUNCTION
size_t
numberOf
<
ItemType
::
edge
>
()
const
{
return
this
->
numberOfEdges
();
}
template
<
>
KOKKOS_INLINE_FUNCTION
size_t
numberOf
<
ItemType
::
face
>
()
const
{
return
this
->
numberOfFaces
();
}
template
<
>
KOKKOS_INLINE_FUNCTION
size_t
numberOf
<
ItemType
::
cell
>
()
const
{
return
this
->
numberOfCells
();
}
IConnectivity
()
=
default
;
IConnectivity
(
const
IConnectivity
&
)
=
delete
;
~
IConnectivity
()
=
default
;
...
...
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
sign in
to comment