Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
ag-ohlberger
dune-community
dune-xt
Commits
da288356
Commit
da288356
authored
7 years ago
by
Tobias Leibner
Browse files
Options
Downloads
Patches
Plain Diff
[grid.boundaryinfo.normalbased] fix compilation failure, add global instances
parent
53f38705
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
dune/xt/grid/boundaryinfo/normalbased.hh
+2
-3
2 additions, 3 deletions
dune/xt/grid/boundaryinfo/normalbased.hh
dune/xt/grid/boundaryinfo/types.hh
+7
-1
7 additions, 1 deletion
dune/xt/grid/boundaryinfo/types.hh
with
9 additions
and
4 deletions
dune/xt/grid/boundaryinfo/normalbased.hh
+
2
−
3
View file @
da288356
...
@@ -163,13 +163,13 @@ public:
...
@@ -163,13 +163,13 @@ public:
if
(
XT
::
Common
::
FloatCmp
::
eq
(
existing_normal
,
normalized_normal
,
tol_
))
if
(
XT
::
Common
::
FloatCmp
::
eq
(
existing_normal
,
normalized_normal
,
tol_
))
DUNE_THROW
(
InvalidStateException
,
"Given normals are too close for given tolerance '"
<<
tol_
<<
"'!"
);
DUNE_THROW
(
InvalidStateException
,
"Given normals are too close for given tolerance '"
<<
tol_
<<
"'!"
);
}
}
normal_to_type_map_
.
emplace
(
normal
,
std
::
move
(
boundary_type
));
normal_to_type_map_
.
emplace
(
normal
,
std
::
shared_ptr
<
BoundaryType
>
(
std
::
move
(
boundary_type
))
)
;
}
// ... void register_new_normal(...)
}
// ... void register_new_normal(...)
const
BoundaryType
&
type
(
const
IntersectionType
&
intersection
)
const
override
final
const
BoundaryType
&
type
(
const
IntersectionType
&
intersection
)
const
override
final
{
{
if
(
!
intersection
.
boundary
())
if
(
!
intersection
.
boundary
())
return
no_boundary
_
;
return
no_boundary
;
const
WorldType
outer_normal
=
intersection
.
centerUnitOuterNormal
();
const
WorldType
outer_normal
=
intersection
.
centerUnitOuterNormal
();
for
(
const
auto
&
normal_and_type_pair
:
normal_to_type_map_
)
{
for
(
const
auto
&
normal_and_type_pair
:
normal_to_type_map_
)
{
const
auto
&
normal
=
normal_and_type_pair
.
first
;
const
auto
&
normal
=
normal_and_type_pair
.
first
;
...
@@ -183,7 +183,6 @@ public:
...
@@ -183,7 +183,6 @@ public:
private
:
private
:
const
DomainFieldType
tol_
;
const
DomainFieldType
tol_
;
const
std
::
unique_ptr
<
BoundaryType
>
default_boundary_type_
;
const
std
::
unique_ptr
<
BoundaryType
>
default_boundary_type_
;
const
NoBoundary
no_boundary_
;
std
::
unordered_map
<
WorldType
,
std
::
shared_ptr
<
BoundaryType
>>
normal_to_type_map_
;
std
::
unordered_map
<
WorldType
,
std
::
shared_ptr
<
BoundaryType
>>
normal_to_type_map_
;
};
// class NormalBasedBoundaryInfo
};
// class NormalBasedBoundaryInfo
#if (defined(BOOST_CLANG) && BOOST_CLANG) || (defined(BOOST_GCC) && BOOST_GCC)
#if (defined(BOOST_CLANG) && BOOST_CLANG) || (defined(BOOST_GCC) && BOOST_GCC)
...
...
This diff is collapsed.
Click to expand it.
dune/xt/grid/boundaryinfo/types.hh
+
7
−
1
View file @
da288356
...
@@ -196,7 +196,7 @@ public:
...
@@ -196,7 +196,7 @@ public:
#endif
#endif
static
BoundaryType
*
make_boundary_type
(
const
std
::
string
&
id
)
static
inline
BoundaryType
*
make_boundary_type
(
const
std
::
string
&
id
)
{
{
if
(
id
==
NoBoundary
().
id
())
if
(
id
==
NoBoundary
().
id
())
return
new
NoBoundary
();
return
new
NoBoundary
();
...
@@ -227,6 +227,12 @@ static BoundaryType* make_boundary_type(const std::string& id)
...
@@ -227,6 +227,12 @@ static BoundaryType* make_boundary_type(const std::string& id)
}
// ... make_boundary_type(...)
}
// ... make_boundary_type(...)
static
constexpr
AbsorbingBoundary
absorbing_boundary
{};
static
constexpr
DirichletBoundary
dirichlet_boundary
{};
static
constexpr
NoBoundary
no_boundary
{};
static
constexpr
ReflectingBoundary
reflecting_boundary
{};
}
// namespace Grid
}
// namespace Grid
}
// namespace XT
}
// namespace XT
}
// namespace Dune
}
// namespace Dune
...
...
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