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
60870867
Commit
60870867
authored
16 years ago
by
Oliver Sander
Committed by
sander@PCPOOL.MI.FU-BERLIN.DE
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
RodSolver now accepts a generic GeodesicFEAssembler instead of only a RodAssembler
[[Imported from SVN: r4037]]
parent
05f035da
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/rodsolver.cc
+8
-9
8 additions, 9 deletions
src/rodsolver.cc
src/rodsolver.hh
+3
-3
3 additions, 3 deletions
src/rodsolver.hh
with
11 additions
and
12 deletions
src/rodsolver.cc
+
8
−
9
View file @
60870867
...
...
@@ -27,7 +27,7 @@
template
<
class
GridType
>
void
RodSolver
<
GridType
>::
setup
(
const
GridType
&
grid
,
const
RodAssembler
<
GridType
>*
rodA
ssembler
,
const
GeodesicFEAssembler
<
typename
GridType
::
LeafGridView
,
RigidBodyMotion
<
3
>
>*
a
ssembler
,
const
SolutionType
&
x
,
const
Dune
::
BitSetVector
<
blocksize
>&
dirichletNodes
,
double
tolerance
,
...
...
@@ -45,7 +45,7 @@ void RodSolver<GridType>::setup(const GridType& grid,
using
namespace
Dune
;
grid_
=
&
grid
;
rodA
ssembler_
=
rodA
ssembler
;
a
ssembler_
=
a
ssembler
;
x_
=
x
;
tolerance_
=
tolerance
;
maxTrustRegionSteps_
=
maxTrustRegionSteps
;
...
...
@@ -125,7 +125,7 @@ void RodSolver<GridType>::setup(const GridType& grid,
hessianMatrix_
=
new
MatrixType
;
MatrixIndexSet
indices
(
grid_
->
size
(
1
),
grid_
->
size
(
1
));
rodA
ssembler_
->
getNeighborsPerVertex
(
indices
);
a
ssembler_
->
getNeighborsPerVertex
(
indices
);
indices
.
exportIdx
(
*
hessianMatrix_
);
// //////////////////////////////////////////////////////////
...
...
@@ -180,7 +180,7 @@ void RodSolver<GridType>::solve()
std
::
cout
<<
"----------------------------------------------------"
<<
std
::
endl
;
std
::
cout
<<
" Trust-Region Step Number: "
<<
i
<<
", radius: "
<<
trustRegion
.
radius
()
<<
", energy: "
<<
rodA
ssembler_
->
computeEnergy
(
x_
)
<<
std
::
endl
;
<<
", energy: "
<<
a
ssembler_
->
computeEnergy
(
x_
)
<<
std
::
endl
;
std
::
cout
<<
"----------------------------------------------------"
<<
std
::
endl
;
}
...
...
@@ -188,9 +188,8 @@ void RodSolver<GridType>::solve()
CorrectionType
corr
(
x_
.
size
());
corr
=
0
;
rodAssembler_
->
assembleGradient
(
x_
,
rhs
);
rodAssembler_
->
assembleMatrix
(
x_
,
*
hessianMatrix_
);
//rodAssembler_->assembleMatrixFD(x_, *hessianMatrix_);
assembler_
->
assembleGradient
(
x_
,
rhs
);
assembler_
->
assembleMatrix
(
x_
,
*
hessianMatrix_
);
//gradientFDCheck(x_, rhs, *rodAssembler_);
//hessianFDCheck(x_, *hessianMatrix_, *rodAssembler_);
...
...
@@ -324,8 +323,8 @@ void RodSolver<GridType>::solve()
}
/** \todo Don't always recompute oldEnergy */
double
oldEnergy
=
rodA
ssembler_
->
computeEnergy
(
x_
);
double
energy
=
rodA
ssembler_
->
computeEnergy
(
newIterate
);
double
oldEnergy
=
a
ssembler_
->
computeEnergy
(
x_
);
double
energy
=
a
ssembler_
->
computeEnergy
(
newIterate
);
// compute the model decrease
// It is $ m(x) - m(x+s) = -<g,s> - 0.5 <s, Hs>
...
...
This diff is collapsed.
Click to expand it.
src/rodsolver.hh
+
3
−
3
View file @
60870867
...
...
@@ -12,7 +12,7 @@
#include
<dune-solvers/norms/h1seminorm.hh>
#include
<dune-solvers/solvers/loopsolver.hh>
#include
"
rod
assembler.hh"
#include
"
geodesicfe
assembler.hh"
#include
"rigidbodymotion.hh"
...
...
@@ -38,7 +38,7 @@ public:
{}
void
setup
(
const
GridType
&
grid
,
const
RodAssembler
<
GridType
>*
rodAssembler
,
const
GeodesicFEAssembler
<
typename
GridType
::
LeafGridView
,
RigidBodyMotion
<
3
>
>*
rodAssembler
,
const
SolutionType
&
x
,
const
Dune
::
BitSetVector
<
blocksize
>&
dirichletNodes
,
double
tolerance
,
...
...
@@ -99,7 +99,7 @@ protected:
MatrixType
*
hessianMatrix_
;
/** \brief The assembler for the material law */
const
RodAssembler
<
GridType
>*
rodA
ssembler_
;
const
GeodesicFEAssembler
<
typename
GridType
::
LeafGridView
,
RigidBodyMotion
<
3
>
>*
a
ssembler_
;
/** \brief The multigrid solver */
LoopSolver
<
CorrectionType
>*
mmgSolver_
;
...
...
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