Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
8dadd181
Commit
8dadd181
authored
Jan 11, 2018
by
Andrew Heather
Browse files
ENH: surfaceInterpolation - improved robustness when dealing with empty patches
parent
27888bf7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C
View file @
8dadd181
...
...
@@ -310,10 +310,23 @@ void Foam::surfaceInterpolation::makeNonOrthDeltaCoeffs() const
forAll
(
nonOrthDeltaCoeffsBf
,
patchi
)
{
vectorField
delta
(
mesh_
.
boundary
()[
patchi
].
delta
())
;
fvsPatchScalarField
&
patchDeltaCoeffs
=
nonOrthDeltaCoeffsBf
[
patchi
]
;
nonOrthDeltaCoeffsBf
[
patchi
]
=
1
.
0
/
max
(
mesh_
.
boundary
()[
patchi
].
nf
()
&
delta
,
0
.
05
*
mag
(
delta
));
const
fvPatch
&
p
=
patchDeltaCoeffs
.
patch
();
const
vectorField
patchDeltas
(
mesh_
.
boundary
()[
patchi
].
delta
());
forAll
(
p
,
patchFacei
)
{
vector
unitArea
=
Sf
.
boundaryField
()[
patchi
][
patchFacei
]
/
magSf
.
boundaryField
()[
patchi
][
patchFacei
];
const
vector
&
delta
=
patchDeltas
[
patchFacei
];
patchDeltaCoeffs
[
patchFacei
]
=
1
.
0
/
max
(
unitArea
&
delta
,
0
.
05
*
mag
(
delta
));
}
}
}
...
...
@@ -364,8 +377,7 @@ void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors() const
// and calculated consistently with internal corrections for
// coupled patches
surfaceVectorField
::
Boundary
&
corrVecsBf
=
corrVecs
.
boundaryFieldRef
();
surfaceVectorField
::
Boundary
&
corrVecsBf
=
corrVecs
.
boundaryFieldRef
();
forAll
(
corrVecsBf
,
patchi
)
{
...
...
@@ -377,8 +389,8 @@ void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors() const
}
else
{
const
fvsPatchScalarField
&
patchNonOrthDeltaCoeffs
=
NonOrthDeltaCoeffs
.
boundaryField
()[
patchi
];
const
fvsPatchScalarField
&
patchNonOrthDeltaCoeffs
=
NonOrthDeltaCoeffs
.
boundaryField
()[
patchi
];
const
fvPatch
&
p
=
patchCorrVecs
.
patch
();
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment