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
250523e1
Commit
250523e1
authored
16 years ago
by
Oliver Sander
Committed by
sander@PCPOOL.MI.FU-BERLIN.DE
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
use the BoundaryPatch iterator some more
[[Imported from SVN: r2422]]
parent
9f9c9574
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/averageinterface.hh
+13
-21
13 additions, 21 deletions
src/averageinterface.hh
with
13 additions
and
21 deletions
src/averageinterface.hh
+
13
−
21
View file @
250523e1
...
...
@@ -657,54 +657,48 @@ void computeAverageInterface(const BoundaryPatch<GridType>& interface,
// ///////////////////////////////////////////
// Loop and integrate over the interface
// ///////////////////////////////////////////
ElementIterator
eIt
=
grid
.
template
lbegin
<
0
>(
level
);
ElementIterator
eEndIt
=
grid
.
template
lend
<
0
>(
level
);
for
(;
eIt
!=
eEndIt
;
++
eIt
)
{
NeighborIterator
nIt
=
eIt
->
ilevelbegin
();
NeighborIterator
nEndIt
=
eIt
->
ilevelend
();
for
(;
nIt
!=
nEndIt
;
++
nIt
)
{
typename
BoundaryPatch
<
GridType
>::
iterator
it
=
interface
.
begin
();
typename
BoundaryPatch
<
GridType
>::
iterator
endIt
=
interface
.
end
();
if
(
!
interface
.
contains
(
*
eIt
,
nIt
))
continue
;
for
(;
it
!=
endIt
;
++
it
)
{
const
typename
NeighborIterator
::
Geometry
&
segmentGeometry
=
nI
t
->
intersectionGlobal
();
const
typename
NeighborIterator
::
Geometry
&
segmentGeometry
=
i
t
->
intersectionGlobal
();
// Get quadrature rule
const
QuadratureRule
<
double
,
dim
-
1
>&
quad
=
QuadratureRules
<
double
,
dim
-
1
>::
rule
(
segmentGeometry
.
type
(),
dim
-
1
);
// Get set of shape functions on this segment
const
typename
LagrangeShapeFunctionSetContainer
<
double
,
double
,
dim
>::
value_type
&
sfs
=
LagrangeShapeFunctions
<
double
,
double
,
dim
>::
general
(
eIt
->
type
(),
1
);
=
LagrangeShapeFunctions
<
double
,
double
,
dim
>::
general
(
it
->
inside
()
->
type
(),
1
);
/* Loop over all integration points */
for
(
int
ip
=
0
;
ip
<
quad
.
size
();
ip
++
)
{
// Local position of the quadrature point
const
FieldVector
<
double
,
dim
>
quadPos
=
nI
t
->
intersectionSelfLocal
().
global
(
quad
[
ip
].
position
());
const
FieldVector
<
double
,
dim
>
quadPos
=
i
t
->
intersectionSelfLocal
().
global
(
quad
[
ip
].
position
());
const
double
integrationElement
=
segmentGeometry
.
integrationElement
(
quad
[
ip
].
position
());
// Evaluate base functions
FieldVector
<
double
,
dim
>
posAtQuadPoint
(
0
);
for
(
int
i
=
0
;
i
<
eIt
->
geometry
().
corners
();
i
++
)
{
for
(
int
i
=
0
;
i
<
it
->
inside
()
->
geometry
().
corners
();
i
++
)
{
int
idx
=
indexSet
.
template
subIndex
<
dim
>(
*
eIt
,
i
);
int
idx
=
indexSet
.
template
subIndex
<
dim
>(
*
it
->
inside
()
,
i
);
// Deformation at the quadrature point
posAtQuadPoint
.
axpy
(
sfs
[
i
].
evaluateFunction
(
0
,
quadPos
),
deformation
[
idx
]);
}
const
FieldMatrix
<
double
,
dim
,
dim
>&
inv
=
eIt
->
geometry
().
jacobianInverseTransposed
(
quadPos
);
const
FieldMatrix
<
double
,
dim
,
dim
>&
inv
=
it
->
inside
()
->
geometry
().
jacobianInverseTransposed
(
quadPos
);
/**********************************************/
/* compute gradients of the shape functions */
/**********************************************/
std
::
vector
<
FieldVector
<
double
,
dim
>
>
shapeGrads
(
eIt
->
geometry
().
corners
());
std
::
vector
<
FieldVector
<
double
,
dim
>
>
shapeGrads
(
it
->
inside
()
->
geometry
().
corners
());
for
(
int
dof
=
0
;
dof
<
eIt
->
geometry
().
corners
();
dof
++
)
{
for
(
int
dof
=
0
;
dof
<
it
->
inside
()
->
geometry
().
corners
();
dof
++
)
{
FieldVector
<
double
,
dim
>
tmp
;
for
(
int
i
=
0
;
i
<
dim
;
i
++
)
...
...
@@ -727,8 +721,8 @@ void computeAverageInterface(const BoundaryPatch<GridType>& interface,
F
[
i
][
j
]
=
(
i
==
j
)
?
1
:
0
;
for
(
int
k
=
0
;
k
<
eIt
->
geometry
().
corners
();
k
++
)
F
[
i
][
j
]
+=
deformation
[
indexSet
.
template
subIndex
<
dim
>(
*
eIt
,
k
)][
i
]
*
shapeGrads
[
k
][
j
];
for
(
int
k
=
0
;
k
<
it
->
inside
()
->
geometry
().
corners
();
k
++
)
F
[
i
][
j
]
+=
deformation
[
indexSet
.
template
subIndex
<
dim
>(
*
it
->
inside
()
,
k
)][
i
]
*
shapeGrads
[
k
][
j
];
}
...
...
@@ -747,8 +741,6 @@ void computeAverageInterface(const BoundaryPatch<GridType>& interface,
}
}
}
...
...
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