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
c1b97063
Commit
c1b97063
authored
14 years ago
by
Oliver Sander
Committed by
sander@FU-BERLIN.DE
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add method to assemble the gradient in local coordinates, not embedded coordinates
[[Imported from SVN: r6498]]
parent
680fdbac
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/gfe/harmonicenergystiffness.hh
+24
-1
24 additions, 1 deletion
dune/gfe/harmonicenergystiffness.hh
with
24 additions
and
1 deletion
dune/gfe/harmonicenergystiffness.hh
+
24
−
1
View file @
c1b97063
...
@@ -35,6 +35,10 @@ public:
...
@@ -35,6 +35,10 @@ public:
virtual
void
assembleEmbeddedGradient
(
const
Entity
&
element
,
virtual
void
assembleEmbeddedGradient
(
const
Entity
&
element
,
const
std
::
vector
<
TargetSpace
>&
solution
,
const
std
::
vector
<
TargetSpace
>&
solution
,
std
::
vector
<
typename
TargetSpace
::
EmbeddedTangentVector
>&
gradient
)
const
;
std
::
vector
<
typename
TargetSpace
::
EmbeddedTangentVector
>&
gradient
)
const
;
virtual
void
assembleGradient
(
const
Entity
&
element
,
const
std
::
vector
<
TargetSpace
>&
localSolution
,
std
::
vector
<
typename
TargetSpace
::
TangentVector
>&
localGradient
)
const
;
#endif
#endif
};
};
...
@@ -109,7 +113,7 @@ assembleEmbeddedGradient(const Entity& element,
...
@@ -109,7 +113,7 @@ assembleEmbeddedGradient(const Entity& element,
{
{
// initialize gradient
// initialize gradient
localGradient
.
resize
(
localSolution
.
size
());
localGradient
.
resize
(
localSolution
.
size
());
std
::
fill
(
localGradient
.
begin
(),
localGradient
.
end
(),
typename
TargetSpace
::
TangentVector
(
0
));
std
::
fill
(
localGradient
.
begin
(),
localGradient
.
end
(),
typename
TargetSpace
::
Embedded
TangentVector
(
0
));
// Set up local gfe function from the local coefficients
// Set up local gfe function from the local coefficients
LocalGeodesicFEFunction
<
gridDim
,
double
,
TargetSpace
>
localGeodesicFEFunction
(
localSolution
);
LocalGeodesicFEFunction
<
gridDim
,
double
,
TargetSpace
>
localGeodesicFEFunction
(
localSolution
);
...
@@ -161,6 +165,25 @@ assembleEmbeddedGradient(const Entity& element,
...
@@ -161,6 +165,25 @@ assembleEmbeddedGradient(const Entity& element,
}
}
}
template
<
class
GridView
,
class
TargetSpace
>
void
HarmonicEnergyLocalStiffness
<
GridView
,
TargetSpace
>::
assembleGradient
(
const
Entity
&
element
,
const
std
::
vector
<
TargetSpace
>&
localSolution
,
std
::
vector
<
typename
TargetSpace
::
TangentVector
>&
localGradient
)
const
{
std
::
vector
<
typename
TargetSpace
::
EmbeddedTangentVector
>
embeddedLocalGradient
;
// first compute the gradient in embedded coordinates
assembleEmbeddedGradient
(
element
,
localSolution
,
embeddedLocalGradient
);
// transform to coordinates on the tangent space
localGradient
.
resize
(
embeddedLocalGradient
.
size
());
for
(
size_t
i
=
0
;
i
<
localGradient
.
size
();
i
++
)
localSolution
[
i
].
orthonormalFrame
().
mv
(
embeddedLocalGradient
[
i
],
localGradient
[
i
]);
}
}
#endif
#endif
#endif
#endif
...
...
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