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
a8215099
Commit
a8215099
authored
Jan 02, 2013
by
mattijs
Browse files
BUG: extendedStencils: skipping empty when collecting data into flat list
parent
43df9307
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C
View file @
a8215099
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2013
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -37,27 +37,31 @@ void Foam::extendedCellToFaceStencil::collectData
)
{
// 1. Construct cell data in compact addressing
List
<
Type
>
compac
tFld
(
map
.
constructSize
(),
pTraits
<
Type
>::
zero
);
List
<
Type
>
fla
tFld
(
map
.
constructSize
(),
pTraits
<
Type
>::
zero
);
// Insert my internal values
forAll
(
fld
,
cellI
)
{
compac
tFld
[
cellI
]
=
fld
[
cellI
];
fla
tFld
[
cellI
]
=
fld
[
cellI
];
}
// Insert my boundary values
label
nCompact
=
fld
.
size
();
forAll
(
fld
.
boundaryField
(),
patchI
)
{
const
fvPatchField
<
Type
>&
pfld
=
fld
.
boundaryField
()[
patchI
];
label
nCompact
=
pfld
.
patch
().
start
()
-
fld
.
mesh
().
nInternalFaces
()
+
fld
.
mesh
().
nCells
();
forAll
(
pfld
,
i
)
{
compac
tFld
[
nCompact
++
]
=
pfld
[
i
];
fla
tFld
[
nCompact
++
]
=
pfld
[
i
];
}
}
// Do all swapping
map
.
distribute
(
compac
tFld
);
map
.
distribute
(
fla
tFld
);
// 2. Pull to stencil
stencilFld
.
setSize
(
stencil
.
size
());
...
...
@@ -70,7 +74,7 @@ void Foam::extendedCellToFaceStencil::collectData
forAll
(
compactCells
,
i
)
{
stencilFld
[
faceI
][
i
]
=
compac
tFld
[
compactCells
[
i
]];
stencilFld
[
faceI
][
i
]
=
fla
tFld
[
compactCells
[
i
]];
}
}
}
...
...
src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C
View file @
a8215099
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2013
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -37,27 +37,28 @@ void Foam::extendedFaceToCellStencil::collectData
)
{
// 1. Construct face data in compact addressing
List
<
Type
>
compac
tFld
(
map
.
constructSize
(),
pTraits
<
Type
>::
zero
);
List
<
Type
>
fla
tFld
(
map
.
constructSize
(),
pTraits
<
Type
>::
zero
);
// Insert my internal values
forAll
(
fld
,
cellI
)
{
compac
tFld
[
cellI
]
=
fld
[
cellI
];
fla
tFld
[
cellI
]
=
fld
[
cellI
];
}
// Insert my boundary values
label
nCompact
=
fld
.
size
();
forAll
(
fld
.
boundaryField
(),
patchI
)
{
const
fvsPatchField
<
Type
>&
pfld
=
fld
.
boundaryField
()[
patchI
];
label
nCompact
=
pfld
.
patch
().
start
();
forAll
(
pfld
,
i
)
{
compac
tFld
[
nCompact
++
]
=
pfld
[
i
];
fla
tFld
[
nCompact
++
]
=
pfld
[
i
];
}
}
// Do all swapping
map
.
distribute
(
compac
tFld
);
map
.
distribute
(
fla
tFld
);
// 2. Pull to stencil
stencilFld
.
setSize
(
stencil
.
size
());
...
...
@@ -70,7 +71,7 @@ void Foam::extendedFaceToCellStencil::collectData
forAll
(
compactCells
,
i
)
{
stencilFld
[
faceI
][
i
]
=
compac
tFld
[
compactCells
[
i
]];
stencilFld
[
faceI
][
i
]
=
fla
tFld
[
compactCells
[
i
]];
}
}
}
...
...
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