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
5affcea4
Commit
5affcea4
authored
13 years ago
by
Oliver Sander
Committed by
sander@FU-BERLIN.DE
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
change std::vector to Dune::array to adapt to changes in the local assembler base class
[[Imported from SVN: r7574]]
parent
867bb84c
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/rodassembler.cc
+2
-2
2 additions, 2 deletions
dune/gfe/rodassembler.cc
dune/gfe/rodlocalstiffness.hh
+7
-4
7 additions, 4 deletions
dune/gfe/rodlocalstiffness.hh
with
9 additions
and
6 deletions
dune/gfe/rodassembler.cc
+
2
−
2
View file @
5affcea4
...
...
@@ -33,10 +33,10 @@ assembleGradient(const std::vector<RigidBodyMotion<3> >& sol,
for
(;
it
!=
endIt
;
++
it
)
{
// A 1d grid has two vertices
const
int
nDofs
=
2
;
static
const
int
nDofs
=
2
;
// Extract local solution
std
::
vector
<
RigidBodyMotion
<
3
>
>
localSolution
(
nDofs
)
;
Dune
::
array
<
RigidBodyMotion
<
3
>
,
nDofs
>
localSolution
;
for
(
int
i
=
0
;
i
<
nDofs
;
i
++
)
localSolution
[
i
]
=
sol
[
indexSet
.
subIndex
(
*
it
,
i
,
gridDim
)];
...
...
This diff is collapsed.
Click to expand it.
dune/gfe/rodlocalstiffness.hh
+
7
−
4
View file @
5affcea4
...
...
@@ -96,7 +96,7 @@ public:
}
virtual
RT
energy
(
const
Entity
&
e
,
const
std
::
vector
<
RigidBodyMotion
<
3
>
>&
localSolution
)
const
;
const
Dune
::
array
<
RigidBodyMotion
<
3
>
,
dim
+
1
>&
localSolution
)
const
;
/** \brief Assemble the element gradient of the energy functional */
void
assembleGradient
(
const
Entity
&
element
,
...
...
@@ -142,7 +142,7 @@ protected:
template
<
class
GridType
,
class
RT
>
RT
RodLocalStiffness
<
GridType
,
RT
>::
energy
(
const
Entity
&
element
,
const
std
::
vector
<
RigidBodyMotion
<
3
>
>&
localSolution
const
Dune
::
array
<
RigidBodyMotion
<
3
>
,
dim
+
1
>&
localSolution
)
const
{
RT
energy
=
0
;
...
...
@@ -159,6 +159,9 @@ energy(const Entity& element,
const
Dune
::
QuadratureRule
<
double
,
1
>&
shearingQuad
=
Dune
::
QuadratureRules
<
double
,
1
>::
rule
(
element
.
type
(),
shearQuadOrder
);
// hack: convert from std::array to std::vector
std
::
vector
<
RigidBodyMotion
<
3
>
>
localSolutionVector
(
localSolution
.
begin
(),
localSolution
.
end
());
for
(
size_t
pt
=
0
;
pt
<
shearingQuad
.
size
();
pt
++
)
{
// Local position of the quadrature point
...
...
@@ -168,7 +171,7 @@ energy(const Entity& element,
double
weight
=
shearingQuad
[
pt
].
weight
()
*
integrationElement
;
Dune
::
FieldVector
<
double
,
6
>
strain
=
getStrain
(
localSolution
,
element
,
quadPos
);
Dune
::
FieldVector
<
double
,
6
>
strain
=
getStrain
(
localSolution
Vector
,
element
,
quadPos
);
// The reference strain
Dune
::
FieldVector
<
double
,
6
>
referenceStrain
=
getStrain
(
localReferenceConfiguration
,
element
,
quadPos
);
...
...
@@ -189,7 +192,7 @@ energy(const Entity& element,
double
weight
=
bendingQuad
[
pt
].
weight
()
*
element
.
geometry
().
integrationElement
(
quadPos
);
Dune
::
FieldVector
<
double
,
6
>
strain
=
getStrain
(
localSolution
,
element
,
quadPos
);
Dune
::
FieldVector
<
double
,
6
>
strain
=
getStrain
(
localSolution
Vector
,
element
,
quadPos
);
// The reference strain
Dune
::
FieldVector
<
double
,
6
>
referenceStrain
=
getStrain
(
localReferenceConfiguration
,
element
,
quadPos
);
...
...
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