Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GTMesh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Tomáš Jakubec
GTMesh
Commits
4403ff5a
There was an error fetching the commit references. Please try again later.
Commit
4403ff5a
authored
5 years ago
by
Tomáš Jakubec
Browse files
Options
Downloads
Patches
Plain Diff
not that good :(
parent
700a26b6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Unstructured_mesh/MeshDataContainer.h
+28
-7
28 additions, 7 deletions
Unstructured_mesh/MeshDataContainer.h
with
28 additions
and
7 deletions
Unstructured_mesh/MeshDataContainer.h
+
28
−
7
View file @
4403ff5a
...
...
@@ -5,6 +5,21 @@
#include
"../debug/Debug.h"
template
<
typename
DataType
,
unsigned
int
Position
,
unsigned
int
MappedDimenion
>
struct
DataContainer
:
public
std
::
vector
<
DataType
>
{
using
type
=
DataType
;
constexpr
unsigned
int
getPosition
()
{
return
Position
;
}
constexpr
unsigned
int
getMappedDimension
()
{
return
MappedDimenion
;
}
};
/**
* @brief The MeshDataContainer struct
*
...
...
@@ -29,16 +44,22 @@ private:
return
DimensionPos
<
dim
,
0
,
std
::
get
<
0
>
(
std
::
array
<
unsigned
int
,
sizeof
...
(
Dimensions
)
>
{
Dimensions
...})
>::
res
();
}
template
<
unsigned
int
pos
>
static
constexpr
unsigned
int
dimensionAt
(){
return
std
::
get
<
pos
>
(
std
::
array
<
unsigned
int
,
sizeof
...
(
Dimensions
)
>
{
Dimensions
...});
}
public
:
template
<
typename
_DataType
,
unsigned
int
_Dim
>
struct
_DataContainer
:
_DataContainer
<
_DataType
,
_Dim
-
1
>
{
std
::
vector
<
_DataType
>
_data
;
struct
_DataContainer
:
_DataContainer
<
_DataType
,
_Dim
-
1
>
{
DataContainer
<
_DataType
,
_Dim
,
dimensionAt
<
_Dim
>
()
>
_data
;
};
template
<
typename
_DataType
>
struct
_DataContainer
<
_DataType
,
0
>
{
std
::
vector
<
_DataType
>
_data
;
struct
_DataContainer
<
_DataType
,
0
>
:
public
std
::
vector
<
_DataType
>
{
DataContainer
<
_DataType
,
0
,
dimensionAt
<
0
>
()
>
_data
;
};
private
:
template
<
unsigned
int
pos
,
typename
dummy
=
void
>
struct
Alocator
{
MeshDataContainer
<
DataType
,
Dimensions
...
>&
parent
;
...
...
@@ -96,13 +117,13 @@ public:
template
<
unsigned
int
dim
>
std
::
vector
<
DataType
>&
getDataByDim
(){
return
data
.
_DataContainer
<
DataType
,
dimensionIndex
<
dim
>
()
>::
_data
;
return
data
.
_DataContainer
<
DataType
,
dimensionIndex
<
dim
>
>
.
_data
;
}
template
<
unsigned
int
pos
>
std
::
vector
<
DataType
>&
getDataByPos
(){
return
data
.
_DataContainer
<
DataType
,
pos
>
::
_data
;
return
data
.
_DataContainer
<
DataType
,
pos
>
.
_data
;
}
template
<
unsigned
int
ElementDim
,
unsigned
int
Dimension
,
typename
IndexType
,
typename
Real
,
unsigned
int
Reserve
>
...
...
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