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
784c9c00
Commit
784c9c00
authored
15 years ago
by
Oliver Sander
Committed by
sander@PCPOOL.MI.FU-BERLIN.DE
15 years ago
Browse files
Options
Downloads
Patches
Plain Diff
implement fd gradient
[[Imported from SVN: r5571]]
parent
e107effc
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/localgeodesicfestiffness.hh
+14
-12
14 additions, 12 deletions
src/localgeodesicfestiffness.hh
with
14 additions
and
12 deletions
src/localgeodesicfestiffness.hh
+
14
−
12
View file @
784c9c00
...
...
@@ -304,14 +304,11 @@ class LocalGeodesicFEStiffness <GridView,UnitVector<dim> >
/** \brief For the fd approximations
*/
static
void
infinitesimalVariation
(
UnitVector
<
dim
>&
c
,
double
eps
,
int
i
)
static
Dune
::
FieldVector
<
double
,
dim
>
infinitesimalVariation
(
UnitVector
<
dim
>&
c
,
double
eps
,
int
i
)
{
DUNE_THROW
(
Dune
::
NotImplemented
,
"infinitesimalVariation"
);
#if 0
c = c.mult(Rotation<3,double>::exp((i==0)*eps,
(i==1)*eps,
(i==2)*eps));
#endif
Dune
::
FieldVector
<
double
,
dim
>
result
=
c
.
globalCoordinates
();
result
[
i
]
+=
eps
;
return
result
;
}
public
:
...
...
@@ -373,8 +370,7 @@ assembleGradient(const Entity& element,
const
std
::
vector
<
TargetSpace
>&
localSolution
,
std
::
vector
<
Dune
::
FieldVector
<
double
,
blocksize
>
>&
localGradient
)
const
{
DUNE_THROW
(
Dune
::
NotImplemented
,
"!"
);
#if 0
// ///////////////////////////////////////////////////////////
// Compute gradient by finite-difference approximation
// ///////////////////////////////////////////////////////////
...
...
@@ -399,9 +395,12 @@ assembleGradient(const Entity& element,
forwardSolution
[
i
]
=
localSolution
[
i
];
backwardSolution
[
i
]
=
localSolution
[
i
];
}
// Project gradient in embedding space onto the tangent space
localGradient
[
i
]
=
localSolution
[
i
].
projectOntoTangentSpace
(
localGradient
[
i
]);
}
#endif
}
...
...
@@ -410,8 +409,7 @@ void LocalGeodesicFEStiffness<GridType,UnitVector<dim> >::
assemble
(
const
Entity
&
element
,
const
std
::
vector
<
TargetSpace
>&
localSolution
)
{
DUNE_THROW
(
Dune
::
NotImplemented
,
"!"
);
#if 0
#warning Dummy Hessian implementation
// 1 degree of freedom per element vertex
int
nDofs
=
element
.
template
count
<
gridDim
>();
...
...
@@ -421,6 +419,10 @@ assemble(const Entity& element,
this
->
A
=
0
;
for
(
int
i
=
0
;
i
<
nDofs
;
i
++
)
for
(
int
j
=
0
;
j
<
blocksize
;
j
++
)
this
->
A
[
i
][
i
][
j
][
j
]
=
1
;
#if 0
double eps = 1e-4;
typedef typename Dune::Matrix<Dune::FieldMatrix<double,blocksize,blocksize> >::row_type::iterator ColumnIterator;
...
...
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