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
e77275da
Commit
e77275da
authored
14 years ago
by
Oliver Sander
Committed by
sander@FU-BERLIN.DE
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
allow to have the coupling boundary on either side of the rod
[[Imported from SVN: r6908]]
parent
4c957737
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
dirneucoupling.cc
+26
-17
26 additions, 17 deletions
dirneucoupling.cc
with
26 additions
and
17 deletions
dirneucoupling.cc
+
26
−
17
View file @
e77275da
...
@@ -155,7 +155,7 @@ int main (int argc, char *argv[]) try
...
@@ -155,7 +155,7 @@ int main (int argc, char *argv[]) try
rodFactory
.
create
(
rodX
,
rodRestEndPoint
[
0
],
rodRestEndPoint
[
1
]);
rodFactory
.
create
(
rodX
,
rodRestEndPoint
[
0
],
rodRestEndPoint
[
1
]);
// /////////////////////////////////////////
// /////////////////////////////////////////
//
Rea
d Dirichlet values
//
Determine ro
d Dirichlet values
// /////////////////////////////////////////
// /////////////////////////////////////////
rodFactory
.
create
(
complex
.
rods_
[
"rod"
].
dirichletValues_
,
rodFactory
.
create
(
complex
.
rods_
[
"rod"
].
dirichletValues_
,
RigidBodyMotion
<
3
>
(
FieldVector
<
double
,
3
>
(
0
),
Rotation
<
3
,
double
>::
identity
()));
RigidBodyMotion
<
3
>
(
FieldVector
<
double
,
3
>
(
0
),
Rotation
<
3
,
double
>::
identity
()));
...
@@ -163,30 +163,32 @@ int main (int argc, char *argv[]) try
...
@@ -163,30 +163,32 @@ int main (int argc, char *argv[]) try
if
(
parameterSet
.
hasKey
(
"dirichletValue0"
)){
if
(
parameterSet
.
hasKey
(
"dirichletValue0"
)){
rodX
[
0
].
r
=
parameterSet
.
get
(
"dirichletValue0"
,
rodRestEndPoint
[
0
])
;
RigidBodyMotion
<
3
>
dirichletValue
;
dirichletValue
.
r
=
parameterSet
.
get
(
"dirichletValue0"
,
rodRestEndPoint
[
0
]);
FieldVector
<
double
,
3
>
axis
=
parameterSet
.
get
(
"dirichletAxis0"
,
FieldVector
<
double
,
3
>
(
0
));
FieldVector
<
double
,
3
>
axis
=
parameterSet
.
get
(
"dirichletAxis0"
,
FieldVector
<
double
,
3
>
(
0
));
double
angle
=
parameterSet
.
get
(
"dirichletAngle0"
,
double
(
0
));
double
angle
=
parameterSet
.
get
(
"dirichletAngle0"
,
double
(
0
));
dirichletValue
.
q
=
Rotation
<
3
,
double
>
(
axis
,
M_PI
*
angle
/
180
);
rodX
[
0
]
=
dirichletValue
;
rodX
[
0
].
q
=
Rotation
<
3
,
double
>
(
axis
,
M_PI
*
angle
/
180
);
complex
.
rods_
[
"rod"
].
dirichletValues_
[
0
]
=
dirichletValue
;
complex
.
rods_
[
"rod"
].
dirichletValues_
[
0
]
=
RigidBodyMotion
<
3
>
(
parameterSet
.
get
(
"dirichletValue0"
,
rodRestEndPoint
[
0
]),
Rotation
<
3
,
double
>
(
axis
,
M_PI
*
angle
/
180
));
rodDNodes
[
0
]
=
true
;
rodDNodes
[
0
]
=
true
;
}
}
if
(
parameterSet
.
hasKey
(
"dirichletValue1"
))
{
if
(
parameterSet
.
hasKey
(
"dirichletValue1"
))
{
rodX
.
back
().
r
=
parameterSet
.
get
(
"dirichletValue1"
,
rodRestEndPoint
[
1
])
;
RigidBodyMotion
<
3
>
dirichletValue
;
dirichletValue
.
r
=
parameterSet
.
get
(
"dirichletValue1"
,
rodRestEndPoint
[
1
]);
FieldVector
<
double
,
3
>
axis
=
parameterSet
.
get
(
"dirichletAxis1"
,
FieldVector
<
double
,
3
>
(
0
));
FieldVector
<
double
,
3
>
axis
=
parameterSet
.
get
(
"dirichletAxis1"
,
FieldVector
<
double
,
3
>
(
0
));
double
angle
=
parameterSet
.
get
(
"dirichletAngle1"
,
double
(
0
));
double
angle
=
parameterSet
.
get
(
"dirichletAngle1"
,
double
(
0
));
dirichletValue
.
q
=
Rotation
<
3
,
double
>
(
axis
,
M_PI
*
angle
/
180
);
rodX
.
back
().
q
=
Rotation
<
3
,
double
>
(
axis
,
M_PI
*
angle
/
180
);
rodX
.
back
()
=
dirichletValue
;
complex
.
rods_
[
"rod"
].
dirichletValues_
.
back
()
=
RigidBodyMotion
<
3
>
(
parameterSet
.
get
(
"dirichletValue1"
,
rodRestEndPoint
[
1
]),
complex
.
rods_
[
"rod"
].
dirichletValues_
.
back
()
=
dirichletValue
;
Rotation
<
3
,
double
>
(
axis
,
M_PI
*
angle
/
180
));
rodDNodes
.
back
()
=
true
;
rodDNodes
.
back
()
=
true
;
}
}
...
@@ -197,7 +199,7 @@ int main (int argc, char *argv[]) try
...
@@ -197,7 +199,7 @@ int main (int argc, char *argv[]) try
RodSolutionType
initialIterateRod
=
rodX
;
RodSolutionType
initialIterateRod
=
rodX
;
// /////////////////////////////////////////////////////
// /////////////////////////////////////////////////////
// Determine the Dirichlet nodes
// Determine the
continuum
Dirichlet nodes
// /////////////////////////////////////////////////////
// /////////////////////////////////////////////////////
VectorType
coarseDirichletValues
(
complex
.
continua_
[
"continuum"
].
grid_
->
size
(
0
,
dim
));
VectorType
coarseDirichletValues
(
complex
.
continua_
[
"continuum"
].
grid_
->
size
(
0
,
dim
));
AmiraMeshReader
<
int
>::
readFunction
(
coarseDirichletValues
,
path
+
dirichletValuesFile
);
AmiraMeshReader
<
int
>::
readFunction
(
coarseDirichletValues
,
path
+
dirichletValuesFile
);
...
@@ -228,8 +230,12 @@ int main (int argc, char *argv[]) try
...
@@ -228,8 +230,12 @@ int main (int argc, char *argv[]) try
// first for the rod
// first for the rod
BitSetVector
<
1
>
rodCouplingBitfield
(
rodX
.
size
(),
false
);
BitSetVector
<
1
>
rodCouplingBitfield
(
rodX
.
size
(),
false
);
// Using that index 0 is always the left boundary for a uniformly refined OneDGrid
/** \todo Using that index 0 is always the left boundary for a uniformly refined OneDGrid */
rodCouplingBitfield
[
0
]
=
true
;
if
(
parameterSet
.
hasKey
(
"dirichletValue1"
))
{
rodCouplingBitfield
[
0
]
=
true
;
}
else
rodCouplingBitfield
.
back
()
=
true
;
complex
.
couplings_
[
interfaceName
].
rodInterfaceBoundary_
.
setup
(
*
complex
.
rods_
[
"rod"
].
grid_
,
rodCouplingBitfield
);
complex
.
couplings_
[
interfaceName
].
rodInterfaceBoundary_
.
setup
(
*
complex
.
rods_
[
"rod"
].
grid_
,
rodCouplingBitfield
);
// then for the continuum
// then for the continuum
...
@@ -365,7 +371,10 @@ int main (int argc, char *argv[]) try
...
@@ -365,7 +371,10 @@ int main (int argc, char *argv[]) try
// Dirichlet-Neumann Solver
// Dirichlet-Neumann Solver
// /////////////////////////////////////////////////////
// /////////////////////////////////////////////////////
RigidBodyMotion
<
3
>
referenceInterface
=
rodX
[
0
];
RigidBodyMotion
<
3
>
referenceInterface
=
(
parameterSet
.
hasKey
(
"dirichletValue1"
))
?
rodX
[
0
]
:
rodX
.
back
();
complex
.
couplings_
[
interfaceName
].
referenceInterface_
=
referenceInterface
;
complex
.
couplings_
[
interfaceName
].
referenceInterface_
=
referenceInterface
;
// Init interface value
// Init interface value
...
...
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