Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
e5e100ab
Commit
e5e100ab
authored
Apr 11, 2013
by
mattijs
Browse files
ENH: motionSmoother: split off patch consistency
parent
2514121d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/dynamicMesh/motionSmoother/motionSmoother.C
View file @
e5e100ab
...
...
@@ -678,34 +678,8 @@ void Foam::motionSmoother::correct()
}
void
Foam
::
motionSmoother
::
setDisplacement
(
pointField
&
patchDisp
)
void
Foam
::
motionSmoother
::
setDisplacement
PatchFields
(
)
{
// See comment in .H file about shared points.
const
polyBoundaryMesh
&
patches
=
mesh_
.
boundaryMesh
();
forAll
(
patches
,
patchI
)
{
const
polyPatch
&
pp
=
patches
[
patchI
];
if
(
pp
.
coupled
())
{
const
labelList
&
meshPoints
=
pp
.
meshPoints
();
forAll
(
meshPoints
,
i
)
{
displacement_
[
meshPoints
[
i
]]
=
vector
::
zero
;
}
}
}
const
labelList
&
ppMeshPoints
=
pp_
.
meshPoints
();
// Set internal point data from displacement on combined patch points.
forAll
(
ppMeshPoints
,
patchPointI
)
{
displacement_
[
ppMeshPoints
[
patchPointI
]]
=
patchDisp
[
patchPointI
];
}
// Adapt the fixedValue bc's (i.e. copy internal point data to
// boundaryField for all affected patches)
forAll
(
adaptPatchIDs_
,
i
)
...
...
@@ -765,6 +739,42 @@ void Foam::motionSmoother::setDisplacement(pointField& patchDisp)
displacement_
.
boundaryField
()[
patchI
]
==
displacement_
.
boundaryField
()[
patchI
].
patchInternalField
();
}
}
void
Foam
::
motionSmoother
::
setDisplacement
(
pointField
&
patchDisp
)
{
// See comment in .H file about shared points.
const
polyBoundaryMesh
&
patches
=
mesh_
.
boundaryMesh
();
forAll
(
patches
,
patchI
)
{
const
polyPatch
&
pp
=
patches
[
patchI
];
if
(
pp
.
coupled
())
{
const
labelList
&
meshPoints
=
pp
.
meshPoints
();
forAll
(
meshPoints
,
i
)
{
displacement_
[
meshPoints
[
i
]]
=
vector
::
zero
;
}
}
}
const
labelList
&
ppMeshPoints
=
pp_
.
meshPoints
();
// Set internal point data from displacement on combined patch points.
forAll
(
ppMeshPoints
,
patchPointI
)
{
displacement_
[
ppMeshPoints
[
patchPointI
]]
=
patchDisp
[
patchPointI
];
}
// Adapt the fixedValue bc's (i.e. copy internal point data to
// boundaryField for all affected patches)
setDisplacementPatchFields
();
if
(
debug
)
{
...
...
src/dynamicMesh/motionSmoother/motionSmoother.H
View file @
e5e100ab
...
...
@@ -385,6 +385,10 @@ public:
//- Take over existing mesh position.
void
correct
();
//- Set patch fields on displacement to be consistent with
// internal values.
void
setDisplacementPatchFields
();
//- Set displacement field from displacement on patch points.
// Modify provided displacement to be consistent with actual
// boundary conditions on displacement. Note: resets the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment