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
e6b6990a
Commit
e6b6990a
authored
10 years ago
by
Oliver Sander
Committed by
sander
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implement the derivative of the projected FE function
As of yet completely untested [[Imported from SVN: r9898]]
parent
a8b2a5ec
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/localprojectedfefunction.hh
+35
-6
35 additions, 6 deletions
dune/gfe/localprojectedfefunction.hh
with
35 additions
and
6 deletions
dune/gfe/localprojectedfefunction.hh
+
35
−
6
View file @
e6b6990a
...
...
@@ -70,11 +70,11 @@ namespace Dune {
DerivativeType
evaluateDerivative
(
const
Dune
::
FieldVector
<
ctype
,
dim
>&
local
,
const
TargetSpace
&
q
)
const
;
/** \brief Get the i'th base coefficient. */
TargetSpace
coefficient
(
int
i
)
const
{
return
coefficients_
[
i
];
}
/** \brief Get the i'th base coefficient. */
TargetSpace
coefficient
(
int
i
)
const
{
return
coefficients_
[
i
];
}
private
:
/** \brief The scalar local finite element, which provides the weighting factors
...
...
@@ -119,7 +119,36 @@ namespace Dune {
LocalProjectedFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
TargetSpace
>::
evaluateDerivative
(
const
Dune
::
FieldVector
<
ctype
,
dim
>&
local
,
const
TargetSpace
&
q
)
const
{
DUNE_THROW
(
NotImplemented
,
"Not implemented yet!"
);
// Evaluate the weighting factors---these are the Lagrangian shape function values at 'local'
std
::
vector
<
Dune
::
FieldVector
<
ctype
,
1
>
>
w
;
localFiniteElement_
.
localBasis
().
evaluateFunction
(
local
,
w
);
std
::
vector
<
Dune
::
FieldMatrix
<
ctype
,
1
,
dim
>
>
wDer
;
localFiniteElement_
.
localBasis
().
evaluateDerivative
(
local
,
wDer
);
typename
TargetSpace
::
CoordinateType
embeddedInterpolation
(
0
);
for
(
size_t
i
=
0
;
i
<
coefficients_
.
size
();
i
++
)
embeddedInterpolation
.
axpy
(
w
[
i
][
0
],
coefficients_
[
i
].
globalCoordinates
());
Dune
::
FieldMatrix
<
ctype
,
embeddedDim
,
dim
>
derivative
(
0
);
for
(
size_t
i
=
0
;
i
<
embeddedDim
;
i
++
)
for
(
size_t
j
=
0
;
j
<
dim
;
j
++
)
for
(
size_t
k
=
0
;
k
<
coefficients_
.
size
();
k
++
)
derivative
[
i
][
j
]
+=
wDer
[
k
][
0
][
j
]
*
coefficients_
[
k
].
globalCoordinates
()[
i
];
typename
TargetSpace
::
DerivativeOfProjection
derivativeOfProjection
=
TargetSpace
::
derivativeOfProjection
(
embeddedInterpolation
);
typename
LocalProjectedFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
TargetSpace
>::
DerivativeType
result
;
for
(
int
i
=
0
;
i
<
result
.
N
();
i
++
)
for
(
int
j
=
0
;
j
<
result
.
M
();
j
++
)
{
result
[
i
][
j
]
=
0
;
for
(
int
k
=
0
;
k
<
derivativeOfProjection
.
M
();
k
++
)
result
[
i
][
k
]
+=
derivativeOfProjection
[
i
][
k
]
*
derivative
[
k
][
j
];
}
return
result
;
}
}
...
...
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