mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: prefer PtrList set/get/test instead of PtrList::operator() access
- clearer coding intent. Mark operator() as 'deprecated' - add bounds checking to get(label) and set(label) methods. This gives failsafe behaviour for get() that is symmetric with HashPtrTable, autoPtr etc and aligns the set(label) methods for UPtrList, PtrList and PtrDynList. - use top-level PtrList::clone() instead of cloning individual elements ENH: support HashPtrTable set with refPtr/tmp (flexibility)
This commit is contained in:
@ -121,7 +121,7 @@ Foam::faFieldReconstructor::reconstructField
|
||||
{
|
||||
// Regular patch. Fast looping
|
||||
|
||||
if (!patchFields(curBPatch))
|
||||
if (!patchFields.set(curBPatch))
|
||||
{
|
||||
patchFields.set
|
||||
(
|
||||
@ -195,7 +195,7 @@ Foam::faFieldReconstructor::reconstructField
|
||||
}
|
||||
}
|
||||
|
||||
if (!patchFields(curBPatch))
|
||||
if (!patchFields.set(curBPatch))
|
||||
{
|
||||
patchFields.set
|
||||
(
|
||||
@ -230,7 +230,7 @@ Foam::faFieldReconstructor::reconstructField
|
||||
if
|
||||
(
|
||||
isA<emptyFaPatch>(mesh_.boundary()[patchI])
|
||||
&& !patchFields(patchI)
|
||||
&& !patchFields.set(patchI)
|
||||
)
|
||||
{
|
||||
patchFields.set
|
||||
@ -362,7 +362,7 @@ Foam::faFieldReconstructor::reconstructField
|
||||
{
|
||||
// Regular patch. Fast looping
|
||||
|
||||
if (!patchFields(curBPatch))
|
||||
if (!patchFields.set(curBPatch))
|
||||
{
|
||||
patchFields.set
|
||||
(
|
||||
@ -439,7 +439,7 @@ Foam::faFieldReconstructor::reconstructField
|
||||
}
|
||||
}
|
||||
|
||||
if (!patchFields(curBPatch))
|
||||
if (!patchFields.set(curBPatch))
|
||||
{
|
||||
patchFields.set
|
||||
(
|
||||
@ -481,7 +481,7 @@ Foam::faFieldReconstructor::reconstructField
|
||||
if
|
||||
(
|
||||
isA<emptyFaPatch>(mesh_.boundary()[patchI])
|
||||
&& !patchFields(patchI)
|
||||
&& !patchFields.set(patchI)
|
||||
)
|
||||
{
|
||||
patchFields.set
|
||||
|
||||
@ -116,7 +116,7 @@ Foam::fvFieldReconstructor::reconstructField
|
||||
{
|
||||
// Regular patch. Fast looping
|
||||
|
||||
if (!patchFields(curBPatch))
|
||||
if (!patchFields.set(curBPatch))
|
||||
{
|
||||
patchFields.set
|
||||
(
|
||||
@ -184,7 +184,7 @@ Foam::fvFieldReconstructor::reconstructField
|
||||
{
|
||||
label curBPatch = mesh_.boundaryMesh().whichPatch(curF);
|
||||
|
||||
if (!patchFields(curBPatch))
|
||||
if (!patchFields.set(curBPatch))
|
||||
{
|
||||
patchFields.set
|
||||
(
|
||||
@ -217,7 +217,7 @@ Foam::fvFieldReconstructor::reconstructField
|
||||
if
|
||||
(
|
||||
isType<emptyFvPatch>(mesh_.boundary()[patchi])
|
||||
&& !patchFields(patchi)
|
||||
&& !patchFields.set(patchi)
|
||||
)
|
||||
{
|
||||
patchFields.set
|
||||
@ -314,7 +314,7 @@ Foam::fvFieldReconstructor::reconstructField
|
||||
{
|
||||
// Regular patch. Fast looping
|
||||
|
||||
if (!patchFields(curBPatch))
|
||||
if (!patchFields.set(curBPatch))
|
||||
{
|
||||
patchFields.set
|
||||
(
|
||||
@ -370,7 +370,7 @@ Foam::fvFieldReconstructor::reconstructField
|
||||
label curBPatch =
|
||||
mesh_.boundaryMesh().whichPatch(curF);
|
||||
|
||||
if (!patchFields(curBPatch))
|
||||
if (!patchFields.set(curBPatch))
|
||||
{
|
||||
patchFields.set
|
||||
(
|
||||
@ -410,7 +410,7 @@ Foam::fvFieldReconstructor::reconstructField
|
||||
if
|
||||
(
|
||||
isType<emptyFvPatch>(mesh_.boundary()[patchi])
|
||||
&& !patchFields(patchi)
|
||||
&& !patchFields.set(patchi)
|
||||
)
|
||||
{
|
||||
patchFields.set
|
||||
|
||||
@ -70,9 +70,10 @@ Foam::pointFieldReconstructor::reconstructField
|
||||
// check if the boundary patch is not a processor patch
|
||||
if (curBPatch >= 0)
|
||||
{
|
||||
if (!patchFields(curBPatch))
|
||||
if (!patchFields.set(curBPatch))
|
||||
{
|
||||
patchFields.set(
|
||||
patchFields.set
|
||||
(
|
||||
curBPatch,
|
||||
pointPatchField<Type>::New
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user