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
7d04f91b
Commit
7d04f91b
authored
17 years ago
by
Oliver Sander
Committed by
sander@PCPOOL.MI.FU-BERLIN.DE
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
split gradient assembly into two parts in order to allow reduced integration
[[Imported from SVN: r1718]]
parent
14fb84d4
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
src/rodassembler.cc
+58
-19
58 additions, 19 deletions
src/rodassembler.cc
with
58 additions
and
19 deletions
src/rodassembler.cc
+
58
−
19
View file @
7d04f91b
...
@@ -366,19 +366,24 @@ assembleGradient(const Entity& element,
...
@@ -366,19 +366,24 @@ assembleGradient(const Entity& element,
double
intervalLength
=
element
.
geometry
()[
1
][
0
]
-
element
.
geometry
()[
0
][
0
];
double
intervalLength
=
element
.
geometry
()[
1
][
0
]
-
element
.
geometry
()[
0
][
0
];
// ///////////////////////////////////////////////////////////////////////////////////
// Reduced integration to avoid locking: assembly is split into a shear part
// and a bending part. Different quadrature rules are used for the two parts.
// This avoids locking.
// ///////////////////////////////////////////////////////////////////////////////////
// Get quadrature rule
// Get quadrature rule
int
polOrd
=
2
;
const
QuadratureRule
<
double
,
1
>&
shearingQuad
=
QuadratureRules
<
double
,
1
>::
rule
(
element
.
type
(),
shearQuadOrder
);
const
QuadratureRule
<
double
,
1
>&
quad
=
QuadratureRules
<
double
,
1
>::
rule
(
element
.
type
(),
polOrd
);
for
(
int
pt
=
0
;
pt
<
q
uad
.
size
();
pt
++
)
{
for
(
int
pt
=
0
;
pt
<
shearingQ
uad
.
size
();
pt
++
)
{
// Local position of the quadrature point
// Local position of the quadrature point
const
FieldVector
<
double
,
1
>&
quadPos
=
q
uad
[
pt
].
position
();
const
FieldVector
<
double
,
1
>&
quadPos
=
shearingQ
uad
[
pt
].
position
();
const
FieldMatrix
<
double
,
1
,
1
>&
inv
=
element
.
geometry
().
jacobianInverseTransposed
(
quadPos
);
const
FieldMatrix
<
double
,
1
,
1
>&
inv
=
element
.
geometry
().
jacobianInverseTransposed
(
quadPos
);
const
double
integrationElement
=
element
.
geometry
().
integrationElement
(
quadPos
);
const
double
integrationElement
=
element
.
geometry
().
integrationElement
(
quadPos
);
double
weight
=
q
uad
[
pt
].
weight
()
*
integrationElement
;
double
weight
=
shearingQ
uad
[
pt
].
weight
()
*
integrationElement
;
// ///////////////////////////////////////
// ///////////////////////////////////////
// Compute deformation gradient
// Compute deformation gradient
...
@@ -396,11 +401,6 @@ assembleGradient(const Entity& element,
...
@@ -396,11 +401,6 @@ assembleGradient(const Entity& element,
}
}
// Get the value of the shape functions
double
shapeFunction
[
2
];
for
(
int
i
=
0
;
i
<
2
;
i
++
)
shapeFunction
[
i
]
=
baseSet
[
i
].
evaluateFunction
(
0
,
quadPos
);
// //////////////////////////////////
// //////////////////////////////////
// Interpolate
// Interpolate
// //////////////////////////////////
// //////////////////////////////////
...
@@ -412,10 +412,6 @@ assembleGradient(const Entity& element,
...
@@ -412,10 +412,6 @@ assembleGradient(const Entity& element,
// Interpolate current rotation at this quadrature point
// Interpolate current rotation at this quadrature point
Quaternion
<
double
>
q
=
Quaternion
<
double
>::
interpolate
(
solution
[
0
].
q
,
solution
[
1
].
q
,
quadPos
[
0
]);
Quaternion
<
double
>
q
=
Quaternion
<
double
>::
interpolate
(
solution
[
0
].
q
,
solution
[
1
].
q
,
quadPos
[
0
]);
// Get the derivative of the rotation at the quadrature point by interpolating in $H$
Quaternion
<
double
>
q_s
=
Quaternion
<
double
>::
interpolateDerivative
(
solution
[
0
].
q
,
solution
[
1
].
q
,
quadPos
,
1
/
shapeGrad
[
1
]);
// The current strain
// The current strain
FieldVector
<
double
,
blocksize
>
strain
=
getStrain
(
solution
,
element
,
quadPos
);
FieldVector
<
double
,
blocksize
>
strain
=
getStrain
(
solution
,
element
,
quadPos
);
...
@@ -431,10 +427,6 @@ assembleGradient(const Entity& element,
...
@@ -431,10 +427,6 @@ assembleGradient(const Entity& element,
array
<
Quaternion
<
double
>
,
6
>
dq_dwij
;
array
<
Quaternion
<
double
>
,
6
>
dq_dwij
;
interpolationDerivative
(
solution
[
0
].
q
,
solution
[
1
].
q
,
quadPos
,
dq_dwij
);
interpolationDerivative
(
solution
[
0
].
q
,
solution
[
1
].
q
,
quadPos
,
dq_dwij
);
array
<
Quaternion
<
double
>
,
6
>
dq_ds_dwij
;
interpolationVelocityDerivative
(
solution
[
0
].
q
,
solution
[
1
].
q
,
quadPos
*
intervalLength
,
intervalLength
,
dq_ds_dwij
);
// /////////////////////////////////////////////
// /////////////////////////////////////////////
// Sum it all up
// Sum it all up
// /////////////////////////////////////////////
// /////////////////////////////////////////////
...
@@ -465,6 +457,54 @@ assembleGradient(const Entity& element,
...
@@ -465,6 +457,54 @@ assembleGradient(const Entity& element,
}
}
}
}
}
}
// /////////////////////////////////////////////////////
// Now: the bending/torsion part
// /////////////////////////////////////////////////////
// Get quadrature rule
const
QuadratureRule
<
double
,
1
>&
bendingQuad
=
QuadratureRules
<
double
,
1
>::
rule
(
element
.
type
(),
bendingQuadOrder
);
for
(
int
pt
=
0
;
pt
<
bendingQuad
.
size
();
pt
++
)
{
// Local position of the quadrature point
const
FieldVector
<
double
,
1
>&
quadPos
=
bendingQuad
[
pt
].
position
();
const
FieldMatrix
<
double
,
1
,
1
>&
inv
=
element
.
geometry
().
jacobianInverseTransposed
(
quadPos
);
const
double
integrationElement
=
element
.
geometry
().
integrationElement
(
quadPos
);
double
weight
=
bendingQuad
[
pt
].
weight
()
*
integrationElement
;
// Interpolate current rotation at this quadrature point
Quaternion
<
double
>
q
=
Quaternion
<
double
>::
interpolate
(
solution
[
0
].
q
,
solution
[
1
].
q
,
quadPos
[
0
]);
// Get the derivative of the rotation at the quadrature point by interpolating in $H$
Quaternion
<
double
>
q_s
=
Quaternion
<
double
>::
interpolateDerivative
(
solution
[
0
].
q
,
solution
[
1
].
q
,
quadPos
,
integrationElement
);
// The current strain
FieldVector
<
double
,
blocksize
>
strain
=
getStrain
(
solution
,
element
,
quadPos
);
// The reference strain
FieldVector
<
double
,
blocksize
>
referenceStrain
=
getStrain
(
referenceConfiguration
,
element
,
quadPos
);
// First derivatives of the position
array
<
Quaternion
<
double
>
,
6
>
dq_dwij
;
interpolationDerivative
(
solution
[
0
].
q
,
solution
[
1
].
q
,
quadPos
,
dq_dwij
);
array
<
Quaternion
<
double
>
,
6
>
dq_ds_dwij
;
interpolationVelocityDerivative
(
solution
[
0
].
q
,
solution
[
1
].
q
,
quadPos
*
intervalLength
,
intervalLength
,
dq_ds_dwij
);
// /////////////////////////////////////////////
// Sum it all up
// /////////////////////////////////////////////
for
(
int
i
=
0
;
i
<
numOfBaseFct
;
i
++
)
{
// /////////////////////////////////////////////
// /////////////////////////////////////////////
// The rotational part
// The rotational part
// /////////////////////////////////////////////
// /////////////////////////////////////////////
...
@@ -489,7 +529,6 @@ assembleGradient(const Entity& element,
...
@@ -489,7 +529,6 @@ assembleGradient(const Entity& element,
}
}
}
}
}
}
template
<
class
GridType
>
template
<
class
GridType
>
...
...
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