Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tools
frackit
Commits
dfd3fb49
Commit
dfd3fb49
authored
Dec 06, 2020
by
Dennis Gläser
Browse files
[networkbuilder] increase robustness of non-embedded entity adder
parent
e1903ac2
Changes
1
Hide whitespace changes
Inline
Side-by-side
frackit/entitynetwork/networkbuilder.hh
View file @
dfd3fb49
...
...
@@ -541,8 +541,12 @@ public:
/*!
* \brief Adds an entity to the network.
* This function can be used when no sub-domain
* specifications are made. Internally, the entity
* is added to the sub-domain with index 0.
* specifications are made.
* \note Internally, the entity is added to a dummy
* sub-domain with id std::numeric_limits<std::size_t>::max().
* Thus, this could lead to clashes if users define sub-domains
* with this id. The entities will then be merged into one embedded
* network.
* \return The id of the newly added entity
*/
template
<
class
Entity
>
...
...
@@ -555,7 +559,8 @@ public:
throw
std
::
runtime_error
(
"Entity dimension must be smaller than domain dimension"
);
this
->
entityDimension_
=
entityDim
;
return
Id
{
this
->
bindEntity_
(
0
,
OCCUtilities
::
getShape
(
entity
))};
const
auto
subDomainId
=
std
::
numeric_limits
<
std
::
size_t
>::
max
();
return
Id
{
this
->
bindEntity_
(
subDomainId
,
OCCUtilities
::
getShape
(
entity
))};
}
/*!
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment