patchSummary: Added printing of the actual patchField types

Now for the wall in the simpleFoam pitzDaily tutorial case the following
patchField types are printed

group   : wall
    scalar              v2              v2WallFunction
    scalar              nut             nutkWallFunction
    scalar              k               kqRWallFunction
    scalar              nuTilda         zeroGradient
    scalar              p               zeroGradient
    scalar              omega           omegaWallFunction
    scalar              f               fWallFunction
    scalar              epsilon         epsilonWallFunction
    vector              U               noSlip

instead of

group   : wall
    scalar              v2              generic
    scalar              nut             generic
    scalar              k               generic
    scalar              nuTilda         zeroGradient
    scalar              p               zeroGradient
    scalar              omega           generic
    scalar              f               generic
    scalar              epsilon         generic
    vector              U               noSlip
This commit is contained in:
Henry Weller
2019-09-08 16:39:45 +01:00
parent a9bfb223ff
commit 107b5d161d
10 changed files with 172 additions and 20 deletions

View File

@ -1,5 +1,6 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/genericPatchFields/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -24,10 +24,25 @@ License
\*---------------------------------------------------------------------------*/
#include "patchSummaryTemplates.H"
#include "genericPatchField.H"
#include "IOmanip.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class PatchField>
Foam::word Foam::patchFieldType(const PatchField& pf)
{
if (isA<genericPatchField>(pf))
{
return refCast<const genericPatchField>(pf).actualTypeName();
}
else
{
return pf.type();
}
}
template<class GeoField>
void Foam::addToFieldList
(
@ -63,7 +78,8 @@ void Foam::outputFieldList
Info<< " " << pTraits<typename GeoField::value_type>::typeName
<< tab << tab
<< fieldList[fieldi].name() << tab << tab
<< fieldList[fieldi].boundaryField()[patchi].type() << nl;
<< patchFieldType(fieldList[fieldi].boundaryField()[patchi])
<< nl;
}
}
}
@ -84,7 +100,7 @@ void Foam::collectFieldList
fieldToType.insert
(
fieldList[fieldi].name(),
fieldList[fieldi].boundaryField()[patchi].type()
patchFieldType(fieldList[fieldi].boundaryField()[patchi])
);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -33,6 +33,9 @@ License
namespace Foam
{
template<class PatchField>
word patchFieldType(const PatchField& pf);
template<class GeoField>
void addToFieldList
(