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:
@ -1,5 +1,6 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/genericPatchFields/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -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])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
(
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
genericPatchField/genericPatchField.C
|
||||
genericFvPatchField/genericFvPatchFields.C
|
||||
genericPointPatchField/genericPointPatchFields.C
|
||||
|
||||
|
||||
@ -53,8 +53,8 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
genericPatchField(dict.lookup("type")),
|
||||
calculatedFvPatchField<Type>(p, iF, dict),
|
||||
actualTypeName_(dict.lookup("type")),
|
||||
dict_(dict)
|
||||
{
|
||||
if (!dict.found("value"))
|
||||
@ -69,7 +69,7 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
|
||||
<< nl
|
||||
<< " which is required to set the"
|
||||
" values of the generic patch field." << nl
|
||||
<< " (Actual type " << actualTypeName_ << ")" << nl
|
||||
<< " (Actual type " << actualTypeName() << ")" << nl
|
||||
<< "\n Please add the 'value' entry to the write function "
|
||||
"of the user-defined boundary-condition\n"
|
||||
<< exit(FatalIOError);
|
||||
@ -420,8 +420,8 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
genericPatchField(ptf),
|
||||
calculatedFvPatchField<Type>(ptf, p, iF, mapper),
|
||||
actualTypeName_(ptf.actualTypeName_),
|
||||
dict_(ptf.dict_)
|
||||
{
|
||||
forAllConstIter
|
||||
@ -502,8 +502,8 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
|
||||
const genericFvPatchField<Type>& ptf
|
||||
)
|
||||
:
|
||||
genericPatchField(ptf),
|
||||
calculatedFvPatchField<Type>(ptf),
|
||||
actualTypeName_(ptf.actualTypeName_),
|
||||
dict_(ptf.dict_),
|
||||
scalarFields_(ptf.scalarFields_),
|
||||
vectorFields_(ptf.vectorFields_),
|
||||
@ -520,8 +520,8 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
|
||||
const DimensionedField<Type, volMesh>& iF
|
||||
)
|
||||
:
|
||||
genericPatchField(ptf),
|
||||
calculatedFvPatchField<Type>(ptf, iF),
|
||||
actualTypeName_(ptf.actualTypeName_),
|
||||
dict_(ptf.dict_),
|
||||
scalarFields_(ptf.scalarFields_),
|
||||
vectorFields_(ptf.vectorFields_),
|
||||
@ -696,7 +696,7 @@ Foam::genericFvPatchField<Type>::valueInternalCoeffs
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "cannot be called for a genericFvPatchField"
|
||||
" (actual type " << actualTypeName_ << ")"
|
||||
" (actual type " << actualTypeName() << ")"
|
||||
<< "\n on patch " << this->patch().name()
|
||||
<< " of field " << this->internalField().name()
|
||||
<< " in file " << this->internalField().objectPath()
|
||||
@ -717,7 +717,7 @@ Foam::genericFvPatchField<Type>::valueBoundaryCoeffs
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "cannot be called for a genericFvPatchField"
|
||||
" (actual type " << actualTypeName_ << ")"
|
||||
" (actual type " << actualTypeName() << ")"
|
||||
<< "\n on patch " << this->patch().name()
|
||||
<< " of field " << this->internalField().name()
|
||||
<< " in file " << this->internalField().objectPath()
|
||||
@ -735,7 +735,7 @@ Foam::genericFvPatchField<Type>::gradientInternalCoeffs() const
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "cannot be called for a genericFvPatchField"
|
||||
" (actual type " << actualTypeName_ << ")"
|
||||
" (actual type " << actualTypeName() << ")"
|
||||
<< "\n on patch " << this->patch().name()
|
||||
<< " of field " << this->internalField().name()
|
||||
<< " in file " << this->internalField().objectPath()
|
||||
@ -752,7 +752,7 @@ Foam::genericFvPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "cannot be called for a genericFvPatchField"
|
||||
" (actual type " << actualTypeName_ << ")"
|
||||
" (actual type " << actualTypeName() << ")"
|
||||
<< "\n on patch " << this->patch().name()
|
||||
<< " of field " << this->internalField().name()
|
||||
<< " in file " << this->internalField().objectPath()
|
||||
@ -767,7 +767,7 @@ Foam::genericFvPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
template<class Type>
|
||||
void Foam::genericFvPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
writeEntry(os, "type", actualTypeName_);
|
||||
writeEntry(os, "type", actualTypeName());
|
||||
|
||||
forAllConstIter(dictionary, dict_, iter)
|
||||
{
|
||||
|
||||
@ -40,6 +40,7 @@ SourceFiles
|
||||
#ifndef genericFvPatchField_H
|
||||
#define genericFvPatchField_H
|
||||
|
||||
#include "genericPatchField.H"
|
||||
#include "calculatedFvPatchField.H"
|
||||
#include "HashPtrTable.H"
|
||||
|
||||
@ -55,11 +56,11 @@ namespace Foam
|
||||
template<class Type>
|
||||
class genericFvPatchField
|
||||
:
|
||||
public genericPatchField,
|
||||
public calculatedFvPatchField<Type>
|
||||
{
|
||||
// Private Data
|
||||
|
||||
word actualTypeName_;
|
||||
dictionary dict_;
|
||||
|
||||
HashPtrTable<scalarField> scalarFields_;
|
||||
|
||||
35
src/genericPatchFields/genericPatchField/genericPatchField.C
Normal file
35
src/genericPatchFields/genericPatchField/genericPatchField.C
Normal file
@ -0,0 +1,35 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "genericPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(genericPatchField, 0);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
94
src/genericPatchFields/genericPatchField/genericPatchField.H
Normal file
94
src/genericPatchFields/genericPatchField/genericPatchField.H
Normal file
@ -0,0 +1,94 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::genericPatchField
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
genericPatchField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef genericPatchField_H
|
||||
#define genericPatchField_H
|
||||
|
||||
#include "typeInfo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class genericFvPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class genericPatchField
|
||||
{
|
||||
// Private Data
|
||||
|
||||
word actualTypeName_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("generic");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
genericPatchField()
|
||||
{}
|
||||
|
||||
genericPatchField(const word& atn)
|
||||
:
|
||||
actualTypeName_(atn)
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~genericPatchField()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the actual type name
|
||||
word actualTypeName() const
|
||||
{
|
||||
return actualTypeName_;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -49,8 +49,8 @@ Foam::genericPointPatchField<Type>::genericPointPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
genericPatchField(dict.lookup("type")),
|
||||
calculatedPointPatchField<Type>(p, iF, dict),
|
||||
actualTypeName_(dict.lookup("type")),
|
||||
dict_(dict)
|
||||
{
|
||||
forAllConstIter(dictionary, dict_, iter)
|
||||
@ -311,8 +311,8 @@ Foam::genericPointPatchField<Type>::genericPointPatchField
|
||||
const pointPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
genericPatchField(ptf),
|
||||
calculatedPointPatchField<Type>(ptf, p, iF, mapper),
|
||||
actualTypeName_(ptf.actualTypeName_),
|
||||
dict_(ptf.dict_)
|
||||
{
|
||||
forAllConstIter
|
||||
@ -394,8 +394,8 @@ Foam::genericPointPatchField<Type>::genericPointPatchField
|
||||
const DimensionedField<Type, pointMesh>& iF
|
||||
)
|
||||
:
|
||||
genericPatchField(ptf),
|
||||
calculatedPointPatchField<Type>(ptf, iF),
|
||||
actualTypeName_(ptf.actualTypeName_),
|
||||
dict_(ptf.dict_),
|
||||
scalarFields_(ptf.scalarFields_),
|
||||
vectorFields_(ptf.vectorFields_),
|
||||
@ -560,7 +560,7 @@ void Foam::genericPointPatchField<Type>::rmap
|
||||
template<class Type>
|
||||
void Foam::genericPointPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
writeEntry(os, "type", actualTypeName_);
|
||||
writeEntry(os, "type", actualTypeName());
|
||||
|
||||
forAllConstIter(dictionary, dict_, iter)
|
||||
{
|
||||
|
||||
@ -36,6 +36,7 @@ SourceFiles
|
||||
#ifndef genericPointPatchField_H
|
||||
#define genericPointPatchField_H
|
||||
|
||||
#include "genericPatchField.H"
|
||||
#include "calculatedPointPatchField.H"
|
||||
#include "HashPtrTable.H"
|
||||
|
||||
@ -51,11 +52,11 @@ namespace Foam
|
||||
template<class Type>
|
||||
class genericPointPatchField
|
||||
:
|
||||
public genericPatchField,
|
||||
public calculatedPointPatchField<Type>
|
||||
{
|
||||
// Private Data
|
||||
|
||||
word actualTypeName_;
|
||||
dictionary dict_;
|
||||
|
||||
HashPtrTable<scalarField> scalarFields_;
|
||||
|
||||
Reference in New Issue
Block a user