Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor 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
Development
openfoam
Commits
481f8e5b
Commit
481f8e5b
authored
8 years ago
by
Henry Weller
Browse files
Options
Downloads
Patches
Plain Diff
linearUpwind: Simplified the vector specialization
parent
bd0b3632
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
src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.C
+12
-32
12 additions, 32 deletions
.../surfaceInterpolation/schemes/linearUpwind/linearUpwind.C
with
12 additions
and
32 deletions
src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.C
+
12
−
32
View file @
481f8e5b
...
...
@@ -99,11 +99,8 @@ Foam::linearUpwind<Type>::correction
if
(
pSfCorr
.
coupled
())
{
const
labelUList
&
pOwner
=
mesh
.
boundary
()[
patchi
].
faceCells
();
const
labelUList
&
pOwner
=
mesh
.
boundary
()[
patchi
].
faceCells
();
const
vectorField
&
pCf
=
Cf
.
boundaryField
()[
patchi
];
const
scalarField
&
pFaceFlux
=
faceFlux
.
boundaryField
()[
patchi
];
const
vectorField
pGradVfNei
...
...
@@ -151,9 +148,9 @@ Foam::linearUpwind<Foam::vector>::correction
{
const
fvMesh
&
mesh
=
this
->
mesh
();
tmp
<
GeometricField
<
vector
,
fvsPatchField
,
surfaceMesh
>
>
tsfCorr
tmp
<
surfaceVectorField
>
tsfCorr
(
new
GeometricField
<
vector
,
fvsPatchField
,
surfaceMesh
>
new
surfaceVectorField
(
IOobject
(
...
...
@@ -169,7 +166,7 @@ Foam::linearUpwind<Foam::vector>::correction
)
);
GeometricField
<
vector
,
fvsPatchField
,
surfaceMesh
>
&
sfCorr
=
tsfCorr
.
ref
();
surfaceVectorField
&
sfCorr
=
tsfCorr
.
ref
();
const
surfaceScalarField
&
faceFlux
=
this
->
faceFlux_
;
...
...
@@ -188,47 +185,30 @@ Foam::linearUpwind<Foam::vector>::correction
)
);
tmp
<
GeometricField
<
typename
outerProduct
<
vector
,
vector
>::
type
,
fvPatchField
,
volMesh
>
>
tgradVf
=
gradScheme_
().
grad
(
vf
,
gradSchemeName_
);
const
GeometricField
<
typename
outerProduct
<
vector
,
vector
>::
type
,
fvPatchField
,
volMesh
>&
gradVf
=
tgradVf
();
tmp
<
volTensorField
>
tgradVf
=
gradScheme_
().
grad
(
vf
,
gradSchemeName_
);
const
volTensorField
&
gradVf
=
tgradVf
();
forAll
(
faceFlux
,
facei
)
{
label
celli
=
(
faceFlux
[
facei
]
>
0
)
?
owner
[
facei
]
:
neighbour
[
facei
];
const
label
celli
=
(
faceFlux
[
facei
]
>
0
)
?
owner
[
facei
]
:
neighbour
[
facei
];
sfCorr
[
facei
]
=
(
Cf
[
facei
]
-
C
[
celli
])
&
gradVf
[
celli
];
}
typename
GeometricField
<
vector
,
fvsPatchField
,
surfaceMesh
>::
Boundary
&
bSfCorr
=
sfCorr
.
boundaryFieldRef
();
typename
surfaceVectorField
::
Boundary
&
bSfCorr
=
sfCorr
.
boundaryFieldRef
();
forAll
(
bSfCorr
,
patchi
)
{
fvsPatch
Field
<
vector
>
&
pSfCorr
=
bSfCorr
[
patchi
];
fvsPatch
VectorField
&
pSfCorr
=
bSfCorr
[
patchi
];
if
(
pSfCorr
.
coupled
())
{
const
labelUList
&
pOwner
=
mesh
.
boundary
()[
patchi
].
faceCells
();
const
labelUList
&
pOwner
=
mesh
.
boundary
()[
patchi
].
faceCells
();
const
vectorField
&
pCf
=
Cf
.
boundaryField
()[
patchi
];
const
scalarField
&
pFaceFlux
=
faceFlux
.
boundaryField
()[
patchi
];
const
Field
<
typename
outerProduct
<
vector
,
vector
>::
type
>
pGradVfNei
const
tensorField
pGradVfNei
(
gradVf
.
boundaryField
()[
patchi
].
patchNeighbourField
()
);
...
...
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