mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
wallDist: moved patchTypes into patchDistMethod
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user