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
Dmitry Yu. Naumov
ogs
Commits
987c1d8c
Commit
987c1d8c
authored
3 years ago
by
Tom Fischer
Committed by
Dmitri Naumov
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[MeL/Elements/TemplateElement] Cleanup getNode().
parent
a33bf918
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
MeshLib/Elements/Element.h
+4
-4
4 additions, 4 deletions
MeshLib/Elements/Element.h
MeshLib/Elements/TemplateElement-impl.h
+6
-8
6 additions, 8 deletions
MeshLib/Elements/TemplateElement-impl.h
MeshLib/Elements/TemplateElement.h
+1
-1
1 addition, 1 deletion
MeshLib/Elements/TemplateElement.h
with
11 additions
and
13 deletions
MeshLib/Elements/Element.h
+
4
−
4
View file @
987c1d8c
...
...
@@ -46,15 +46,15 @@ public:
virtual
double
getContent
()
const
=
0
;
/**
* Get node with local index
i
where
i
should be at most the
number
* of nodes of the element
* @param i local index of node, at most the number of nodes of the
* Get node with local index where
the local index
should be at most the
*
number
of nodes of the element
.
* @param i
dx
local index of node, at most the number of nodes of the
* element that you can obtain with Element::getNumberOfBaseNodes()
* @return a pointer to the appropriate (and constant, i.e. not
* modifiable by the user) instance of class Node or a nullptr
* @sa getNodeIndex()
*/
virtual
const
Node
*
getNode
(
unsigned
i
)
const
=
0
;
virtual
const
Node
*
getNode
(
unsigned
i
dx
)
const
=
0
;
/**
* (Re)Sets the node of the element.
...
...
This diff is collapsed.
Click to expand it.
MeshLib/Elements/TemplateElement-impl.h
+
6
−
8
View file @
987c1d8c
...
...
@@ -96,19 +96,17 @@ bool TemplateElement<ELEMENT_RULE>::isEdge(unsigned idx1, unsigned idx2) const
}
template
<
class
ELEMENT_RULE
>
const
Node
*
TemplateElement
<
ELEMENT_RULE
>::
getNode
(
unsigned
i
)
const
const
Node
*
TemplateElement
<
ELEMENT_RULE
>::
getNode
(
unsigned
const
idx
)
const
{
#ifndef NDEBUG
if
(
i
<
getNumberOfNodes
())
#endif
if
(
idx
>=
getNumberOfNodes
())
{
return
_nodes
[
i
];
ERR
(
"Error in MeshLib::TemplateElement::getNode() - Index {:d} in {:s}"
,
idx
,
MeshElemType2String
(
getGeomType
()));
return
nullptr
;
}
#ifndef NDEBUG
ERR
(
"Error in MeshLib::TemplateElement::getNode() - Index {:d} in {:s}"
,
i
,
MeshElemType2String
(
getGeomType
()));
return
nullptr
;
#endif
return
_nodes
[
idx
];
}
template
<
class
ELEMENT_RULE
>
...
...
This diff is collapsed.
Click to expand it.
MeshLib/Elements/TemplateElement.h
+
1
−
1
View file @
987c1d8c
...
...
@@ -188,7 +188,7 @@ public:
return
ELEMENT_RULE
::
computeVolume
(
_nodes
.
data
());
}
const
Node
*
getNode
(
unsigned
i
)
const
override
;
const
Node
*
getNode
(
unsigned
i
dx
)
const
override
;
void
setNode
(
unsigned
idx
,
Node
*
node
)
override
;
Node
*
const
*
getNodes
()
const
override
{
return
_nodes
.
data
();
}
...
...
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