lagrangian: Corrected reading of constant/clouds in parallel
This commit is contained in:
@ -242,6 +242,7 @@ $(IOdictionary)/unwatchedIOdictionary.C
|
||||
|
||||
db/IOobjects/IOMap/IOMapName.C
|
||||
db/IOobjects/decomposedBlockData/decomposedBlockData.C
|
||||
db/IOobjects/GlobalIOList/GlobalIOLists.C
|
||||
db/IOobjects/GlobalIOField/GlobalIOFields.C
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,42 +23,22 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "GlobalIOField.H"
|
||||
#include "GlobalIOFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTemplateTypeNameAndDebugWithName
|
||||
defineTemplateTypeNameWithName(labelGlobalIOField, "labelField");
|
||||
defineTemplateTypeNameWithName(scalarGlobalIOField, "scalarField");
|
||||
defineTemplateTypeNameWithName(vectorGlobalIOField, "vectorField");
|
||||
defineTemplateTypeNameWithName
|
||||
(
|
||||
GlobalIOField<scalar>,
|
||||
"scalarField",
|
||||
0
|
||||
);
|
||||
defineTemplateTypeNameAndDebugWithName
|
||||
(
|
||||
GlobalIOField<vector>,
|
||||
"vectorField",
|
||||
0
|
||||
);
|
||||
defineTemplateTypeNameAndDebugWithName
|
||||
(
|
||||
GlobalIOField<sphericalTensor>,
|
||||
"sphericalTensorField",
|
||||
0
|
||||
);
|
||||
defineTemplateTypeNameAndDebugWithName
|
||||
(
|
||||
GlobalIOField<symmTensor>,
|
||||
"symmTensorField",
|
||||
0
|
||||
);
|
||||
defineTemplateTypeNameAndDebugWithName
|
||||
(
|
||||
GlobalIOField<tensor>,
|
||||
"tensorField",
|
||||
0
|
||||
sphericalTensorGlobalIOField,
|
||||
"sphericalTensorField"
|
||||
);
|
||||
defineTemplateTypeNameWithName(symmTensorGlobalIOField, "symmTensorField");
|
||||
defineTemplateTypeNameWithName(tensorGlobalIOField, "tensorField");
|
||||
}
|
||||
|
||||
|
||||
|
||||
74
src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOFields.H
Normal file
74
src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOFields.H
Normal file
@ -0,0 +1,74 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "primitiveFields.H"
|
||||
#include "GlobalIOField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
typedef GlobalIOField<label> labelGlobalIOField;
|
||||
typedef GlobalIOField<scalar> scalarGlobalIOField;
|
||||
typedef GlobalIOField<vector> vectorGlobalIOField;
|
||||
typedef GlobalIOField<sphericalTensor> sphericalTensorGlobalIOField;
|
||||
typedef GlobalIOField<symmTensor> symmTensorGlobalIOField;
|
||||
typedef GlobalIOField<tensor> tensorGlobalIOField;
|
||||
|
||||
//- Template function for obtaining global status
|
||||
template<>
|
||||
inline bool typeGlobal<labelGlobalIOField>()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
template<>
|
||||
inline bool typeGlobal<scalarGlobalIOField>()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
template<>
|
||||
inline bool typeGlobal<vectorGlobalIOField>()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
template<>
|
||||
inline bool typeGlobal<sphericalTensorGlobalIOField>()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
template<>
|
||||
inline bool typeGlobal<symmTensorGlobalIOField>()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
template<>
|
||||
inline bool typeGlobal<tensorGlobalIOField>()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,7 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "globalIOLists.H"
|
||||
#include "GlobalIOLists.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -39,6 +39,7 @@ namespace Foam
|
||||
);
|
||||
defineTemplateTypeNameWithName(symmTensorGlobalIOList, "symmTensorList");
|
||||
defineTemplateTypeNameWithName(tensorGlobalIOList, "tensorList");
|
||||
defineTemplateTypeNameWithName(wordGlobalIOList, "wordList");
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,16 +22,16 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Typedef
|
||||
Foam::globalIOLists
|
||||
Foam::GlobalIOLists
|
||||
|
||||
Description
|
||||
Typedefs for globalIOLists of primitive types. These are fully compatible
|
||||
Typedefs for GlobalIOLists of primitive types. These are fully compatible
|
||||
with 'normal' IOLists except have global filePath() scope.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef globalIOLists_H
|
||||
#define globalIOLists_H
|
||||
#ifndef GlobalIOLists_H
|
||||
#define GlobalIOLists_H
|
||||
|
||||
#include "primitiveFields.H"
|
||||
#include "GlobalIOList.H"
|
||||
@ -46,6 +46,7 @@ namespace Foam
|
||||
typedef GlobalIOList<sphericalTensor> sphericalTensorGlobalIOList;
|
||||
typedef GlobalIOList<symmTensor> symmTensorGlobalIOList;
|
||||
typedef GlobalIOList<tensor> tensorGlobalIOList;
|
||||
typedef GlobalIOList<word> wordGlobalIOList;
|
||||
|
||||
//- Template function for obtaining global status
|
||||
template<>
|
||||
@ -78,7 +79,11 @@ namespace Foam
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
template<>
|
||||
inline bool typeGlobal<wordGlobalIOList>()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -25,6 +25,7 @@ License
|
||||
|
||||
#include "parcelCloudList.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
#include "GlobalIOLists.H"
|
||||
#include "fvMatrices.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -49,9 +50,9 @@ void Foam::parcelCloudList::initialise
|
||||
IOobject::NO_WRITE
|
||||
);
|
||||
|
||||
if (cloudsIO.typeHeaderOk<IOList<word>>(false))
|
||||
if (cloudsIO.typeHeaderOk<wordGlobalIOList>(false))
|
||||
{
|
||||
IOList<word> cloudNames(cloudsIO);
|
||||
wordGlobalIOList cloudNames(cloudsIO);
|
||||
|
||||
this->setSize(cloudNames.size());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user