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
b098d104
Commit
b098d104
authored
11 years ago
by
Oliver Sander
Committed by
sander
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
cleanup
[[Imported from SVN: r9380]]
parent
9e0f715d
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/localgeodesicfefunction.hh
+9
-7
9 additions, 7 deletions
dune/gfe/localgeodesicfefunction.hh
with
9 additions
and
7 deletions
dune/gfe/localgeodesicfefunction.hh
+
9
−
7
View file @
b098d104
...
...
@@ -40,7 +40,7 @@ class LocalGeodesicFEFunction
public:
/** \brief The type used for derivatives */
typedef
Dune
::
FieldMatrix
<
ctype
,
E
mbedded
TangentVector
::
dimension
,
dim
>
DerivativeType
;
typedef
Dune
::
FieldMatrix
<
ctype
,
e
mbedded
Dim
,
dim
>
DerivativeType
;
/** \brief The type used for derivatives of the gradient with respect to coefficients */
typedef
Tensor3
<
ctype
,
embeddedDim
,
embeddedDim
,
dim
>
DerivativeOfGradientWRTCoefficientType
;
...
...
@@ -203,7 +203,8 @@ evaluate(const Dune::FieldVector<ctype, dim>& local) const
}
template
<
int
dim
,
class
ctype
,
class
LocalFiniteElement
,
class
TargetSpace
>
Dune
::
FieldMatrix
<
ctype
,
TargetSpace
::
EmbeddedTangentVector
::
dimension
,
dim
>
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
TargetSpace
>::
typename
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
TargetSpace
>::
DerivativeType
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
TargetSpace
>::
evaluateDerivative
(
const
Dune
::
FieldVector
<
ctype
,
dim
>&
local
)
const
{
// the function value at the point where we are evaluating the derivative
...
...
@@ -214,7 +215,8 @@ evaluateDerivative(const Dune::FieldVector<ctype, dim>& local) const
}
template
<
int
dim
,
class
ctype
,
class
LocalFiniteElement
,
class
TargetSpace
>
Dune
::
FieldMatrix
<
ctype
,
TargetSpace
::
EmbeddedTangentVector
::
dimension
,
dim
>
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
TargetSpace
>::
typename
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
TargetSpace
>::
DerivativeType
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
TargetSpace
>::
evaluateDerivative
(
const
Dune
::
FieldVector
<
ctype
,
dim
>&
local
,
const
TargetSpace
&
q
)
const
{
Dune
::
FieldMatrix
<
ctype
,
embeddedDim
,
dim
>
result
;
...
...
@@ -309,12 +311,13 @@ evaluateDerivative(const Dune::FieldVector<ctype, dim>& local, const TargetSpace
}
template
<
int
dim
,
class
ctype
,
class
LocalFiniteElement
,
class
TargetSpace
>
Dune
::
FieldMatrix
<
ctype
,
TargetSpace
::
EmbeddedTangentVector
::
dimension
,
dim
>
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
TargetSpace
>::
typename
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
TargetSpace
>::
DerivativeType
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
TargetSpace
>::
evaluateDerivativeFD
(
const
Dune
::
FieldVector
<
ctype
,
dim
>&
local
)
const
{
double
eps
=
1e-6
;
Dune
::
FieldMatrix
<
ctype
,
E
mbedded
TangentVector
::
dimension
,
dim
>
result
;
Dune
::
FieldMatrix
<
ctype
,
e
mbedded
Dim
,
dim
>
result
;
for
(
int
i
=
0
;
i
<
dim
;
i
++
)
{
...
...
@@ -327,7 +330,7 @@ evaluateDerivativeFD(const Dune::FieldVector<ctype, dim>& local) const
EmbeddedTangentVector
fdDer
=
evaluate
(
forward
).
globalCoordinates
()
-
evaluate
(
backward
).
globalCoordinates
();
fdDer
/=
2
*
eps
;
for
(
int
j
=
0
;
j
<
E
mbedded
TangentVector
::
dimension
;
j
++
)
for
(
int
j
=
0
;
j
<
e
mbedded
Dim
;
j
++
)
result
[
j
][
i
]
=
fdDer
[
j
];
}
...
...
@@ -535,7 +538,6 @@ evaluateFDDerivativeOfGradientWRTCoefficient(const Dune::FieldVector<ctype, dim>
DerivativeOfGradientWRTCoefficientType
&
result
)
const
{
double
eps
=
1e-6
;
static
const
int
embeddedDim
=
TargetSpace
::
EmbeddedTangentVector
::
dimension
;
// loop over the different partial derivatives
for
(
int
j
=
0
;
j
<
embeddedDim
;
j
++
)
{
...
...
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