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
a616cc77
Commit
a616cc77
authored
5 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[MeL/Elements] Impl. of interface for boundaries.
parent
8814334d
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/Element.h
+4
-0
4 additions, 0 deletions
MeshLib/Elements/Element.h
MeshLib/Elements/TemplateElement.h
+29
-0
29 additions, 0 deletions
MeshLib/Elements/TemplateElement.h
with
33 additions
and
0 deletions
MeshLib/Elements/Element.h
+
4
−
0
View file @
a616cc77
...
@@ -86,9 +86,13 @@ public:
...
@@ -86,9 +86,13 @@ public:
/// Returns the i-th face of the element.
/// Returns the i-th face of the element.
virtual
const
Element
*
getFace
(
unsigned
i
)
const
=
0
;
virtual
const
Element
*
getFace
(
unsigned
i
)
const
=
0
;
virtual
const
Element
*
getBoundary
(
unsigned
i
)
const
=
0
;
/// Returns the ID of the element.
/// Returns the ID of the element.
virtual
std
::
size_t
getID
()
const
final
{
return
_id
;
}
virtual
std
::
size_t
getID
()
const
final
{
return
_id
;
}
virtual
unsigned
getNumberOfBoundaries
()
const
=
0
;
/// Get the number of edges for this element.
/// Get the number of edges for this element.
virtual
unsigned
getNumberOfEdges
()
const
=
0
;
virtual
unsigned
getNumberOfEdges
()
const
=
0
;
...
...
This diff is collapsed.
Click to expand it.
MeshLib/Elements/TemplateElement.h
+
29
−
0
View file @
a616cc77
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
#include
"MeshLib/Node.h"
#include
"MeshLib/Node.h"
#include
"MeshLib/Elements/Element.h"
#include
"MeshLib/Elements/Element.h"
#include
"MeshLib/Elements/FaceRule.h"
#include
"MeshLib/Elements/CellRule.h"
#include
"MeshLib/Elements/ElementErrorCode.h"
#include
"MeshLib/Elements/ElementErrorCode.h"
namespace
MeshLib
namespace
MeshLib
...
@@ -85,6 +87,33 @@ public:
...
@@ -85,6 +87,33 @@ public:
return
ELEMENT_RULE
::
getFace
(
this
,
i
);
return
ELEMENT_RULE
::
getFace
(
this
,
i
);
}
}
/// Returns the boundary i of the element.
const
Element
*
getBoundary
(
unsigned
i
)
const
override
{
if
constexpr
(
std
::
is_convertible
<
ELEMENT_RULE
,
FaceRule
>::
value
)
{
return
ELEMENT_RULE
::
EdgeReturn
::
getEdge
(
this
,
i
);
}
if
constexpr
(
std
::
is_convertible
<
ELEMENT_RULE
,
CellRule
>::
value
)
{
return
ELEMENT_RULE
::
getFace
(
this
,
i
);
}
OGS_FATAL
(
"TemplateElement::getBoundary for boundary %u failed."
,
i
);
}
/// Returns the number of boundaries of the element.
unsigned
getNumberOfBoundaries
()
const
override
{
if
constexpr
(
std
::
is_convertible
<
ELEMENT_RULE
,
FaceRule
>::
value
)
{
return
ELEMENT_RULE
::
n_edges
;
}
else
{
return
ELEMENT_RULE
::
n_faces
;
}
}
/// Get the number of edges for this element.
/// Get the number of edges for this element.
unsigned
getNumberOfEdges
()
const
override
{
return
ELEMENT_RULE
::
n_edges
;
}
unsigned
getNumberOfEdges
()
const
override
{
return
ELEMENT_RULE
::
n_edges
;
}
/// Get the number of faces for this element.
/// Get the number of faces for this element.
...
...
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