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
841a1420
Commit
841a1420
authored
Sep 27, 2021
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Add an external size function for convenience
parent
1b762f6c
No related branches found
No related tags found
1 merge request
!124
Add files for high order integration with quadratures
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/mesh/ItemValue.hpp
+7
-0
7 additions, 0 deletions
src/mesh/ItemValue.hpp
src/utils/Array.hpp
+7
-0
7 additions, 0 deletions
src/utils/Array.hpp
src/utils/SmallArray.hpp
+7
-0
7 additions, 0 deletions
src/utils/SmallArray.hpp
with
21 additions
and
0 deletions
src/mesh/ItemValue.hpp
+
7
−
0
View file @
841a1420
...
@@ -175,6 +175,13 @@ class ItemValue
...
@@ -175,6 +175,13 @@ class ItemValue
~
ItemValue
()
=
default
;
~
ItemValue
()
=
default
;
};
};
template
<
typename
DataType
,
ItemType
item_type
,
typename
ConnectivityPtr
>
PUGS_INLINE
size_t
size
(
const
ItemValue
<
DataType
,
item_type
,
ConnectivityPtr
>&
item_value
)
{
return
item_value
.
numberOfItems
();
}
template
<
typename
DataType
>
template
<
typename
DataType
>
using
NodeValue
=
ItemValue
<
DataType
,
ItemType
::
node
>
;
using
NodeValue
=
ItemValue
<
DataType
,
ItemType
::
node
>
;
...
...
This diff is collapsed.
Click to expand it.
src/utils/Array.hpp
+
7
−
0
View file @
841a1420
...
@@ -140,6 +140,13 @@ class [[nodiscard]] Array
...
@@ -140,6 +140,13 @@ class [[nodiscard]] Array
~
Array
()
=
default
;
~
Array
()
=
default
;
};
};
template
<
typename
DataType
>
PUGS_INLINE
size_t
size
(
const
Array
<
DataType
>&
array
)
{
return
array
.
size
();
}
template
<
typename
DataType
,
typename
...
RT
>
template
<
typename
DataType
,
typename
...
RT
>
PUGS_INLINE
Array
<
DataType
>
PUGS_INLINE
Array
<
DataType
>
encapsulate
(
const
Kokkos
::
View
<
DataType
*
,
RT
...
>&
values
)
encapsulate
(
const
Kokkos
::
View
<
DataType
*
,
RT
...
>&
values
)
...
...
This diff is collapsed.
Click to expand it.
src/utils/SmallArray.hpp
+
7
−
0
View file @
841a1420
...
@@ -128,6 +128,13 @@ class [[nodiscard]] SmallArray
...
@@ -128,6 +128,13 @@ class [[nodiscard]] SmallArray
~
SmallArray
()
=
default
;
~
SmallArray
()
=
default
;
};
};
template
<
typename
DataType
>
PUGS_INLINE
size_t
size
(
const
SmallArray
<
DataType
>&
array
)
{
return
array
.
size
();
}
// map, multimap, unordered_map and stack cannot be copied this way
// map, multimap, unordered_map and stack cannot be copied this way
template
<
typename
Container
>
template
<
typename
Container
>
PUGS_INLINE
SmallArray
<
std
::
remove_const_t
<
typename
Container
::
value_type
>>
PUGS_INLINE
SmallArray
<
std
::
remove_const_t
<
typename
Container
::
value_type
>>
...
...
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