wallDist: moved patchTypes into patchDistMethod

This commit is contained in:
Henry
2015-01-09 21:41:21 +00:00
parent 3173ce4437
commit 5dff7076ce
4 changed files with 72 additions and 85 deletions

View File

@ -39,9 +39,10 @@ SourceFiles
#include "HashSet.H"
#include "volFieldsFwd.H"
#include "mapPolyMesh.H"
#include "fixedValueFvPatchFields.H"
#include "zeroGradientFvPatchFields.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
@ -66,7 +67,6 @@ protected:
//- Set of patch IDs
const labelHashSet patchIDs_;
private:
// Private Member Functions
@ -124,6 +124,18 @@ public:
virtual ~patchDistMethod();
// Static Functions
//- Return the patch types for y and n
// These are fixedValue for the set provided otherwise zero-gradient
template<class Type>
static inline wordList patchTypes
(
const fvMesh& mesh,
const labelHashSet& patchIDs
);
// Member Functions
//- Return the patchIDs
@ -154,6 +166,31 @@ public:
} // End namespace Foam
// * * * * * * * * * * * * * * * Static Functions * * * * * * * * * * * * * //
template<class Type>
inline Foam::wordList Foam::patchDistMethod::patchTypes
(
const fvMesh& mesh,
const labelHashSet& patchIDs
)
{
wordList yTypes
(
mesh.boundary().size(),
zeroGradientFvPatchField<Type>::typeName
);
forAllConstIter(labelHashSet, patchIDs, iter)
{
yTypes[iter.key()] = fixedValueFvPatchField<Type>::typeName;
}
return yTypes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif