mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: retain compound type on List output (continuation of 68de05285a)
- can help in circumstances when an zero-sized entry is written on some processors, but the compound-type may be useful for determining a particular code path when re-reading the files. Ensures that the information is consistent on all processors. STYLE: adjust separation of includes between List.H and UList.H
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -36,7 +36,7 @@ License
|
||||
template<class T, unsigned N>
|
||||
void Foam::FixedList<T, N>::writeEntry(Ostream& os) const
|
||||
{
|
||||
const word tag = "List<" + word(pTraits<T>::typeName) + '>';
|
||||
const word tag("List<" + word(pTraits<T>::typeName) + '>');
|
||||
if (token::compound::isCompound(tag))
|
||||
{
|
||||
os << tag << token::SPACE;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -45,11 +45,8 @@ SourceFiles
|
||||
|
||||
#include "UList.H"
|
||||
#include "autoPtr.H"
|
||||
#include "one.H"
|
||||
#include "SLListFwd.H"
|
||||
|
||||
#include <initializer_list>
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
|
||||
@ -49,6 +49,7 @@ SourceFiles
|
||||
#include "label.H"
|
||||
#include "uLabel.H"
|
||||
#include "zero.H"
|
||||
#include "one.H"
|
||||
#include "contiguous.H"
|
||||
#include "nullObject.H"
|
||||
#include "stdFoam.H"
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -37,13 +37,14 @@ License
|
||||
template<class T>
|
||||
void Foam::UList<T>::writeEntry(Ostream& os) const
|
||||
{
|
||||
const word tag("List<" + word(pTraits<T>::typeName) + '>');
|
||||
if (token::compound::isCompound(tag))
|
||||
{
|
||||
os << tag << token::SPACE;
|
||||
}
|
||||
|
||||
if (size())
|
||||
{
|
||||
const word tag = "List<" + word(pTraits<T>::typeName) + '>';
|
||||
if (token::compound::isCompound(tag))
|
||||
{
|
||||
os << tag << token::SPACE;
|
||||
}
|
||||
os << *this;
|
||||
}
|
||||
else if (os.format() == IOstream::ASCII)
|
||||
|
||||
Reference in New Issue
Block a user