Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pacxx-projectseminar-2019
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
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
Vladyslav Kucher
pacxx-projectseminar-2019
Commits
b17adfe7
Commit
b17adfe7
authored
6 years ago
by
Jö Fahlke
Browse files
Options
Downloads
Patches
Plain Diff
constraints(): inline applyToTreePath()
parent
7c13e792
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/constraints.hh
+10
-27
10 additions, 27 deletions
src/constraints.hh
with
10 additions
and
27 deletions
src/constraints.hh
+
10
−
27
View file @
b17adfe7
...
...
@@ -3,24 +3,6 @@
namespace
PPS
{
/* The signature is the same as for the public applyToTreePair
* function in Dune::Typtree, despite the additionally passed
* treePath argument. The path passed here is associated to
* the tree and the relative paths of the children (wrt. to tree)
* are appended to this. Hence the behavior of the public function
* is resembled by passing an empty treePath.
*/
/*
* This is the overload for leaf traversal
*/
template
<
class
T1
,
class
T2
,
class
TreePath
,
class
V
,
std
::
enable_if_t
<
(
std
::
decay_t
<
T1
>
::
isLeaf
or
std
::
decay_t
<
T2
>::
isLeaf
),
int
>
=
0
>
void
applyToTreePair
(
T1
&&
tree1
,
T2
&&
tree2
,
TreePath
treePath
,
V
&&
visitor
)
{
visitor
.
leaf
(
tree1
,
tree2
,
treePath
);
}
template
<
typename
P
,
typename
GFS
,
typename
CG
>
void
constraints
(
const
P
&
p
,
const
GFS
&
gfs
,
CG
&
cg
,
const
bool
verbose
=
false
)
...
...
@@ -60,9 +42,9 @@ namespace PPS {
using
ElementWrapper
=
Dune
::
PDELab
::
ElementGeometry
<
Element
>
;
using
IntersectionWrapper
=
Dune
::
PDELab
::
IntersectionGeometry
<
Intersection
>
;
applyToTreePair
(
p
,
lfs_e
,
Dune
::
TypeTree
::
hybridTreePath
(),
Dune
::
PDELab
::
VolumeConstraints
<
ElementWrapper
,
CL
>
(
ElementWrapper
(
element
),
cl_self
));
Dune
::
PDELab
::
VolumeConstraints
<
ElementWrapper
,
CL
>
(
ElementWrapper
(
element
),
cl_self
).
leaf
(
p
,
lfs_e
,
Dune
::
TypeTree
::
hybridTreePath
(
));
// iterate over intersections and call metaprogram
unsigned
int
intersection_index
=
0
;
...
...
@@ -85,9 +67,10 @@ namespace PPS {
CL
cl_neighbor
;
applyToTreePair
(
lfs_e
,
lfs_f
,
Dune
::
TypeTree
::
hybridTreePath
(),
Dune
::
PDELab
::
SkeletonConstraints
<
IntersectionWrapper
,
CL
>
(
IntersectionWrapper
(
intersection
,
intersection_index
),
cl_self
,
cl_neighbor
));
Dune
::
PDELab
::
SkeletonConstraints
<
IntersectionWrapper
,
CL
>
(
IntersectionWrapper
(
intersection
,
intersection_index
),
cl_self
,
cl_neighbor
).
leaf
(
lfs_e
,
lfs_f
,
Dune
::
TypeTree
::
hybridTreePath
());
if
(
!
cl_neighbor
.
empty
())
{
...
...
@@ -100,9 +83,9 @@ namespace PPS {
}
case
Dune
::
PDELab
::
IntersectionType
::
boundary
:
applyToTreePair
(
p
,
lfs_e
,
Dune
::
TypeTree
::
hybridTreePath
(),
Dune
::
PDELab
::
BoundaryConstraints
<
IntersectionWrapper
,
CL
>
(
IntersectionWrapper
(
intersection
,
intersection_index
),
cl_self
));
Dune
::
PDELab
::
BoundaryConstraints
<
IntersectionWrapper
,
CL
>
(
IntersectionWrapper
(
intersection
,
intersection_index
),
cl_self
).
leaf
(
p
,
lfs_e
,
Dune
::
TypeTree
::
hybridTreePath
(
));
break
;
case
Dune
::
PDELab
::
IntersectionType
::
periodic
:
...
...
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