mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: have field selection work for pointFields instead of just volFields.
This commit is contained in:
@ -138,7 +138,11 @@ public:
|
||||
|
||||
//- Reconstruct and write all fields
|
||||
template<class Type>
|
||||
void reconstructFields(const IOobjectList& objects);
|
||||
void reconstructFields
|
||||
(
|
||||
const IOobjectList& objects,
|
||||
const HashSet<word>& selectedFields
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -143,7 +143,8 @@ Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
|
||||
template<class Type>
|
||||
void Foam::pointFieldReconstructor::reconstructFields
|
||||
(
|
||||
const IOobjectList& objects
|
||||
const IOobjectList& objects,
|
||||
const HashSet<word>& selectedFields
|
||||
)
|
||||
{
|
||||
word fieldClassName
|
||||
@ -157,16 +158,18 @@ void Foam::pointFieldReconstructor::reconstructFields
|
||||
{
|
||||
Info<< " Reconstructing " << fieldClassName << "s\n" << endl;
|
||||
|
||||
for
|
||||
(
|
||||
IOobjectList::iterator fieldIter = fields.begin();
|
||||
fieldIter != fields.end();
|
||||
++fieldIter
|
||||
)
|
||||
forAllConstIter(IOobjectList, fields, fieldIter)
|
||||
{
|
||||
Info<< " " << fieldIter()->name() << endl;
|
||||
if
|
||||
(
|
||||
!selectedFields.size()
|
||||
|| selectedFields.found(fieldIter()->name())
|
||||
)
|
||||
{
|
||||
Info<< " " << fieldIter()->name() << endl;
|
||||
|
||||
reconstructField<Type>(*fieldIter())().write();
|
||||
reconstructField<Type>(*fieldIter())().write();
|
||||
}
|
||||
}
|
||||
|
||||
Info<< endl;
|
||||
|
||||
Reference in New Issue
Block a user