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
62f65a9f
Commit
62f65a9f
authored
11 years ago
by
Oliver Sander
Committed by
sander
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Special LocalGFEFunction also for non-double RigidBodyMotion
[[Imported from SVN: r9404]]
parent
ac1f3cdf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/gfe/localgeodesicfefunction.hh
+16
-16
16 additions, 16 deletions
dune/gfe/localgeodesicfefunction.hh
with
16 additions
and
16 deletions
dune/gfe/localgeodesicfefunction.hh
+
16
−
16
View file @
62f65a9f
...
...
@@ -593,10 +593,10 @@ evaluateFDDerivativeOfGradientWRTCoefficient(const Dune::FieldVector<ctype, dim>
\tparam dim Dimension of the reference element
\tparam ctype Type used for coordinates on the reference element
*/
template
<
int
dim
,
class
ctype
,
class
LocalFiniteElement
>
class
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
RigidBodyMotion
<
doubl
e
,
3
>
>
template
<
int
dim
,
class
ctype
,
class
LocalFiniteElement
,
class
field_type
>
class
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
RigidBodyMotion
<
field_typ
e
,
3
>
>
{
typedef
RigidBodyMotion
<
doubl
e
,
3
>
TargetSpace
;
typedef
RigidBodyMotion
<
field_typ
e
,
3
>
TargetSpace
;
typedef
typename
TargetSpace
::
EmbeddedTangentVector
EmbeddedTangentVector
;
static
const
int
embeddedDim
=
EmbeddedTangentVector
::
dimension
;
...
...
@@ -606,10 +606,10 @@ class LocalGeodesicFEFunction<dim,ctype,LocalFiniteElement,RigidBodyMotion<doubl
public:
/** \brief The type used for derivatives */
typedef
Dune
::
FieldMatrix
<
c
type
,
embeddedDim
,
dim
>
DerivativeType
;
typedef
Dune
::
FieldMatrix
<
field_
type
,
embeddedDim
,
dim
>
DerivativeType
;
/** \brief The type used for derivatives of the gradient with respect to coefficients */
typedef
Tensor3
<
c
type
,
embeddedDim
,
embeddedDim
,
dim
>
DerivativeOfGradientWRTCoefficientType
;
typedef
Tensor3
<
field_
type
,
embeddedDim
,
embeddedDim
,
dim
>
DerivativeOfGradientWRTCoefficientType
;
/** \brief Constructor */
LocalGeodesicFEFunction
(
const
LocalFiniteElement
&
localFiniteElement
,
...
...
@@ -622,11 +622,11 @@ public:
for
(
size_t
i
=
0
;
i
<
coefficients
.
size
();
i
++
)
translationCoefficients_
[
i
]
=
coefficients
[
i
].
r
;
std
::
vector
<
Rotation
<
c
type
,
3
>
>
orientationCoefficients
(
coefficients
.
size
());
std
::
vector
<
Rotation
<
field_
type
,
3
>
>
orientationCoefficients
(
coefficients
.
size
());
for
(
size_t
i
=
0
;
i
<
coefficients
.
size
();
i
++
)
orientationCoefficients
[
i
]
=
coefficients
[
i
].
q
;
orientationFEFunction_
=
std
::
auto_ptr
<
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
Rotation
<
doubl
e
,
3
>
>
>
(
new
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
Rotation
<
doubl
e
,
3
>
>
(
localFiniteElement
,
orientationCoefficients
));
orientationFEFunction_
=
std
::
auto_ptr
<
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
Rotation
<
field_typ
e
,
3
>
>
>
(
new
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
Rotation
<
field_typ
e
,
3
>
>
(
localFiniteElement
,
orientationCoefficients
));
}
...
...
@@ -688,7 +688,7 @@ public:
DerivativeType
evaluateDerivative
(
const
Dune
::
FieldVector
<
ctype
,
dim
>&
local
,
const
TargetSpace
&
q
)
const
{
D
une
::
FieldMatrix
<
ctype
,
embeddedDim
,
dim
>
result
(
0
);
D
erivativeType
result
(
0
);
// get translation part
std
::
vector
<
Dune
::
FieldMatrix
<
ctype
,
1
,
dim
>
>
sfDer
(
translationCoefficients_
.
size
());
...
...
@@ -699,7 +699,7 @@ public:
result
[
j
].
axpy
(
translationCoefficients_
[
i
][
j
],
sfDer
[
i
][
0
]);
// get orientation part
Dune
::
FieldMatrix
<
c
type
,
4
,
dim
>
qResult
=
orientationFEFunction_
->
evaluateDerivative
(
local
,
q
.
q
);
Dune
::
FieldMatrix
<
field_
type
,
4
,
dim
>
qResult
=
orientationFEFunction_
->
evaluateDerivative
(
local
,
q
.
q
);
for
(
int
i
=
0
;
i
<
4
;
i
++
)
for
(
int
j
=
0
;
j
<
dim
;
j
++
)
result
[
3
+
i
][
j
]
=
qResult
[
i
][
j
];
...
...
@@ -732,7 +732,7 @@ public:
/** \brief Evaluate the derivative of the function value with respect to a coefficient */
void
evaluateDerivativeOfValueWRTCoefficient
(
const
Dune
::
FieldVector
<
ctype
,
dim
>&
local
,
int
coefficient
,
Dune
::
FieldMatrix
<
doubl
e
,
embeddedDim
,
embeddedDim
>&
derivative
)
const
Dune
::
FieldMatrix
<
field_typ
e
,
embeddedDim
,
embeddedDim
>&
derivative
)
const
{
derivative
=
0
;
...
...
@@ -743,7 +743,7 @@ public:
derivative
[
i
][
i
]
=
w
[
coefficient
];
// Rotation part
Dune
::
FieldMatrix
<
c
type
,
4
,
4
>
qDerivative
;
Dune
::
FieldMatrix
<
field_
type
,
4
,
4
>
qDerivative
;
orientationFEFunction_
->
evaluateDerivativeOfValueWRTCoefficient
(
local
,
coefficient
,
qDerivative
);
for
(
int
i
=
0
;
i
<
4
;
i
++
)
for
(
int
j
=
0
;
j
<
4
;
j
++
)
...
...
@@ -753,7 +753,7 @@ public:
/** \brief Evaluate the derivative of the function value with respect to a coefficient */
void
evaluateFDDerivativeOfValueWRTCoefficient
(
const
Dune
::
FieldVector
<
ctype
,
dim
>&
local
,
int
coefficient
,
Dune
::
FieldMatrix
<
doubl
e
,
embeddedDim
,
embeddedDim
>&
derivative
)
const
Dune
::
FieldMatrix
<
field_typ
e
,
embeddedDim
,
embeddedDim
>&
derivative
)
const
{
derivative
=
0
;
...
...
@@ -776,7 +776,7 @@ public:
int
coefficient
,
DerivativeOfGradientWRTCoefficientType
&
derivative
)
const
{
derivative
=
0
;
derivative
=
field_type
(
0
)
;
// Translation part
std
::
vector
<
Dune
::
FieldMatrix
<
ctype
,
1
,
dim
>
>
w
;
...
...
@@ -785,7 +785,7 @@ public:
derivative
[
i
][
i
]
=
w
[
coefficient
][
0
];
// Rotation part
Tensor3
<
c
type
,
4
,
4
,
dim
>
qDerivative
;
Tensor3
<
field_
type
,
4
,
4
,
dim
>
qDerivative
;
orientationFEFunction_
->
evaluateDerivativeOfGradientWRTCoefficient
(
local
,
coefficient
,
qDerivative
);
for
(
int
i
=
0
;
i
<
4
;
i
++
)
for
(
int
j
=
0
;
j
<
4
;
j
++
)
...
...
@@ -829,9 +829,9 @@ private:
// The two factors of a RigidBodyMotion
//LocalGeodesicFEFunction<dim,ctype,RealTuple<3> > translationFEFunction_;
std
::
vector
<
Dune
::
FieldVector
<
doubl
e
,
3
>
>
translationCoefficients_
;
std
::
vector
<
Dune
::
FieldVector
<
field_typ
e
,
3
>
>
translationCoefficients_
;
std
::
auto_ptr
<
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
Rotation
<
doubl
e
,
3
>
>
>
orientationFEFunction_
;
std
::
auto_ptr
<
LocalGeodesicFEFunction
<
dim
,
ctype
,
LocalFiniteElement
,
Rotation
<
field_typ
e
,
3
>
>
>
orientationFEFunction_
;
};
...
...
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