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
6b4e2b74
Commit
6b4e2b74
authored
7 years ago
by
Sander, Oliver
Browse files
Options
Downloads
Patches
Plain Diff
Always explicitly use std::array
parent
d6042742
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/gfe/rodlocalstiffness.hh
+5
-3
5 additions, 3 deletions
dune/gfe/rodlocalstiffness.hh
test/adolctest.cc
+6
-4
6 additions, 4 deletions
test/adolctest.cc
with
11 additions
and
7 deletions
dune/gfe/rodlocalstiffness.hh
+
5
−
3
View file @
6b4e2b74
#ifndef ROD_LOCAL_STIFFNESS_HH
#define ROD_LOCAL_STIFFNESS_HH
#include
<array>
#include
<dune/common/fmatrix.hh>
#include
<dune/istl/matrix.hh>
#include
<dune/geometry/quadraturerules.hh>
...
...
@@ -583,7 +585,7 @@ assembleGradient(const Entity& element,
q
.
getFirstDerivativesOfDirectors
(
dd_dq
);
// First derivatives of the position
array
<
Quaternion
<
double
>
,
6
>
dq_dwij
;
std
::
array
<
Quaternion
<
double
>
,
6
>
dq_dwij
;
interpolationDerivative
(
solution
[
0
].
q
,
solution
[
1
].
q
,
quadPos
,
dq_dwij
);
// /////////////////////////////////////////////
...
...
@@ -654,10 +656,10 @@ assembleGradient(const Entity& element,
FieldVector
<
double
,
blocksize
>
referenceStrain
=
getStrain
(
localReferenceConfiguration
,
element
,
quadPos
);
// First derivatives of the position
array
<
Quaternion
<
double
>
,
6
>
dq_dwij
;
std
::
array
<
Quaternion
<
double
>
,
6
>
dq_dwij
;
interpolationDerivative
(
solution
[
0
].
q
,
solution
[
1
].
q
,
quadPos
,
dq_dwij
);
array
<
Quaternion
<
double
>
,
6
>
dq_ds_dwij
;
std
::
array
<
Quaternion
<
double
>
,
6
>
dq_ds_dwij
;
interpolationVelocityDerivative
(
solution
[
0
].
q
,
solution
[
1
].
q
,
quadPos
[
0
]
*
intervalLength
,
intervalLength
,
dq_ds_dwij
);
...
...
This diff is collapsed.
Click to expand it.
test/adolctest.cc
+
6
−
4
View file @
6b4e2b74
...
...
@@ -4,6 +4,8 @@
#include
<fenv.h>
#include
<array>
//#define MULTIPRECISION
#ifdef MULTIPRECISION
...
...
@@ -283,8 +285,8 @@ assembleGradientAndHessian(const typename Basis::LocalView& localView,
field_type
centerValue
=
-
localEnergy_
->
energy
(
localView
,
localASolution
);
// Precompute energy infinitesimal corrections in the directions of the local basis vectors
std
::
vector
<
Dune
::
array
<
field_type
,
embeddedBlocksize
>
>
forwardEnergy
(
nDofs
);
std
::
vector
<
Dune
::
array
<
field_type
,
embeddedBlocksize
>
>
backwardEnergy
(
nDofs
);
std
::
vector
<
std
::
array
<
field_type
,
embeddedBlocksize
>
>
forwardEnergy
(
nDofs
);
std
::
vector
<
std
::
array
<
field_type
,
embeddedBlocksize
>
>
backwardEnergy
(
nDofs
);
for
(
size_t
i
=
0
;
i
<
localSolution
.
size
();
i
++
)
{
for
(
size_t
i2
=
0
;
i2
<
embeddedBlocksize
;
i2
++
)
{
...
...
@@ -394,7 +396,7 @@ void compareMatrices(const Matrix<FieldMatrix<double,N,N> >& matrixA, std::strin
double
absDifference
=
valueA
-
valueB
;
double
relDifference
=
std
::
abs
(
absDifference
)
/
std
::
abs
(
valueA
);
maxAbsDifference
=
std
::
max
(
maxAbsDifference
,
std
::
abs
(
absDifference
));
if
(
not
isinf
(
relDifference
))
if
(
not
std
::
isinf
(
relDifference
))
maxRelDifference
=
std
::
max
(
maxRelDifference
,
relDifference
);
if
(
relDifference
>
1
)
...
...
@@ -421,7 +423,7 @@ int main (int argc, char *argv[]) try
FieldVector
<
double
,
dim
>
upper
=
{{
0.38
,
0.128
}};
array
<
int
,
dim
>
elements
=
{{
1
5
,
5
}};
std
::
array
<
int
,
dim
>
elements
=
{{
5
,
5
}};
GridType
grid
(
upper
,
elements
);
typedef
GridType
::
LeafGridView
GridView
;
...
...
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