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
11ae605e
Commit
11ae605e
authored
6 years ago
by
Jö Fahlke
Browse files
Options
Downloads
Patches
Plain Diff
GridOperator: get rid of PDELab constraints
parent
22d550c4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/driver.hh
+10
-9
10 additions, 9 deletions
src/driver.hh
src/gridoperator.hh
+4
-14
4 additions, 14 deletions
src/gridoperator.hh
with
14 additions
and
23 deletions
src/driver.hh
+
10
−
9
View file @
11ae605e
...
...
@@ -88,18 +88,20 @@ void driver (const GV& gv, Dune::ParameterTree& ptree)
// Assemble constraints
//== Exercise 2 {
#ifdef NITSCHE
using
CC
=
Dune
::
PDELab
::
ConstraintsTransformation
<
Dune
::
PDELab
::
DOFIndex
<
long
unsigned
int
,
1ul
,
2ul
>
,
Dune
::
PDELab
::
MultiIndex
<
long
unsigned
int
,
1ul
>
,
double
>
;
#else
#ifndef NITSCHE
typedef
typename
GFS
::
template
ConstraintsContainer
<
RF
>
::
Type
CC
;
CC
cc
;
Dune
::
PDELab
::
constraints
(
b
,
gfs
,
cc
);
// assemble constraints
std
::
cout
<<
"constrained dofs="
<<
cc
.
size
()
<<
" of "
<<
gfs
.
globalSize
()
<<
std
::
endl
;
std
::
vector
<
std
::
size_t
>
cc_plain
;
cc_plain
.
reserve
(
cc
.
size
());
for
(
const
auto
&
c
:
cc
)
{
assert
(
c
.
first
.
size
()
==
1
);
cc_plain
.
push_back
(
c
.
first
[
0
]);
}
#endif
//== }
...
...
@@ -127,14 +129,13 @@ void driver (const GV& gv, Dune::ParameterTree& ptree)
typedef
PPS
::
GridOperator
<
GV
,
LFE
,
LOP
,
/* local operator */
RF
,
RF
,
RF
,
/* domain, range, jacobian field type*/
CC
,
CC
/* constraints for ansatz and test space */
RF
,
RF
,
RF
/* domain, range, jacobian field type*/
>
GO
;
//== Exercise 2 {
#ifdef NITSCHE
GO
go
(
gv
,
{},
lop
);
#else
GO
go
(
gv
,
{},
cc
,
cc
,
lop
);
GO
go
(
gv
,
{},
lop
,
cc
_plain
);
#endif
//== }
...
...
This diff is collapsed.
Click to expand it.
src/gridoperator.hh
+
4
−
14
View file @
11ae605e
...
...
@@ -41,10 +41,7 @@ namespace PPS {
*/
template
<
class
GridView
,
class
LocalFiniteElement
,
typename
LocalOperator
,
typename
DF
,
typename
RF
,
typename
JF
,
typename
CU
,
typename
CV
>
typename
DF
,
typename
RF
,
typename
JF
>
class
GridOperator
{
public:
...
...
@@ -58,16 +55,9 @@ namespace PPS {
//! Constructor for non trivial constraints
GridOperator
(
GridView
gv
,
LocalFiniteElement
lfe
,
const
CU
&
cu_
,
const
CV
&
cv
,
LocalOperator
&
lop
)
:
gv_
(
std
::
move
(
gv
)),
lop_
(
lop
),
lfe_
(
std
::
move
(
lfe
))
{
cv_
.
reserve
(
cv
.
size
());
for
(
const
auto
&
c
:
cv
)
{
assert
(
c
.
first
.
size
()
==
1
);
cv_
.
push_back
(
c
.
first
[
0
]);
}
}
LocalOperator
&
lop
,
std
::
vector
<
std
::
size_t
>
cv
)
:
gv_
(
std
::
move
(
gv
)),
lop_
(
lop
),
lfe_
(
std
::
move
(
lfe
)),
cv_
(
std
::
move
(
cv
))
{}
//! Constructor for empty constraints
GridOperator
(
GridView
gv
,
LocalFiniteElement
lfe
,
LocalOperator
&
lop
)
...
...
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