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
bd46c447
Commit
bd46c447
authored
14 years ago
by
Oliver Sander
Committed by
sander@FU-BERLIN.DE
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
centralize all information a RodContinuumComplex keeps about a rod in a special struct
[[Imported from SVN: r6821]]
parent
7f371c00
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dirneucoupling.cc
+14
-14
14 additions, 14 deletions
dirneucoupling.cc
dune/gfe/coupling/rodcontinuumcomplex.hh
+13
-9
13 additions, 9 deletions
dune/gfe/coupling/rodcontinuumcomplex.hh
dune/gfe/coupling/rodcontinuumsteklovpoincarestep.hh
+1
-1
1 addition, 1 deletion
dune/gfe/coupling/rodcontinuumsteklovpoincarestep.hh
with
28 additions
and
24 deletions
dirneucoupling.cc
+
14
−
14
View file @
bd46c447
...
...
@@ -128,7 +128,7 @@ int main (int argc, char *argv[]) try
RodContinuumComplex
<
RodGridType
,
GridType
>
complex
;
complex
.
rod
Grid
s_
[
"rod"
]
=
shared_ptr
<
RodGridType
>
complex
.
rods_
[
"rod"
]
.
grid_
=
shared_ptr
<
RodGridType
>
(
new
RodGridType
(
numRodBaseElements
,
0
,
(
rodRestEndPoint
[
1
]
-
rodRestEndPoint
[
0
]).
two_norm
()));
complex
.
continuumGrids_
[
"continuum"
]
=
shared_ptr
<
GridType
>
(
AmiraMeshReader
<
GridType
>::
read
(
path
+
objectName
));
...
...
@@ -140,18 +140,18 @@ int main (int argc, char *argv[]) try
// Globally refine grids
// //////////////////////////////////////
complex
.
rod
Grid
s_
[
"rod"
]
->
globalRefine
(
numLevels
-
1
);
complex
.
rods_
[
"rod"
]
.
grid_
->
globalRefine
(
numLevels
-
1
);
complex
.
continuumGrids_
[
"continuum"
]
->
globalRefine
(
numLevels
-
1
);
RodSolutionType
rodX
(
complex
.
rod
Grid
s_
[
"rod"
]
->
size
(
1
));
RodSolutionType
rodX
(
complex
.
rods_
[
"rod"
]
.
grid_
->
size
(
1
));
int
toplevel
=
complex
.
rod
Grid
s_
[
"rod"
]
->
maxLevel
();
int
toplevel
=
complex
.
rods_
[
"rod"
]
.
grid_
->
maxLevel
();
// //////////////////////////
// Initial solution
// //////////////////////////
RodFactory
<
RodGridType
::
LeafGridView
>
rodFactory
(
complex
.
rod
Grid
s_
[
"rod"
]
->
leafView
());
RodFactory
<
RodGridType
::
LeafGridView
>
rodFactory
(
complex
.
rods_
[
"rod"
]
.
grid_
->
leafView
());
rodFactory
.
create
(
rodX
,
rodRestEndPoint
[
0
],
rodRestEndPoint
[
1
]);
// /////////////////////////////////////////
...
...
@@ -164,13 +164,13 @@ int main (int argc, char *argv[]) try
rodX
.
back
().
q
=
Rotation
<
3
,
double
>
(
axis
,
M_PI
*
angle
/
180
);
rodFactory
.
create
(
complex
.
rod
D
irichletValues_
[
"rod"
]
,
rodFactory
.
create
(
complex
.
rod
s_
[
"rod"
].
d
irichletValues_
,
RigidBodyMotion
<
3
>
(
FieldVector
<
double
,
3
>
(
0
),
Rotation
<
3
,
double
>::
identity
()));
complex
.
rod
D
irichletValues_
[
"rod"
]
.
back
()
=
RigidBodyMotion
<
3
>
(
parameterSet
.
get
(
"dirichletValue"
,
rodRestEndPoint
[
1
]),
complex
.
rod
s_
[
"rod"
].
d
irichletValues_
.
back
()
=
RigidBodyMotion
<
3
>
(
parameterSet
.
get
(
"dirichletValue"
,
rodRestEndPoint
[
1
]),
Rotation
<
3
,
double
>
(
axis
,
M_PI
*
angle
/
180
));
BitSetVector
<
1
>
rodDNodes
(
complex
.
rod
D
irichletValues_
[
"rod"
]
.
size
(),
false
);
BitSetVector
<
1
>
rodDNodes
(
complex
.
rod
s_
[
"rod"
].
d
irichletValues_
.
size
(),
false
);
rodDNodes
.
back
()
=
true
;
complex
.
rod
D
irichletBoundar
ies_
[
"rod"
]
.
setup
(
*
complex
.
rod
Grid
s_
[
"rod"
],
rodDNodes
);
complex
.
rod
s_
[
"rod"
].
d
irichletBoundar
y_
.
setup
(
*
complex
.
rods_
[
"rod"
]
.
grid_
,
rodDNodes
);
// Backup initial rod iterate for later reference
RodSolutionType
initialIterateRod
=
rodX
;
...
...
@@ -208,7 +208,7 @@ int main (int argc, char *argv[]) try
BitSetVector
<
1
>
rodCouplingBitfield
(
rodX
.
size
(),
false
);
// Using that index 0 is always the left boundary for a uniformly refined OneDGrid
rodCouplingBitfield
[
0
]
=
true
;
complex
.
couplings_
[
interfaceName
].
rodInterfaceBoundary_
.
setup
(
*
complex
.
rod
Grid
s_
[
"rod"
],
rodCouplingBitfield
);
complex
.
couplings_
[
interfaceName
].
rodInterfaceBoundary_
.
setup
(
*
complex
.
rods_
[
"rod"
]
.
grid_
,
rodCouplingBitfield
);
// then for the continuum
LevelBoundaryPatch
<
GridType
>
coarseInterfaceBoundary
(
*
complex
.
continuumGrids_
[
"continuum"
],
0
);
...
...
@@ -250,7 +250,7 @@ int main (int argc, char *argv[]) try
// Dirichlet nodes for the rod problem
// ///////////////////////////////////////////
BitSetVector
<
6
>
rodDirichletNodes
(
complex
.
rod
Grid
s_
[
"rod"
]
->
size
(
1
));
BitSetVector
<
6
>
rodDirichletNodes
(
complex
.
rods_
[
"rod"
]
.
grid_
->
size
(
1
));
rodDirichletNodes
.
unsetAll
();
rodDirichletNodes
[
0
]
=
true
;
...
...
@@ -260,13 +260,13 @@ int main (int argc, char *argv[]) try
// Create a solver for the rod problem
// ///////////////////////////////////////////
RodLocalStiffness
<
RodGridType
::
LeafGridView
,
double
>
rodLocalStiffness
(
complex
.
rod
Grid
s_
[
"rod"
]
->
leafView
(),
RodLocalStiffness
<
RodGridType
::
LeafGridView
,
double
>
rodLocalStiffness
(
complex
.
rods_
[
"rod"
]
.
grid_
->
leafView
(),
rodA
,
rodJ1
,
rodJ2
,
rodE
,
rodNu
);
RodAssembler
<
RodGridType
::
LeafGridView
,
3
>
rodAssembler
(
complex
.
rod
Grid
s_
[
"rod"
]
->
leafView
(),
&
rodLocalStiffness
);
RodAssembler
<
RodGridType
::
LeafGridView
,
3
>
rodAssembler
(
complex
.
rods_
[
"rod"
]
.
grid_
->
leafView
(),
&
rodLocalStiffness
);
RiemannianTrustRegionSolver
<
RodGridType
,
RigidBodyMotion
<
3
>
>
rodSolver
;
rodSolver
.
setup
(
*
complex
.
rod
Grid
s_
[
"rod"
],
rodSolver
.
setup
(
*
complex
.
rods_
[
"rod"
]
.
grid_
,
&
rodAssembler
,
rodX
,
rodDirichletNodes
,
...
...
This diff is collapsed.
Click to expand it.
dune/gfe/coupling/rodcontinuumcomplex.hh
+
13
−
9
View file @
bd46c447
...
...
@@ -28,13 +28,23 @@ class RodContinuumComplex
LeafBoundaryPatch
<
ContinuumGrid
>
continuumInterfaceBoundary_
;
};
/** \brief Holds all data for a rod subproblem */
struct
RodData
{
Dune
::
shared_ptr
<
RodGrid
>
grid_
;
LeafBoundaryPatch
<
RodGrid
>
dirichletBoundary_
;
RodConfiguration
dirichletValues_
;
};
public
:
/** \brief Simple const access to rod grids */
const
Dune
::
shared_ptr
<
RodGrid
>
rodGrid
(
const
std
::
string
&
name
)
const
{
assert
(
rod
Grid
s_
.
find
(
name
)
!=
rod
Grid
s_
.
end
());
return
rod
Grid
s_
.
find
(
name
)
->
second
;
assert
(
rods_
.
find
(
name
)
!=
rods_
.
end
());
return
rods_
.
find
(
name
)
->
second
.
grid_
;
}
/** \brief Simple const access to continuum grids */
...
...
@@ -62,13 +72,7 @@ public:
/////////////////////////////////////////////////////////////////////
/** \brief The set of rods, accessible by name (string) */
std
::
map
<
std
::
string
,
Dune
::
shared_ptr
<
RodGrid
>
>
rodGrids_
;
/** \brief A Dirichlet boundary for each rod */
std
::
map
<
std
::
string
,
LeafBoundaryPatch
<
RodGrid
>
>
rodDirichletBoundaries_
;
/** \brief The Dirichlet values for each rod */
std
::
map
<
std
::
string
,
RodConfiguration
>
rodDirichletValues_
;
std
::
map
<
std
::
string
,
RodData
>
rods_
;
/////////////////////////////////////////////////////////////////////
// Data concerning the individual continuum problems
...
...
This diff is collapsed.
Click to expand it.
dune/gfe/coupling/rodcontinuumsteklovpoincarestep.hh
+
1
−
1
View file @
bd46c447
...
...
@@ -393,7 +393,7 @@ rodDirichletToNeumannMap(const RigidBodyMotion<3>& lambda) const
{
// Create an initial iterate by interpolating between lambda and the Dirichlet value
/** \todo Using that the coupling boundary is the one with the lower coordinate */
RigidBodyMotion
<
3
>
rodDirichletValue
=
complex_
.
rod
DirichletValue
s_
.
find
(
"rod"
)
->
second
.
back
();
RigidBodyMotion
<
3
>
rodDirichletValue
=
complex_
.
rods_
.
find
(
"rod"
)
->
second
.
dirichletValues_
.
back
();
// Set initial iterate
RodConfigurationType
&
rodX
=
rodSubdomainSolutions_
[
"rod"
];
...
...
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