ENH: basic fvPatchFields: added mapping warning

This commit is contained in:
mattijs
2013-09-12 16:02:02 +01:00
parent a37d59664c
commit a3b52a5f74
4 changed files with 80 additions and 8 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -55,7 +55,25 @@ Foam::directionMixedFvPatchField<Type>::directionMixedFvPatchField
refValue_(ptf.refValue_, mapper), refValue_(ptf.refValue_, mapper),
refGrad_(ptf.refGrad_, mapper), refGrad_(ptf.refGrad_, mapper),
valueFraction_(ptf.valueFraction_, mapper) valueFraction_(ptf.valueFraction_, mapper)
{} {
if (mapper.hasUnmapped())
{
WarningIn
(
"directionMixedFvPatchField<Type>::directionMixedFvPatchField\n"
"(\n"
" const directionMixedFvPatchField<Type>&,\n"
" const fvPatch&,\n"
" const DimensionedField<Type, volMesh>&,\n"
" const fvPatchFieldMapper&\n"
")\n"
) << "On field " << iF.name() << " patch " << p.name()
<< " patchField " << this->type()
<< " : mapper does not map all values." << nl
<< " To avoid this warning fully specify the mapping in derived"
<< " patch fields." << endl;
}
}
template<class Type> template<class Type>

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -56,7 +56,25 @@ fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
: :
fvPatchField<Type>(ptf, p, iF, mapper), fvPatchField<Type>(ptf, p, iF, mapper),
gradient_(ptf.gradient_, mapper) gradient_(ptf.gradient_, mapper)
{} {
if (mapper.hasUnmapped())
{
WarningIn
(
"fixedGradientFvPatchField<Type>::fixedGradientFvPatchField\n"
"(\n"
" const fixedGradientFvPatchField<Type>&,\n"
" const fvPatch&,\n"
" const DimensionedField<Type, volMesh>&,\n"
" const fvPatchFieldMapper&\n"
")\n"
) << "On field " << iF.name() << " patch " << p.name()
<< " patchField " << this->type()
<< " : mapper does not map all values." << nl
<< " To avoid this warning fully specify the mapping in derived"
<< " patch fields." << endl;
}
}
template<class Type> template<class Type>

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -65,7 +65,25 @@ fixedValueFvPatchField<Type>::fixedValueFvPatchField
) )
: :
fvPatchField<Type>(ptf, p, iF, mapper) fvPatchField<Type>(ptf, p, iF, mapper)
{} {
if (mapper.hasUnmapped())
{
WarningIn
(
"fixedValueFvPatchField<Type>::fixedValueFvPatchField\n"
"(\n"
" const fixedGradientFvPatchField<Type>&,\n"
" const fvPatch&,\n"
" const DimensionedField<Type, volMesh>&,\n"
" const fvPatchFieldMapper&\n"
")\n"
) << "On field " << iF.name() << " patch " << p.name()
<< " patchField " << this->type()
<< " : mapper does not map all values." << nl
<< " To avoid this warning fully specify the mapping in derived"
<< " patch fields." << endl;
}
}
template<class Type> template<class Type>

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -59,7 +59,25 @@ mixedFvPatchField<Type>::mixedFvPatchField
refValue_(ptf.refValue_, mapper), refValue_(ptf.refValue_, mapper),
refGrad_(ptf.refGrad_, mapper), refGrad_(ptf.refGrad_, mapper),
valueFraction_(ptf.valueFraction_, mapper) valueFraction_(ptf.valueFraction_, mapper)
{} {
if (mapper.hasUnmapped())
{
WarningIn
(
"mixedFvPatchField<Type>::mixedFvPatchField\n"
"(\n"
" const mixedFvPatchField<Type>&,\n"
" const fvPatch&,\n"
" const DimensionedField<Type, volMesh>&,\n"
" const fvPatchFieldMapper&\n"
")\n"
) << "On field " << iF.name() << " patch " << p.name()
<< " patchField " << this->type()
<< " : mapper does not map all values." << nl
<< " To avoid this warning fully specify the mapping in derived"
<< " patch fields." << endl;
}
}
template<class Type> template<class Type>