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
3d4f637b
Commit
3d4f637b
authored
14 years ago
by
Oliver Sander
Committed by
sander@FU-BERLIN.DE
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
hand over the subdomain names to the linearized NtD maps
[[Imported from SVN: r6852]]
parent
b9f02f2b
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/coupling/rodcontinuumsteklovpoincarestep.hh
+29
-19
29 additions, 19 deletions
dune/gfe/coupling/rodcontinuumsteklovpoincarestep.hh
with
29 additions
and
19 deletions
dune/gfe/coupling/rodcontinuumsteklovpoincarestep.hh
+
29
−
19
View file @
3d4f637b
...
...
@@ -95,7 +95,8 @@ private:
* \return The Dirichlet value
*/
std
::
map
<
std
::
pair
<
std
::
string
,
std
::
string
>
,
RigidBodyMotion
<
3
>::
TangentVector
>
linearizedRodNeumannToDirichletMap
(
const
RodConfigurationType
&
currentIterate
,
linearizedRodNeumannToDirichletMap
(
const
std
::
string
&
rodName
,
const
RodConfigurationType
&
currentIterate
,
const
RigidBodyMotion
<
3
>::
TangentVector
&
forceTorque
,
const
Dune
::
FieldVector
<
double
,
3
>&
centerOfTorque
)
const
;
...
...
@@ -106,7 +107,8 @@ private:
* \return The infinitesimal movement of the interface
*/
std
::
map
<
std
::
pair
<
std
::
string
,
std
::
string
>
,
RigidBodyMotion
<
3
>::
TangentVector
>
linearizedContinuumNeumannToDirichletMap
(
const
VectorType
&
currentIterate
,
linearizedContinuumNeumannToDirichletMap
(
const
std
::
string
&
continuumName
,
const
VectorType
&
currentIterate
,
const
RigidBodyMotion
<
3
>::
TangentVector
&
forceTorque
,
const
Dune
::
FieldVector
<
double
,
3
>&
centerOfTorque
)
const
;
...
...
@@ -490,11 +492,12 @@ continuumDirichletToNeumannMap(const std::string& continuumName,
*/
template
<
class
RodGridType
,
class
ContinuumGridType
>
std
::
map
<
std
::
pair
<
std
::
string
,
std
::
string
>
,
RigidBodyMotion
<
3
>::
TangentVector
>
RodContinuumSteklovPoincareStep
<
RodGridType
,
ContinuumGridType
>::
linearizedRodNeumannToDirichletMap
(
const
RodConfigurationType
&
currentIterate
,
linearizedRodNeumannToDirichletMap
(
const
std
::
string
&
rodName
,
const
RodConfigurationType
&
currentIterate
,
const
RigidBodyMotion
<
3
>::
TangentVector
&
forceTorque
,
const
Dune
::
FieldVector
<
double
,
3
>&
centerOfTorque
)
const
{
std
::
pair
<
std
::
string
,
std
::
string
>
interfaceName
=
std
::
make_pair
(
"
rod
"
,
"continuum"
);
std
::
pair
<
std
::
string
,
std
::
string
>
interfaceName
=
std
::
make_pair
(
rod
Name
,
"continuum"
);
////////////////////////////////////////////////////
// Assemble the linearized rod problem
...
...
@@ -504,7 +507,7 @@ linearizedRodNeumannToDirichletMap(const RodConfigurationType& currentIterate,
typedef
Dune
::
BCRSMatrix
<
Dune
::
FieldMatrix
<
double
,
6
,
6
>
>
MatrixType
;
GeodesicFEAssembler
<
typename
RodGridType
::
LeafGridView
,
RigidBodyMotion
<
3
>
>
assembler
(
interface
.
gridView
(),
rod
(
"
rod
"
).
localStiffness_
);
rod
(
rod
Name
).
localStiffness_
);
MatrixType
stiffnessMatrix
;
assembler
.
assembleMatrix
(
currentIterate
,
stiffnessMatrix
,
...
...
@@ -567,11 +570,12 @@ linearizedRodNeumannToDirichletMap(const RodConfigurationType& currentIterate,
template
<
class
RodGridType
,
class
ContinuumGridType
>
std
::
map
<
std
::
pair
<
std
::
string
,
std
::
string
>
,
RigidBodyMotion
<
3
>::
TangentVector
>
RodContinuumSteklovPoincareStep
<
RodGridType
,
ContinuumGridType
>::
linearizedContinuumNeumannToDirichletMap
(
const
VectorType
&
currentIterate
,
linearizedContinuumNeumannToDirichletMap
(
const
std
::
string
&
continuumName
,
const
VectorType
&
currentIterate
,
const
RigidBodyMotion
<
3
>::
TangentVector
&
forceTorque
,
const
Dune
::
FieldVector
<
double
,
3
>&
centerOfTorque
)
const
{
std
::
pair
<
std
::
string
,
std
::
string
>
interfaceName
=
std
::
make_pair
(
"rod"
,
"
continuum
"
);
std
::
pair
<
std
::
string
,
std
::
string
>
interfaceName
=
std
::
make_pair
(
"rod"
,
continuum
Name
);
////////////////////////////////////////////////////
// Assemble the linearized problem
...
...
@@ -586,7 +590,7 @@ linearizedContinuumNeumannToDirichletMap(const VectorType& currentIterate,
OperatorAssembler
<
P1Basis
,
P1Basis
>
assembler
(
basis
,
basis
);
MatrixType
stiffnessMatrix
;
assembler
.
assemble
(
*
continuum
(
"
continuum
"
).
localAssembler_
,
stiffnessMatrix
);
assembler
.
assemble
(
*
continuum
(
continuum
Name
).
localAssembler_
,
stiffnessMatrix
);
/////////////////////////////////////////////////////////////////////
...
...
@@ -603,7 +607,7 @@ linearizedContinuumNeumannToDirichletMap(const VectorType& currentIterate,
// The weak form of the volume and Neumann data
/** \brief Not implemented yet! */
VectorType
rhs
(
complex_
.
continuumGrid
(
"
continuum
"
)
->
size
(
dim
));
VectorType
rhs
(
complex_
.
continuumGrid
(
continuum
Name
)
->
size
(
dim
));
rhs
=
0
;
BoundaryFunctionalAssembler
<
P1Basis
>
boundaryFunctionalAssembler
(
basis
,
interface
);
...
...
@@ -612,16 +616,16 @@ linearizedContinuumNeumannToDirichletMap(const VectorType& currentIterate,
boundaryFunctionalAssembler
.
assemble
(
localNeumannAssembler
,
rhs
,
false
);
// Solve the Neumann problem for the continuum
VectorType
x
=
complex_
.
continuum
(
"
continuum
"
).
dirichletValues_
;
assert
(
(
dynamic_cast
<
LinearIterationStep
<
MatrixType
,
VectorType
>*
>
(
continuum
(
"
continuum
"
).
solver_
->
iterationStep_
))
);
dynamic_cast
<
LinearIterationStep
<
MatrixType
,
VectorType
>*
>
(
continuum
(
"
continuum
"
).
solver_
->
iterationStep_
)
->
setProblem
(
stiffnessMatrix
,
x
,
rhs
);
VectorType
x
=
complex_
.
continuum
(
continuum
Name
).
dirichletValues_
;
assert
(
(
dynamic_cast
<
LinearIterationStep
<
MatrixType
,
VectorType
>*
>
(
continuum
(
continuum
Name
).
solver_
->
iterationStep_
))
);
dynamic_cast
<
LinearIterationStep
<
MatrixType
,
VectorType
>*
>
(
continuum
(
continuum
Name
).
solver_
->
iterationStep_
)
->
setProblem
(
stiffnessMatrix
,
x
,
rhs
);
//solver.preprocess();
continuum
(
"
continuum
"
).
solver_
->
iterationStep_
->
preprocess
();
continuum
(
continuum
Name
).
solver_
->
iterationStep_
->
preprocess
();
continuum
(
"
continuum
"
).
solver_
->
solve
();
continuum
(
continuum
Name
).
solver_
->
solve
();
x
=
continuum
(
"
continuum
"
).
solver_
->
iterationStep_
->
getSol
();
x
=
continuum
(
continuum
Name
).
solver_
->
iterationStep_
->
getSol
();
// Average the continuum displacement on the coupling boundary
RigidBodyMotion
<
3
>
averageInterface
;
...
...
@@ -731,7 +735,8 @@ iterate(std::map<std::pair<std::string,std::string>, RigidBodyMotion<3> >& lambd
// of the continuum.
////////////////////////////////////////////////////////////////////
interfaceCorrection
=
linearizedContinuumNeumannToDirichletMap
(
continuumSubdomainSolutions_
[
"continuum"
],
interfaceCorrection
=
linearizedContinuumNeumannToDirichletMap
(
"continuum"
,
continuumSubdomainSolutions_
[
"continuum"
],
residualForceTorque
[
interfaceName
],
lambda
[
interfaceName
].
r
);
...
...
@@ -742,7 +747,8 @@ iterate(std::map<std::pair<std::string,std::string>, RigidBodyMotion<3> >& lambd
// of the rod.
////////////////////////////////////////////////////////////////////
interfaceCorrection
=
linearizedRodNeumannToDirichletMap
(
rodSubdomainSolutions_
[
"rod"
],
interfaceCorrection
=
linearizedRodNeumannToDirichletMap
(
"rod"
,
rodSubdomainSolutions_
[
"rod"
],
residualForceTorque
[
interfaceName
],
lambda
[
interfaceName
].
r
);
...
...
@@ -755,10 +761,14 @@ iterate(std::map<std::pair<std::string,std::string>, RigidBodyMotion<3> >& lambd
// Neumann-to-Dirichlet map of the rod.
////////////////////////////////////////////////////////////////////
std
::
map
<
std
::
pair
<
std
::
string
,
std
::
string
>
,
RigidBodyMotion
<
3
>::
TangentVector
>
continuumCorrection
=
linearizedContinuumNeumannToDirichletMap
(
continuumSubdomainSolutions_
[
"continuum"
],
std
::
map
<
std
::
pair
<
std
::
string
,
std
::
string
>
,
RigidBodyMotion
<
3
>::
TangentVector
>
continuumCorrection
=
linearizedContinuumNeumannToDirichletMap
(
"continuum"
,
continuumSubdomainSolutions_
[
"continuum"
],
residualForceTorque
[
interfaceName
],
lambda
[
interfaceName
].
r
);
std
::
map
<
std
::
pair
<
std
::
string
,
std
::
string
>
,
RigidBodyMotion
<
3
>::
TangentVector
>
rodCorrection
=
linearizedRodNeumannToDirichletMap
(
rodSubdomainSolutions_
[
"rod"
],
std
::
map
<
std
::
pair
<
std
::
string
,
std
::
string
>
,
RigidBodyMotion
<
3
>::
TangentVector
>
rodCorrection
=
linearizedRodNeumannToDirichletMap
(
"rod"
,
rodSubdomainSolutions_
[
"rod"
],
residualForceTorque
[
interfaceName
],
lambda
[
interfaceName
].
r
);
...
...
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