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
17773edb
Commit
17773edb
authored
11 years ago
by
Youett, Jonathan
Committed by
youett
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add method that creates a rod configuration by solving a static Dirichlet problem
[[Imported from SVN: r9508]]
parent
0f3274b5
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
dune/gfe/rodfactory.hh
+64
-1
64 additions, 1 deletion
dune/gfe/rodfactory.hh
with
64 additions
and
1 deletion
dune/gfe/rodfactory.hh
+
64
−
1
View file @
17773edb
...
...
@@ -5,9 +5,12 @@
#include
<dune/common/fvector.hh>
#include
<dune/fufem/crossproduct.hh>
#include
"
rigidbodymotion.hh
"
#include
<dune/gfe/
rigidbodymotion.hh
>
#include
<dune/gfe/localgeodesicfefunction.hh>
#include
<dune/gfe/rodassembler.hh>
#include
<dune/gfe/riemanniantrsolver.hh>
/** \brief A factory class that implements various ways to create rod configurations
*/
...
...
@@ -157,6 +160,66 @@ template <int dim>
}
}
/** \brief Make a rod solving a static Dirichlet problem
\param rod The configuration to be computed
\param radius The rod's radius
\param E The rod's elastic modulus
\param nu The rod's Poission modulus
\param beginning The prescribed Dirichlet values
\param end The prescribed Dirichlet values
\param[out] rod The new rod
*/
template
<
int
spaceDim
>
void
create
(
std
::
vector
<
RigidBodyMotion
<
double
,
spaceDim
>
>&
rod
,
double
radius
,
double
E
,
double
nu
,
const
RigidBodyMotion
<
double
,
spaceDim
>&
beginning
,
const
RigidBodyMotion
<
double
,
spaceDim
>&
end
)
{
// Make Dirichlet bitfields for the rods as well
Dune
::
BitSetVector
<
6
>
rodDirichletNodes
(
init
.
size
(),
false
);
for
(
int
j
=
0
;
j
<
6
;
j
++
)
{
rodDirichletNodes
[
0
][
j
]
=
true
;
rodDirichletNodes
.
back
()[
j
]
=
true
;
}
// Create local assembler for the static elastic problem
RodLocalStiffness
<
GridView
,
double
>
rodLocalStiffness
(
gridView_
,
radius
*
radius
*
M_PI
,
std
::
pow
(
radius
,
4
)
*
0.25
*
M_PI
,
std
::
pow
(
radius
,
4
)
*
0.25
*
M_PI
,
E
,
nu
);
RodAssembler
<
GridView
,
spaceDim
>
assembler
(
gridView_
,
&
rodLocalStiffness
);
// Create initial iterate using the straight rod interpolation method
create
(
rod
,
beginning
.
r
,
end
.
r
);
// Set reference configuration
rodLocalStiffness
.
setReferenceConfiguration
(
rod
);
// Set Dirichlet values
rod
[
0
]
=
beginning
;
rod
.
back
()
=
end
;
// Trust--Region solver
RiemannianTrustRegionSolver
<
typename
GridView
::
Grid
,
RigidBodyMotion
<
double
,
spaceDim
>
>
rodSolver
;
rodSolver
.
setup
(
gridView_
.
grid
(),
&
assembler
,
rod
,
rodDirichletNodes
,
1e-10
,
100
,
// TR tolerance and iterations
20
,
// init TR radius
200
,
1e-00
,
1
,
3
,
3
,
// Multigrid parameters
100
,
1e-8
,
false
);
// base solver parameters
rodSolver
.
verbosity_
=
NumProc
::
QUIET
;
rodSolver
.
solve
();
rod
=
rodSolver
.
getSol
();
}
private
:
const
GridView
gridView_
;
...
...
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