decomposePar, reconstructPar: Do all regions simultaneously
DecomposePar and reconstructPar now interleave the processing of multiple regions. This means that with the -allRegions option, the earlier times are completed in their entirety before later times are considered. It also lets regions to access each other during decomposition and reconstruction, which will be important for non-conformal region interfaces. To aid interpretation of the log, region prefixing is now used by both utilities in the same way as is done by foamMultiRun. DecomposePar has been overhauled so that it matches reconstructPar much more closely, both in terms of output and of iteration sequence. All meshes and addressing are loaded simultaneously and each field is considered in turn. Previously, all the fields were loaded, and each process and addressing set was considered in turn. This new strategy optimises memory usage for cases with lots of fields.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -66,8 +66,7 @@ Foam::fvFieldReconstructor::fvFieldReconstructor
|
||||
procMeshes_(procMeshes),
|
||||
faceProcAddressing_(faceProcAddressing),
|
||||
cellProcAddressing_(cellProcAddressing),
|
||||
faceProcAddressingBf_(faceProcAddressingBf),
|
||||
nReconstructed_(0)
|
||||
faceProcAddressingBf_(faceProcAddressingBf)
|
||||
{
|
||||
forAll(procMeshes_, proci)
|
||||
{
|
||||
@ -93,4 +92,26 @@ Foam::fvFieldReconstructor::fvFieldReconstructor
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::fvFieldReconstructor::reconstructs
|
||||
(
|
||||
const IOobjectList& objects,
|
||||
const HashSet<word>& selectedFields
|
||||
)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
#define DO_FV_FIELDS_TYPE(Type, nullArg) \
|
||||
result = result \
|
||||
|| reconstructs<VolField<Type>::Internal>(objects, selectedFields) \
|
||||
|| reconstructs<VolField<Type>>(objects, selectedFields) \
|
||||
|| reconstructs<SurfaceField<Type>>(objects, selectedFields);
|
||||
FOR_ALL_FIELD_TYPES(DO_FV_FIELDS_TYPE)
|
||||
#undef DO_FV_FIELDS_TYPE
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user