Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Dmitri Naumov
ogs
Commits
fece418f
Commit
fece418f
authored
9 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[MeL/Elements] TemplateElement: Preparations for removing the element value.
parent
2e9068f4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MeshLib/Elements/TemplateElement-impl.h
+22
-1
22 additions, 1 deletion
MeshLib/Elements/TemplateElement-impl.h
MeshLib/Elements/TemplateElement.h
+18
-2
18 additions, 2 deletions
MeshLib/Elements/TemplateElement.h
with
40 additions
and
3 deletions
MeshLib/Elements/TemplateElement-impl.h
+
22
−
1
View file @
fece418f
...
...
@@ -22,6 +22,16 @@ TemplateElement<ELEMENT_RULE>::TemplateElement(Node* nodes[n_all_nodes], unsigne
this
->
_content
=
ELEMENT_RULE
::
computeVolume
(
this
->
_nodes
);
}
template
<
class
ELEMENT_RULE
>
TemplateElement
<
ELEMENT_RULE
>::
TemplateElement
(
Node
*
nodes
[
n_all_nodes
],
std
::
size_t
id
)
:
Element
(
id
)
{
this
->
_nodes
=
nodes
;
this
->
_neighbors
=
new
Element
*
[
getNNeighbors
()];
std
::
fill
(
this
->
_neighbors
,
this
->
_neighbors
+
getNNeighbors
(),
nullptr
);
this
->
_content
=
ELEMENT_RULE
::
computeVolume
(
this
->
_nodes
);
}
template
<
class
ELEMENT_RULE
>
TemplateElement
<
ELEMENT_RULE
>::
TemplateElement
(
std
::
array
<
Node
*
,
n_all_nodes
>
const
&
nodes
,
unsigned
value
,
std
::
size_t
id
)
:
Element
(
value
,
id
)
...
...
@@ -33,9 +43,20 @@ TemplateElement<ELEMENT_RULE>::TemplateElement(std::array<Node*, n_all_nodes> co
this
->
_content
=
ELEMENT_RULE
::
computeVolume
(
this
->
_nodes
);
}
template
<
class
ELEMENT_RULE
>
TemplateElement
<
ELEMENT_RULE
>::
TemplateElement
(
std
::
array
<
Node
*
,
n_all_nodes
>
const
&
nodes
,
std
::
size_t
id
)
:
Element
(
id
)
{
this
->
_nodes
=
new
Node
*
[
n_all_nodes
];
std
::
copy
(
nodes
.
begin
(),
nodes
.
end
(),
this
->
_nodes
);
this
->
_neighbors
=
new
Element
*
[
getNNeighbors
()];
std
::
fill
(
this
->
_neighbors
,
this
->
_neighbors
+
getNNeighbors
(),
nullptr
);
this
->
_content
=
ELEMENT_RULE
::
computeVolume
(
this
->
_nodes
);
}
template
<
class
ELEMENT_RULE
>
TemplateElement
<
ELEMENT_RULE
>::
TemplateElement
(
const
TemplateElement
&
e
)
:
Element
(
e
.
getValue
(),
e
.
getID
())
:
Element
(
e
.
getID
())
{
this
->
_nodes
=
new
Node
*
[
n_all_nodes
];
for
(
unsigned
i
=
0
;
i
<
n_all_nodes
;
i
++
)
...
...
This diff is collapsed.
Click to expand it.
MeshLib/Elements/TemplateElement.h
+
18
−
2
View file @
fece418f
...
...
@@ -48,7 +48,15 @@ public:
* @param value element value, e.g. material ID
* @param id element id
*/
TemplateElement
(
Node
*
nodes
[
n_all_nodes
],
unsigned
value
=
0
,
std
::
size_t
id
=
std
::
numeric_limits
<
std
::
size_t
>::
max
());
TemplateElement
(
Node
*
nodes
[
n_all_nodes
],
unsigned
value
,
std
::
size_t
id
);
/**
* Constructor with an array of mesh nodes.
*
* @param nodes an array of pointers of mesh nodes which form this element
* @param id element id
*/
TemplateElement
(
Node
*
nodes
[
n_all_nodes
],
std
::
size_t
id
=
std
::
numeric_limits
<
std
::
size_t
>::
max
());
/**
* Constructor with an array of mesh nodes
...
...
@@ -57,7 +65,15 @@ public:
* @param value element value, e.g. material ID
* @param id element id
*/
TemplateElement
(
std
::
array
<
Node
*
,
n_all_nodes
>
const
&
nodes
,
unsigned
value
=
0
,
std
::
size_t
id
=
std
::
numeric_limits
<
std
::
size_t
>::
max
());
TemplateElement
(
std
::
array
<
Node
*
,
n_all_nodes
>
const
&
nodes
,
unsigned
value
,
std
::
size_t
id
);
/**
* Constructor with an array of mesh nodes
*
* @param nodes an array of pointers of mesh nodes which form this element
* @param id element id
*/
TemplateElement
(
std
::
array
<
Node
*
,
n_all_nodes
>
const
&
nodes
,
std
::
size_t
id
=
std
::
numeric_limits
<
std
::
size_t
>::
max
());
/// Copy constructor
TemplateElement
(
const
TemplateElement
&
e
);
...
...
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