ENH: GeometricField: support patch groups

This commit is contained in:
mattijs
2011-12-06 17:10:01 +00:00
parent 142142b172
commit 7ad19bfba7
14 changed files with 455 additions and 155 deletions

View File

@ -35,7 +35,7 @@ SourceFiles
#ifndef patchIdentifier_H
#define patchIdentifier_H
#include "word.H"
#include "wordList.H"
#include "label.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -68,6 +68,8 @@ class patchIdentifier
//- Optional physical type
mutable word physicalType_;
//- Optional groups patch belongs to
wordList inGroups_;
public:
@ -78,7 +80,8 @@ public:
(
const word& name,
const label index,
const word& physicalType = word::null
const word& physicalType = word::null,
const wordList& inGroups = wordList()
);
//- Construct from dictionary
@ -139,6 +142,19 @@ public:
return index_;
}
//- Return the optional groups patch belongs to
const wordList& inGroups() const
{
return inGroups_;
}
//- Return the optional groups patch belongs to for modification
wordList& inGroups()
{
return inGroups_;
}
//- Write patchIdentifier as a dictionary
void write(Ostream&) const;