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
27834231
Commit
27834231
authored
3 years ago
by
Lisa Julia Nebel
Browse files
Options
Downloads
Patches
Plain Diff
Test the derivative of a LocalProjectedFEFunction mapping to a 3D-RealTuple
parent
3aec4026
No related branches found
Branches containing commit
No related tags found
1 merge request
!78
Fix the use of projection-based finite elements in cosserat-continuum
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/localprojectedfefunctiontest.cc
+5
-3
5 additions, 3 deletions
test/localprojectedfefunctiontest.cc
with
5 additions
and
3 deletions
test/localprojectedfefunctiontest.cc
+
5
−
3
View file @
27834231
...
...
@@ -64,9 +64,9 @@ evaluateDerivativeFD(const LocalFunction& f, const Dune::FieldVector<ctype, dim>
}
template
<
int
domainDim
>
void
testDerivativeTangentiality
(
const
RealTuple
<
double
,
1
>&
x
,
const
FieldMatrix
<
double
,
1
,
domainDim
>&
derivative
)
template
<
int
domainDim
,
int
dim
>
void
testDerivativeTangentiality
(
const
RealTuple
<
double
,
dim
>&
x
,
const
FieldMatrix
<
double
,
dim
,
domainDim
>&
derivative
)
{
// By construction, derivatives of RealTuples are always tangent
}
...
...
@@ -191,6 +191,7 @@ void testDerivative(const GFE::LocalProjectedFEFunction<domainDim,double,typenam
std
::
cout
<<
className
<
TargetSpace
>
()
<<
": Analytical gradient does not match fd approximation."
<<
std
::
endl
;
std
::
cout
<<
"Analytical: "
<<
derivative
<<
std
::
endl
;
std
::
cout
<<
"FD : "
<<
fdDerivative
<<
std
::
endl
;
assert
(
false
);
}
testDerivativeTangentiality
(
f
.
evaluate
(
quadPos
),
derivative
);
...
...
@@ -262,6 +263,7 @@ int main()
test
<
RealTuple
<
double
,
1
>
,
2
>
(
GeometryTypes
::
triangle
);
test
<
UnitVector
<
double
,
2
>
,
2
>
(
GeometryTypes
::
triangle
);
test
<
RealTuple
<
double
,
3
>
,
2
>
(
GeometryTypes
::
triangle
);
test
<
UnitVector
<
double
,
3
>
,
2
>
(
GeometryTypes
::
triangle
);
test
<
Rotation
<
double
,
3
>
,
2
>
(
GeometryTypes
::
triangle
);
test
<
RigidBodyMotion
<
double
,
3
>
,
2
>
(
GeometryTypes
::
triangle
);
...
...
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