Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-fufem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
agnumpde
dune-fufem
Commits
19ffe697
Commit
19ffe697
authored
7 years ago
by
Max Kahnt
Browse files
Options
Downloads
Patches
Plain Diff
Use auto keyword, fix typos.
parent
0408e2ea
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
dune/fufem/test/subgridxyfunctionalassemblertest.cc
+9
-14
9 additions, 14 deletions
dune/fufem/test/subgridxyfunctionalassemblertest.cc
with
9 additions
and
14 deletions
dune/fufem/test/subgridxyfunctionalassemblertest.cc
+
9
−
14
View file @
19ffe697
...
@@ -45,9 +45,6 @@ void setupSubgridToHostgridTransfer(TransferOperatorType& matrix, const SubGridB
...
@@ -45,9 +45,6 @@ void setupSubgridToHostgridTransfer(TransferOperatorType& matrix, const SubGridB
{
{
typedef
typename
SubGridBasis
::
GridView
::
Grid
SubGridType
;
typedef
typename
SubGridBasis
::
GridView
::
Grid
SubGridType
;
typedef
typename
SubGridType
::
HostGridType
HostGridType
;
typedef
typename
SubGridType
::
HostGridType
HostGridType
;
//typedef typename HostGridType::LeafGridView::template Codim<0>::Entity HostElement;
//typedef typename SubGridType::LeafGridView::template Codim<0>::Iterator ElementIterator;
typedef
typename
HostGridType
::
template
Codim
<
0
>
::
Entity
::
HierarchicIterator
HierarchicIterator
;
typedef
std
::
map
<
int
,
double
>
LinearCombination
;
typedef
std
::
map
<
int
,
double
>
LinearCombination
;
typedef
std
::
vector
<
LinearCombination
>
BasisTransformation
;
typedef
std
::
vector
<
LinearCombination
>
BasisTransformation
;
typedef
typename
SubGridBasis
::
LocalFiniteElement
CLFE
;
typedef
typename
SubGridBasis
::
LocalFiniteElement
CLFE
;
...
@@ -98,13 +95,13 @@ void setupSubgridToHostgridTransfer(TransferOperatorType& matrix, const SubGridB
...
@@ -98,13 +95,13 @@ void setupSubgridToHostgridTransfer(TransferOperatorType& matrix, const SubGridB
std
::
vector
<
CFERange
>
valuesAtPosition
(
coarseFE
.
localBasis
().
size
());
std
::
vector
<
CFERange
>
valuesAtPosition
(
coarseFE
.
localBasis
().
size
());
// loop over all children on next level
// loop over all children on next level
HierarchicIter
ato
r
fIt
=
hostElement
.
hbegin
(
level
+
1
);
a
u
to
fIt
=
hostElement
.
hbegin
(
level
+
1
);
HierarchicIter
ato
r
fEnd
=
hostElement
.
hend
(
level
+
1
);
a
u
to
fEnd
=
hostElement
.
hend
(
level
+
1
);
for
(;
fIt
!=
fEnd
;
++
fIt
)
for
(;
fIt
!=
fEnd
;
++
fIt
)
{
{
const
FLFE
&
fineFE
=
hostgridbasis
.
getLocalFiniteElement
(
*
fIt
);
const
FLFE
&
fineFE
=
hostgridbasis
.
getLocalFiniteElement
(
*
fIt
);
// we need the refrence element to get the local position of the subentities corresponding to fine basis functions
// we need the ref
e
rence element to get the local position of the subentities corresponding to fine basis functions
const
Dune
::
ReferenceElement
<
double
,
dim
>&
fineRefElement
=
Dune
::
ReferenceElements
<
double
,
dim
>::
general
(
fIt
->
type
());
const
Dune
::
ReferenceElement
<
double
,
dim
>&
fineRefElement
=
Dune
::
ReferenceElements
<
double
,
dim
>::
general
(
fIt
->
type
());
// loop over all child nodes
// loop over all child nodes
...
@@ -184,9 +181,8 @@ struct SubgridL2FunctionalAssemblerTestSuite
...
@@ -184,9 +181,8 @@ struct SubgridL2FunctionalAssemblerTestSuite
grid
.
insertLevel
(
hostgrid
.
maxLevel
()
-
1
);
grid
.
insertLevel
(
hostgrid
.
maxLevel
()
-
1
);
/* ...but we do want it to contain some hostgrid leafelements */
/* ...but we do want it to contain some hostgrid leafelements */
typedef
typename
HostGridType
::
LeafGridView
::
template
Codim
<
0
>
::
Iterator
HostElementIterator
;
auto
helt
=
hostgrid
.
leafGridView
().
template
begin
<
0
>();
HostElementIterator
helt
=
hostgrid
.
leafGridView
().
template
begin
<
0
>();
auto
hend
=
hostgrid
.
leafGridView
().
template
end
<
0
>();
HostElementIterator
hend
=
hostgrid
.
leafGridView
().
template
end
<
0
>();
for
(
int
n_elts
=
0
;
helt
!=
hend
and
n_elts
<
hostgrid
.
size
(
0
)
/
4
;
++
helt
,
++
n_elts
)
for
(
int
n_elts
=
0
;
helt
!=
hend
and
n_elts
<
hostgrid
.
size
(
0
)
/
4
;
++
helt
,
++
n_elts
)
grid
.
insert
(
*
helt
);
grid
.
insert
(
*
helt
);
...
@@ -250,7 +246,7 @@ struct SubgridL2FunctionalAssemblerTestSuite
...
@@ -250,7 +246,7 @@ struct SubgridL2FunctionalAssemblerTestSuite
{
{
if
(
g
[
j
][
k
]
-
gsubcoeffs
[
j
][
k
]
>
1e-14
)
if
(
g
[
j
][
k
]
-
gsubcoeffs
[
j
][
k
]
>
1e-14
)
{
{
std
::
cout
<<
"g["
<<
j
<<
","
<<
k
<<
"]= "
<<
g
[
j
][
k
]
<<
" gsubcoeffs["
<<
j
<<
","
<<
k
<<
"]= "
<<
gsubcoeffs
[
j
][
k
]
<<
std
::
endl
;;
std
::
cout
<<
"
Problem detected:
g["
<<
j
<<
","
<<
k
<<
"]= "
<<
g
[
j
][
k
]
<<
" gsubcoeffs["
<<
j
<<
","
<<
k
<<
"]= "
<<
gsubcoeffs
[
j
][
k
]
<<
std
::
endl
;;
return
false
;
return
false
;
}
}
}
}
...
@@ -279,9 +275,8 @@ struct SubgridH1FunctionalAssemblerTestSuite
...
@@ -279,9 +275,8 @@ struct SubgridH1FunctionalAssemblerTestSuite
grid
.
insertLevel
(
hostgrid
.
maxLevel
()
-
1
);
grid
.
insertLevel
(
hostgrid
.
maxLevel
()
-
1
);
/* ...but we do want it to contain some hostgrid leafelements */
/* ...but we do want it to contain some hostgrid leafelements */
typedef
typename
HostGridType
::
LeafGridView
::
template
Codim
<
0
>
::
Iterator
HostElementIterator
;
auto
helt
=
hostgrid
.
leafGridView
().
template
begin
<
0
>();
HostElementIterator
helt
=
hostgrid
.
leafGridView
().
template
begin
<
0
>();
auto
hend
=
hostgrid
.
leafGridView
().
template
end
<
0
>();
HostElementIterator
hend
=
hostgrid
.
leafGridView
().
template
end
<
0
>();
for
(
int
n_elts
=
0
;
helt
!=
hend
and
n_elts
<
hostgrid
.
size
(
0
)
/
4
;
++
helt
,
++
n_elts
)
for
(
int
n_elts
=
0
;
helt
!=
hend
and
n_elts
<
hostgrid
.
size
(
0
)
/
4
;
++
helt
,
++
n_elts
)
grid
.
insert
(
*
helt
);
grid
.
insert
(
*
helt
);
...
@@ -364,7 +359,7 @@ struct SubgridH1FunctionalAssemblerTestSuite
...
@@ -364,7 +359,7 @@ struct SubgridH1FunctionalAssemblerTestSuite
{
{
if
(
g
[
j
][
k
]
-
gsubcoeffs
[
j
][
k
]
>
1e-14
)
if
(
g
[
j
][
k
]
-
gsubcoeffs
[
j
][
k
]
>
1e-14
)
{
{
std
::
cout
<<
"g["
<<
j
<<
","
<<
k
<<
"]= "
<<
g
[
j
][
k
]
<<
" gsubcoeffs["
<<
j
<<
","
<<
k
<<
"]= "
<<
gsubcoeffs
[
j
][
k
]
<<
std
::
endl
;;
std
::
cout
<<
"
Problem detected:
g["
<<
j
<<
","
<<
k
<<
"]= "
<<
g
[
j
][
k
]
<<
" gsubcoeffs["
<<
j
<<
","
<<
k
<<
"]= "
<<
gsubcoeffs
[
j
][
k
]
<<
std
::
endl
;;
return
false
;
return
false
;
}
}
}
}
...
...
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