Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gfe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Sander, Oliver
dune-gfe
Commits
4a513821
Commit
4a513821
authored
13 years ago
by
Oliver Sander
Committed by
sander@FU-BERLIN.DE
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
minor cleanup
[[Imported from SVN: r8219]]
parent
24bf4a2b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/gfe/pktop1mgtransfer.hh
+15
-20
15 additions, 20 deletions
dune/gfe/pktop1mgtransfer.hh
with
15 additions
and
20 deletions
dune/gfe/pktop1mgtransfer.hh
+
15
−
20
View file @
4a513821
...
...
@@ -74,8 +74,8 @@ public:
const
GridView
&
gridView
=
p1Basis
.
getGridView
();
ElementIterator
cI
t
=
gridView
.
template
begin
<
0
>();
ElementIterator
cE
ndIt
=
gridView
.
template
end
<
0
>();
ElementIterator
i
t
=
gridView
.
template
begin
<
0
>();
ElementIterator
e
ndIt
=
gridView
.
template
end
<
0
>();
// ///////////////////////////////////////////
...
...
@@ -83,26 +83,23 @@ public:
// /////////////////////////////////////////////////
Dune
::
MatrixIndexSet
indices
(
rows
,
cols
);
for
(;
cI
t
!=
cE
ndIt
;
++
cI
t
)
{
for
(;
i
t
!=
e
ndIt
;
++
i
t
)
{
typedef
typename
GridView
::
template
Codim
<
0
>
::
Entity
EntityType
;
// Get local finite element
//const P1FEType& coarseBaseSet = p1FECache.get(cIt->type());
const
typename
P1NodalBasis
<
GridView
,
double
>::
LocalFiniteElement
&
coarseBaseSet
=
p1Basis
.
getLocalFiniteElement
(
*
cIt
);
const
typename
P1NodalBasis
<
GridView
,
double
>::
LocalFiniteElement
&
coarseBaseSet
=
p1Basis
.
getLocalFiniteElement
(
*
it
);
const
int
numCoarseBaseFct
=
coarseBaseSet
.
localBasis
().
size
();
// preallocate vector for function evaluations
std
::
vector
<
Dune
::
FieldVector
<
field_type
,
1
>
>
values
(
numCoarseBaseFct
);
ElementIterator
fIt
=
cIt
;
const
Dune
::
GenericReferenceElement
<
ctype
,
dim
>&
fineRefElement
=
Dune
::
GenericReferenceElements
<
ctype
,
dim
>::
general
(
fI
t
->
type
());
=
Dune
::
GenericReferenceElements
<
ctype
,
dim
>::
general
(
i
t
->
type
());
// Get local finite element
const
typename
Basis
::
LocalFiniteElement
&
fineBaseSet
=
fineBasis
.
getLocalFiniteElement
(
*
fI
t
);
const
typename
Basis
::
LocalFiniteElement
&
fineBaseSet
=
fineBasis
.
getLocalFiniteElement
(
*
i
t
);
const
int
numFineBaseFct
=
fineBaseSet
.
localBasis
().
size
();
...
...
@@ -111,7 +108,7 @@ public:
{
const
Dune
::
LocalKey
&
jLocalKey
=
fineBaseSet
.
localCoefficients
().
localKey
(
j
);
int
globalFine
=
fineBasis
.
index
(
*
fI
t
,
j
);
int
globalFine
=
fineBasis
.
index
(
*
i
t
,
j
);
Dune
::
FieldVector
<
ctype
,
dim
>
fineBasePosition
=
fineRefElement
.
position
(
jLocalKey
.
subEntity
(),
jLocalKey
.
codim
());
Dune
::
FieldVector
<
ctype
,
dim
>
local
=
fineBasePosition
;
...
...
@@ -125,7 +122,7 @@ public:
if
(
values
[
i
]
>
0.001
)
{
const
Dune
::
LocalKey
&
iLocalKey
=
coarseBaseSet
.
localCoefficients
().
localKey
(
i
);
int
globalCoarse
=
p1Basis
.
index
(
*
cI
t
,
i
);
int
globalCoarse
=
p1Basis
.
index
(
*
i
t
,
i
);
indices
.
add
(
globalFine
,
globalCoarse
);
}
}
...
...
@@ -138,11 +135,11 @@ public:
// /////////////////////////////////////////////
// Compute the matrix
// /////////////////////////////////////////////
cI
t
=
gridView
.
template
begin
<
0
>();
for
(;
cI
t
!=
cE
ndIt
;
++
cI
t
)
{
i
t
=
gridView
.
template
begin
<
0
>();
for
(;
i
t
!=
e
ndIt
;
++
i
t
)
{
// Get local finite element
const
typename
P1NodalBasis
<
GridView
,
double
>::
LocalFiniteElement
&
coarseBaseSet
=
p1Basis
.
getLocalFiniteElement
(
*
cI
t
);
const
typename
P1NodalBasis
<
GridView
,
double
>::
LocalFiniteElement
&
coarseBaseSet
=
p1Basis
.
getLocalFiniteElement
(
*
i
t
);
const
int
numCoarseBaseFct
=
coarseBaseSet
.
localBasis
().
size
();
...
...
@@ -151,13 +148,11 @@ public:
// preallocate vector for function evaluations
std
::
vector
<
Dune
::
FieldVector
<
field_type
,
1
>
>
values
(
numCoarseBaseFct
);
ElementIterator
fIt
=
cIt
;
const
Dune
::
GenericReferenceElement
<
ctype
,
dim
>&
fineRefElement
=
Dune
::
GenericReferenceElements
<
ctype
,
dim
>::
general
(
fI
t
->
type
());
=
Dune
::
GenericReferenceElements
<
ctype
,
dim
>::
general
(
i
t
->
type
());
// Get local finite element
const
typename
Basis
::
LocalFiniteElement
&
fineBaseSet
=
fineBasis
.
getLocalFiniteElement
(
*
fI
t
);
const
typename
Basis
::
LocalFiniteElement
&
fineBaseSet
=
fineBasis
.
getLocalFiniteElement
(
*
i
t
);
const
int
numFineBaseFct
=
fineBaseSet
.
localBasis
().
size
();
...
...
@@ -165,7 +160,7 @@ public:
{
const
Dune
::
LocalKey
&
jLocalKey
=
fineBaseSet
.
localCoefficients
().
localKey
(
j
);
int
globalFine
=
fineBasis
.
index
(
*
fI
t
,
j
);
int
globalFine
=
fineBasis
.
index
(
*
i
t
,
j
);
Dune
::
FieldVector
<
ctype
,
dim
>
fineBasePosition
=
fineRefElement
.
position
(
jLocalKey
.
subEntity
(),
jLocalKey
.
codim
());
Dune
::
FieldVector
<
ctype
,
dim
>
local
=
fineBasePosition
;
...
...
@@ -179,7 +174,7 @@ public:
if
(
values
[
i
]
>
0.001
)
{
const
Dune
::
LocalKey
&
iLocalKey
=
coarseBaseSet
.
localCoefficients
().
localKey
(
i
);
int
globalCoarse
=
p1Basis
.
index
(
*
cI
t
,
i
);
int
globalCoarse
=
p1Basis
.
index
(
*
i
t
,
i
);
TransferMatrixBlock
matValue
=
identity
;
matValue
*=
values
[
i
];
...
...
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