ENH: more consistent use of good() or direct testing instead valid()

This commit is contained in:
Mark Olesen
2023-07-19 13:47:19 +02:00
parent 76efcba4c7
commit 945e3e41b1
72 changed files with 139 additions and 148 deletions

View File

@ -17,7 +17,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
vf, vf,
dir, dir,
"reconstruct(" "reconstruct("
+ (reconFieldName != word::null ? reconFieldName : vf.name()) + (reconFieldName.empty() ? vf.name() : reconFieldName)
+ ')' + ')'
) )
); );

View File

@ -61,7 +61,7 @@ void basicTests(const coordinateSystem& cs)
if (const auto* cartptr = isA<coordSystem::cartesian>(cs)) if (const auto* cartptr = isA<coordSystem::cartesian>(cs))
{ {
if (!cartptr->valid()) if (!cartptr->good())
{ {
Info<< "invalid cartesian = " << (*cartptr) Info<< "invalid cartesian = " << (*cartptr)
<< " with: " << (*cartptr).R() << nl; << " with: " << (*cartptr).R() << nl;

View File

@ -221,7 +221,7 @@ int main(int argc, char *argv[])
blockMesh blocks(meshDict, regionName, strategy, args.verbose()); blockMesh blocks(meshDict, regionName, strategy, args.verbose());
if (!blocks.valid()) if (!blocks.good())
{ {
// Could/should be Fatal? // Could/should be Fatal?

View File

@ -979,7 +979,7 @@ int main(int argc, char *argv[])
// Change the front and back patch types as required // Change the front and back patch types as required
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
word frontBackType(word::null); word frontBackType;
if (isType<extrudeModels::wedge>(model())) if (isType<extrudeModels::wedge>(model()))
{ {

View File

@ -947,7 +947,7 @@ void addZoneSidePatches
forAll(zoneSidePatch, zoneI) forAll(zoneSidePatch, zoneI)
{ {
if (oneDPolyPatchType != word::null) if (!oneDPolyPatchType.empty())
{ {
// Reuse single empty patch. // Reuse single empty patch.
word patchName; word patchName;

View File

@ -47,7 +47,7 @@ void Foam::DelaunayMesh<Triangulation>::timeCheck
<< time().elapsedCpuTime() << " s, " << time().elapsedCpuTime() << " s, "
<< "delta " << time().cpuTimeIncrement()<< " s"; << "delta " << time().cpuTimeIncrement()<< " s";
if (description != word::null) if (!description.empty())
{ {
Info<< ", " << description << " "; Info<< ", " << description << " ";
} }

View File

@ -33,7 +33,7 @@ template<class KeyType, class DataType>
Foam::PrintTable<KeyType, DataType>::PrintTable() Foam::PrintTable<KeyType, DataType>::PrintTable()
: :
table_(), table_(),
title_(string::null) title_()
{} {}

View File

@ -65,7 +65,7 @@ void Foam::conformalVoronoiMesh::timeCheck
<< runTime.elapsedCpuTime() << " s, " << runTime.elapsedCpuTime() << " s, "
<< "delta " << runTime.cpuTimeIncrement()<< " s"; << "delta " << runTime.cpuTimeIncrement()<< " s";
if (description != word::null) if (!description.empty())
{ {
Info<< ", " << description << " "; Info<< ", " << description << " ";
} }

View File

@ -92,8 +92,8 @@ void Foam::helpTypes::helpBoundary::execute
{ {
setEnv("FOAM_ABORT", "", true); setEnv("FOAM_ABORT", "", true);
word condition(word::null); word condition;
word fieldName(word::null); word fieldName;
if (args.readIfPresent("browse", condition)) if (args.readIfPresent("browse", condition))
{ {

View File

@ -72,7 +72,7 @@ void Foam::helpTypes::helpFunctionObject::execute
const fvMesh& mesh const fvMesh& mesh
) )
{ {
word function(word::null); word function;
if (args.readIfPresent("browse", function)) if (args.readIfPresent("browse", function))
{ {

View File

@ -80,7 +80,7 @@ void Foam::helpTypes::helpSolver::execute
const fvMesh& mesh const fvMesh& mesh
) )
{ {
word solver(word::null); word solver;
if (args.readIfPresent("browse", solver)) if (args.readIfPresent("browse", solver))
{ {

View File

@ -348,7 +348,7 @@ void Foam::codedBase::updateLibrary
void Foam::codedBase::updateLibrary(const word& name) const void Foam::codedBase::updateLibrary(const word& name) const
{ {
if (context_.valid()) if (context_.good())
{ {
updateLibrary(name, context_); updateLibrary(name, context_);
} }

View File

@ -671,7 +671,7 @@ Foam::Ostream& Foam::dimensionSet::write
os << token::BEGIN_SQR; os << token::BEGIN_SQR;
if (writeUnits.valid() && os.format() == IOstreamOption::ASCII) if (writeUnits.good() && os.format() == IOstreamOption::ASCII)
{ {
scalarField exponents(dimensionSet::nDimensions); scalarField exponents(dimensionSet::nDimensions);
for (int d=0; d < dimensionSet::nDimensions; ++d) for (int d=0; d < dimensionSet::nDimensions; ++d)

View File

@ -639,7 +639,7 @@ public:
// (so does e.g. parallel communication). If not use // (so does e.g. parallel communication). If not use
// validBoundary=false // validBoundary=false
// //
// \note Only autoPtr parameters that test as valid() are used // \note Only autoPtr parameters that test as good() are used
// for resetting, otherwise the existing entries are left // for resetting, otherwise the existing entries are left
// untouched. // untouched.
void resetPrimitives void resetPrimitives

View File

@ -601,7 +601,7 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
) )
: :
coupledPolyPatch(name, size, start, index, bm, patchType, transform), coupledPolyPatch(name, size, start, index, bm, patchType, transform),
neighbPatchName_(word::null), neighbPatchName_(),
neighbPatchID_(-1), neighbPatchID_(-1),
rotationAxis_(Zero), rotationAxis_(Zero),
rotationCentre_(Zero), rotationCentre_(Zero),
@ -661,7 +661,7 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
coupledPointsPtr_(nullptr), coupledPointsPtr_(nullptr),
coupledEdgesPtr_(nullptr) coupledEdgesPtr_(nullptr)
{ {
if (neighbPatchName_ == word::null && !coupleGroup_.valid()) if (neighbPatchName_.empty() && !coupleGroup_.good())
{ {
FatalIOErrorInFunction(dict) FatalIOErrorInFunction(dict)
<< "No \"neighbourPatch\" provided." << endl << "No \"neighbourPatch\" provided." << endl

View File

@ -184,7 +184,7 @@ Foam::PrimitivePatch<FaceList, PointField>::findEdge
const edge& e const edge& e
) const ) const
{ {
if (e.valid() && e.first() < nPoints() && e.second() < nPoints()) if (e.good() && e.first() < nPoints() && e.second() < nPoints())
{ {
// Get pointEdges from the starting point and search all the candidates // Get pointEdges from the starting point and search all the candidates
const edgeList& myEdges = this->edges(); const edgeList& myEdges = this->edges();

View File

@ -160,6 +160,9 @@ public:
//- True if range is empty (zero-sized) //- True if range is empty (zero-sized)
bool empty() const noexcept { return !size_; } bool empty() const noexcept { return !size_; }
//- True if range has size greater than zero
bool good() const noexcept { return (size_ > 0); }
//- The size of the range //- The size of the range
IntType size() const noexcept { return size_; } IntType size() const noexcept { return size_; }
@ -243,8 +246,8 @@ public:
//- Decrease the size by n, but never below 0. //- Decrease the size by n, but never below 0.
inline IntType operator-=(const IntType n) noexcept; inline IntType operator-=(const IntType n) noexcept;
//- True if range is non-empty //- True if range has size greater than zero. Same as good()
explicit operator bool() const noexcept { return bool(size_); } explicit operator bool() const noexcept { return (size_ > 0); }
// Iterator ranges // Iterator ranges

View File

@ -162,10 +162,10 @@ public:
// Housekeeping // Housekeeping
//- Deprecated(2020-09) True if range is non-empty //- Deprecated(2020-09) True if range has size greater than zero
// //
// \deprecated(2020-09) - use bool operator // \deprecated(2020-09) - use bool operator - or good()
bool valid() const noexcept { return !empty(); } bool valid() const noexcept { return good(); }
}; };

View File

@ -32,7 +32,7 @@ License
bool Foam::subModelBase::subModelBase::inLine() const bool Foam::subModelBase::subModelBase::inLine() const
{ {
return (modelName_ != word::null); return (!modelName_.empty());
} }
@ -171,7 +171,7 @@ bool Foam::subModelBase::writeTime() const
Foam::fileName Foam::subModelBase::localPath() const Foam::fileName Foam::subModelBase::localPath() const
{ {
if (modelName_ != word::null) if (!modelName_.empty())
{ {
return modelName_; return modelName_;
} }

View File

@ -61,7 +61,7 @@ const Foam::volVectorField& Foam::nutWallFunctionFvPatchScalarField::U
const turbulenceModel& turb const turbulenceModel& turb
) const ) const
{ {
if (UName_ == word::null) if (UName_.empty())
{ {
return turb.U(); return turb.U();
} }
@ -89,7 +89,7 @@ Foam::nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
) )
: :
fixedValueFvPatchScalarField(p, iF), fixedValueFvPatchScalarField(p, iF),
UName_(word::null), UName_(),
wallCoeffs_() wallCoeffs_()
{ {
checkType(); checkType();

View File

@ -100,7 +100,7 @@ Foam::fa::jouleHeatingSource::updateSigma
typeName + ":sigma_" + regionName_ typeName + ":sigma_" + regionName_
); );
if (!sigmaVsTPtr.valid()) if (!sigmaVsTPtr)
{ {
// Electrical conductivity field, sigma, was specified by the user // Electrical conductivity field, sigma, was specified by the user
return sigma; return sigma;

View File

@ -567,7 +567,7 @@ bool Foam::MRFZone::read(const dictionary& dict)
omega_.reset(Function1<scalar>::New("omega", coeffs_, &mesh_)); omega_.reset(Function1<scalar>::New("omega", coeffs_, &mesh_));
const word oldCellZoneName = cellZoneName_; const word oldCellZoneName = cellZoneName_;
if (cellZoneName_ == word::null) if (cellZoneName_.empty())
{ {
coeffs_.readEntry("cellZone", cellZoneName_); coeffs_.readEntry("cellZone", cellZoneName_);
} }

View File

@ -107,7 +107,7 @@ Foam::expressions::fvExprDriver::getTopoSetLabels
} }
if (selected.valid()) if (selected.good())
{ {
return selected; return selected;
} }

View File

@ -41,7 +41,7 @@ Foam::mappedMixedFieldFvPatchField<Type>::mappedMixedFieldFvPatchField
mixedFvPatchField<Type>(p, iF), mixedFvPatchField<Type>(p, iF),
mappedPatchBase(p.patch()), mappedPatchBase(p.patch()),
mappedPatchFieldBase<Type>(*this, *this), mappedPatchFieldBase<Type>(*this, *this),
weightFieldName_(word::null) weightFieldName_()
{ {
this->refValue() = Zero; this->refValue() = Zero;
this->refGrad() = Zero; this->refGrad() = Zero;

View File

@ -45,7 +45,7 @@ Foam::mappedMixedFvPatchField<Type>::mappedMixedFvPatchField
mappedFixedValueFvPatchField<Type>::mapper(p, iF), mappedFixedValueFvPatchField<Type>::mapper(p, iF),
*this *this
), ),
weightFieldName_(word::null) weightFieldName_()
{ {
this->refValue() = Zero; this->refValue() = Zero;
this->refGrad() = Zero; this->refGrad() = Zero;

View File

@ -72,8 +72,8 @@ pressurePIDControlInletVelocityFvPatchVectorField
) )
: :
fixedValueFvPatchField<vector>(p, iF), fixedValueFvPatchField<vector>(p, iF),
upstreamName_(word::null), upstreamName_(),
downstreamName_(word::null), downstreamName_(),
deltaP_(1), deltaP_(1),
shapeFactor_(0), shapeFactor_(0),
pName_("p"), pName_("p"),

View File

@ -453,7 +453,7 @@ Foam::functionObjects::extractEulerianParticles::extractEulerianParticles
fvMeshFunctionObject(name, runTime, dict), fvMeshFunctionObject(name, runTime, dict),
writeFile(runTime, name), writeFile(runTime, name),
cloud_(mesh_, "eulerianParticleCloud"), cloud_(mesh_, "eulerianParticleCloud"),
faceZoneName_(word::null), faceZoneName_(),
zoneID_(-1), zoneID_(-1),
patchIDs_(), patchIDs_(),
patchFaceIDs_(), patchFaceIDs_(),

View File

@ -126,7 +126,7 @@ Foam::histogramModel::histogramModel
: :
writeFile(mesh, name, "histogram", dict), writeFile(mesh, name, "histogram", dict),
mesh_(mesh), mesh_(mesh),
fieldName_(word::null) fieldName_()
{} {}

View File

@ -88,7 +88,7 @@ Foam::functionObjects::norm::norm
fieldExpression(name, runTime, dict), fieldExpression(name, runTime, dict),
norm_(normType::L1), norm_(normType::L1),
divisorPtr_(nullptr), divisorPtr_(nullptr),
divisorFieldName_(word::null), divisorFieldName_(),
p_(-1) p_(-1)
{ {
read(dict); read(dict);
@ -127,7 +127,7 @@ bool Foam::functionObjects::norm::read(const dictionary& dict)
{ {
divisorFieldName_ = dict.get<word>("divisorField"); divisorFieldName_ = dict.get<word>("divisorField");
if (divisorFieldName_ == word::null) if (divisorFieldName_.empty())
{ {
FatalIOErrorInFunction(dict) FatalIOErrorInFunction(dict)
<< "The norm 'field' needs the input entry 'divisorField'." << "The norm 'field' needs the input entry 'divisorField'."

View File

@ -78,7 +78,7 @@ Foam::resolutionIndexModel::resolutionIndexModel
) )
: :
mesh_(mesh), mesh_(mesh),
resultName_(word::null) resultName_()
{} {}

View File

@ -206,7 +206,7 @@ void Foam::functionObjects::forceCoeffs::calcMomentCoeffs()
void Foam::functionObjects::forceCoeffs::createIntegratedDataFile() void Foam::functionObjects::forceCoeffs::createIntegratedDataFile()
{ {
if (!coeffFilePtr_.valid()) if (!coeffFilePtr_)
{ {
coeffFilePtr_ = newFileAtStartTime("coefficient"); coeffFilePtr_ = newFileAtStartTime("coefficient");
writeIntegratedDataFileHeader("Coefficients", coeffFilePtr_()); writeIntegratedDataFileHeader("Coefficients", coeffFilePtr_());

View File

@ -412,13 +412,13 @@ void Foam::functionObjects::forces::addToInternalField
void Foam::functionObjects::forces::createIntegratedDataFiles() void Foam::functionObjects::forces::createIntegratedDataFiles()
{ {
if (!forceFilePtr_.valid()) if (!forceFilePtr_)
{ {
forceFilePtr_ = newFileAtStartTime("force"); forceFilePtr_ = newFileAtStartTime("force");
writeIntegratedDataFileHeader("Force", forceFilePtr_()); writeIntegratedDataFileHeader("Force", forceFilePtr_());
} }
if (!momentFilePtr_.valid()) if (!momentFilePtr_)
{ {
momentFilePtr_ = newFileAtStartTime("moment"); momentFilePtr_ = newFileAtStartTime("moment");
writeIntegratedDataFileHeader("Moment", momentFilePtr_()); writeIntegratedDataFileHeader("Moment", momentFilePtr_());

View File

@ -356,7 +356,7 @@ Foam::functionObjects::sizeDistribution::sizeDistribution
( (
selectionModeTypeNames_.get("selectionMode", dict) selectionModeTypeNames_.get("selectionMode", dict)
), ),
selectionModeTypeName_(word::null), selectionModeTypeName_(),
functionType_(functionTypeNames_.get("functionType", dict)), functionType_(functionTypeNames_.get("functionType", dict)),
abszissaType_(abszissaTypeNames_.get("abszissaType", dict)), abszissaType_(abszissaTypeNames_.get("abszissaType", dict)),
nCells_(0), nCells_(0),

View File

@ -109,7 +109,7 @@ bool Foam::functionObjects::runTimeControls::minMaxCondition::apply()
const word valueType = const word valueType =
state_.objectResultType(functionObjectName_, fieldName); state_.objectResultType(functionObjectName_, fieldName);
if (valueType == word::null) if (valueType.empty())
{ {
WarningInFunction WarningInFunction
<< "Unable to find entry " << fieldName << "Unable to find entry " << fieldName

View File

@ -75,7 +75,7 @@ Foam::fv::limitTemperature::limitTemperature
writeFile(mesh, name, typeName, dict, false), writeFile(mesh, name, typeName, dict, false),
Tmin_(0), Tmin_(0),
Tmax_(0), Tmax_(0),
phase_(word::null) phase_()
{ {
if (isActive()) if (isActive())
{ {

View File

@ -131,7 +131,7 @@ bool Foam::CloudSubModelBase<CloudType>::writeTime() const
template<class CloudType> template<class CloudType>
Foam::fileName Foam::CloudSubModelBase<CloudType>::localPath() const Foam::fileName Foam::CloudSubModelBase<CloudType>::localPath() const
{ {
if (modelName_ != word::null) if (!modelName_.empty())
{ {
return cloud::prefix/owner_.name()/modelName_; return cloud::prefix/owner_.name()/modelName_;
} }

View File

@ -126,13 +126,13 @@ public:
void reset(const scalar low, const scalar upp, const label nCells); void reset(const scalar low, const scalar upp, const label nCells);
//- The location list is valid if it contains 2 or more points //- The location list is valid if it contains 2 or more points
inline bool valid() const; inline bool good() const noexcept;
//- The number of cells in this direction. //- The number of cells in this direction.
inline label nCells() const; inline label nCells() const noexcept;
//- The number of points in this direction. //- The number of points in this direction.
inline label nPoints() const; inline label nPoints() const noexcept;
//- True if the location is within the range //- True if the location is within the range
inline bool contains(const scalar p) const; inline bool contains(const scalar p) const;

View File

@ -28,19 +28,19 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// Location // Location
inline bool Foam::PDRblock::location::valid() const inline bool Foam::PDRblock::location::good() const noexcept
{ {
return (scalarList::size() > 1); return (scalarList::size() > 1);
} }
inline Foam::label Foam::PDRblock::location::nCells() const inline Foam::label Foam::PDRblock::location::nCells() const noexcept
{ {
return (scalarList::size()-1); return (scalarList::size()-1);
} }
inline Foam::label Foam::PDRblock::location::nPoints() const inline Foam::label Foam::PDRblock::location::nPoints() const noexcept
{ {
return scalarList::size(); return scalarList::size();
} }

View File

@ -45,9 +45,7 @@ int Foam::blockDescriptor::calcEdgePointsWeights
// The topological edge on the block // The topological edge on the block
const Foam::edge thisEdge(blockShape_, cellModelEdge); const Foam::edge thisEdge(blockShape_, cellModelEdge);
const bool isCollapsedEdge = !thisEdge.valid(); if (blockEdge::debug && !thisEdge.good())
if (blockEdge::debug && isCollapsedEdge)
{ {
Info<< "Collapsed edge:" << thisEdge; Info<< "Collapsed edge:" << thisEdge;
if (index_ >= 0) if (index_ >= 0)

View File

@ -47,7 +47,7 @@ bool Foam::blockMesh::checkDegenerate() const
{ {
edge e(shape.edge(edgei)); edge e(shape.edge(edgei));
if (!e.valid()) if (!e.good())
{ {
return true; // Looks like a collapsed edge return true; // Looks like a collapsed edge
} }

View File

@ -2956,12 +2956,12 @@ void Foam::meshRefinement::zonify
{ {
Pout<< "meshRefinement::zonify : found wall closure faces:" Pout<< "meshRefinement::zonify : found wall closure faces:"
<< unnamedClosureFaces.size() << unnamedClosureFaces.size()
<< " map:" << unnamedMapPtr.valid() << endl; << " map:" << bool(unnamedMapPtr) << endl;
} }
// Add to unnamedRegion1, unnamedRegion2 // Add to unnamedRegion1, unnamedRegion2
if (unnamedMapPtr.valid()) if (unnamedMapPtr)
{ {
// Dump leak path // Dump leak path
if (leakPathFormatter) if (leakPathFormatter)
@ -3097,11 +3097,11 @@ void Foam::meshRefinement::zonify
// Pout<< "meshRefinement::zonify :" // Pout<< "meshRefinement::zonify :"
// << " found faceZone closure faces:" // << " found faceZone closure faces:"
// << namedClosureFaces.size() // << namedClosureFaces.size()
// << " map:" << namedMapPtr.valid() << endl; // << " map:" << bool(namedMapPtr) << endl;
// } // }
// //
// // Add to namedSurfaceRegion, posOrientation // // Add to namedSurfaceRegion, posOrientation
// if (namedMapPtr.valid()) // if (namedMapPtr)
// { // {
// WarningInFunction // WarningInFunction
// << "Detected and closed leak path" // << "Detected and closed leak path"

View File

@ -1951,10 +1951,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::blockLeakFaces
{ {
Pout<< "meshRefinement::blockLeakFaces :" Pout<< "meshRefinement::blockLeakFaces :"
<< " found closure faces:" << closureFaces.size() << " found closure faces:" << closureFaces.size()
<< " map:" << closureMapPtr.valid() << endl; << " map:" << bool(closureMapPtr) << endl;
} }
if (!closureMapPtr.valid()) if (!closureMapPtr)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "have leak but did not find any closure faces" << "have leak but did not find any closure faces"

View File

@ -466,7 +466,7 @@ Foam::labelList Foam::surfaceZonesInfo::addCellZonesToMesh
const word& cellZoneName = surfList[surfI].cellZoneName(); const word& cellZoneName = surfList[surfI].cellZoneName();
if (cellZoneName != word::null) if (!cellZoneName.empty())
{ {
label zoneI = addCellZone label zoneI = addCellZone
( (

View File

@ -129,7 +129,7 @@ Foam::refinementParameters::refinementParameters
{ {
locationsInMesh_[nZones] = pointsToZone[i].first(); locationsInMesh_[nZones] = pointsToZone[i].first();
zonesInMesh_[nZones] = pointsToZone[i].second(); zonesInMesh_[nZones] = pointsToZone[i].second();
if (zonesInMesh_[nZones] == word::null) if (zonesInMesh_[nZones].empty())
{ {
zonesInMesh_[nZones] = "none"; zonesInMesh_[nZones] = "none";
} }
@ -199,7 +199,7 @@ Foam::labelList Foam::refinementParameters::addCellZonesToMesh
labelList zoneIDs(zonesInMesh_.size(), -1); labelList zoneIDs(zonesInMesh_.size(), -1);
forAll(zonesInMesh_, i) forAll(zonesInMesh_, i)
{ {
if (zonesInMesh_[i] != word::null && zonesInMesh_[i] != "none") if (!zonesInMesh_[i].empty() && zonesInMesh_[i] != "none")
{ {
zoneIDs[i] = surfaceZonesInfo::addCellZone zoneIDs[i] = surfaceZonesInfo::addCellZone
( (
@ -282,11 +282,7 @@ Foam::labelList Foam::refinementParameters::zonedLocations
forAll(zonesInMesh, i) forAll(zonesInMesh, i)
{ {
if if (!zonesInMesh[i].empty() && zonesInMesh[i] != "none")
(
zonesInMesh[i] != word::null
&& zonesInMesh[i] != "none"
)
{ {
indices.append(i); indices.append(i);
} }
@ -304,11 +300,7 @@ Foam::labelList Foam::refinementParameters::unzonedLocations
forAll(zonesInMesh, i) forAll(zonesInMesh, i)
{ {
if if (zonesInMesh[i].empty() || zonesInMesh[i] == "none")
(
zonesInMesh[i] == word::null
|| zonesInMesh[i] == "none"
)
{ {
indices.append(i); indices.append(i);
} }

View File

@ -562,7 +562,7 @@ Foam::cyclicACMIPolyPatch::cyclicACMIPolyPatch
transform, transform,
defaultAMIMethod defaultAMIMethod
), ),
nonOverlapPatchName_(word::null), nonOverlapPatchName_(),
nonOverlapPatchID_(-1), nonOverlapPatchID_(-1),
srcMask_(), srcMask_(),
tgtMask_(), tgtMask_(),

View File

@ -616,7 +616,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
) )
: :
coupledPolyPatch(name, size, start, index, bm, patchType, transform), coupledPolyPatch(name, size, start, index, bm, patchType, transform),
nbrPatchName_(word::null), nbrPatchName_(),
nbrPatchID_(-1), nbrPatchID_(-1),
fraction_(Zero), fraction_(Zero),
rotationAxis_(Zero), rotationAxis_(Zero),
@ -624,7 +624,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
rotationAngleDefined_(false), rotationAngleDefined_(false),
rotationAngle_(0.0), rotationAngle_(0.0),
separationVector_(Zero), separationVector_(Zero),
periodicPatchName_(word::null), periodicPatchName_(),
periodicPatchID_(-1), periodicPatchID_(-1),
AMIPtr_(AMIInterpolation::New(defaultAMIMethod)), AMIPtr_(AMIInterpolation::New(defaultAMIMethod)),
surfDict_(fileName("surface")), surfDict_(fileName("surface")),
@ -683,7 +683,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
faceAreas0_(), faceAreas0_(),
faceCentres0_() faceCentres0_()
{ {
if (nbrPatchName_ == word::null && !coupleGroup_.valid()) if (nbrPatchName_.empty() && !coupleGroup_.good())
{ {
FatalIOErrorInFunction(dict) FatalIOErrorInFunction(dict)
<< "No \"neighbourPatch\" or \"coupleGroup\" provided." << "No \"neighbourPatch\" or \"coupleGroup\" provided."
@ -938,7 +938,7 @@ Foam::label Foam::cyclicAMIPolyPatch::neighbPatchID() const
Foam::label Foam::cyclicAMIPolyPatch::periodicPatchID() const Foam::label Foam::cyclicAMIPolyPatch::periodicPatchID() const
{ {
if (periodicPatchName_ == word::null) if (periodicPatchName_.empty())
{ {
return -1; return -1;
} }
@ -1261,7 +1261,7 @@ void Foam::cyclicAMIPolyPatch::write(Ostream& os) const
} }
} }
if (periodicPatchName_ != word::null) if (!periodicPatchName_.empty())
{ {
os.writeEntry("periodicPatch", periodicPatchName_); os.writeEntry("periodicPatch", periodicPatchName_);
} }

View File

@ -1361,7 +1361,7 @@ Foam::mappedPatchBase::mappedPatchBase
{ {
addWorldConnection(); addWorldConnection();
if (!coupleGroup_.valid()) if (!coupleGroup_.good())
{ {
if (sampleWorld_.empty() && sampleRegion_.empty()) if (sampleWorld_.empty() && sampleRegion_.empty())
{ {
@ -1474,7 +1474,7 @@ Foam::mappedPatchBase::mappedPatchBase
<< exit(FatalIOError); << exit(FatalIOError);
} }
if (!coupleGroup_.valid()) if (!coupleGroup_.good())
{ {
if (sampleWorld_.empty() && sampleRegion_.empty()) if (sampleWorld_.empty() && sampleRegion_.empty())
{ {

View File

@ -43,7 +43,7 @@ inline const Foam::word& Foam::mappedPatchBase::sampleRegion() const
{ {
if (sampleRegion_.empty()) if (sampleRegion_.empty())
{ {
if (!coupleGroup_.valid()) if (!coupleGroup_.good())
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Supply either a regionName or a coupleGroup" << "Supply either a regionName or a coupleGroup"
@ -69,7 +69,7 @@ inline const Foam::word& Foam::mappedPatchBase::samplePatch() const
{ {
if (samplePatch_.empty()) if (samplePatch_.empty())
{ {
if (!coupleGroup_.valid()) if (!coupleGroup_.good())
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Supply either a patchName or a coupleGroup" << "Supply either a patchName or a coupleGroup"

View File

@ -57,9 +57,9 @@ void Foam::distributedDICPreconditioner::forwardInternalDiag
const scalar* const __restrict__ upperPtr = matrix.upper().begin(); const scalar* const __restrict__ upperPtr = matrix.upper().begin();
const label nFaces = matrix.upper().size(); const label nFaces = matrix.upper().size();
if (cellColourPtr_.valid()) if (cellColourPtr_)
{ {
const auto& cellColour = cellColourPtr_(); const auto& cellColour = *cellColourPtr_;
for (label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
const label cell = lPtr[face]; const label cell = lPtr[face];
@ -96,9 +96,9 @@ void Foam::distributedDICPreconditioner::forwardInternal
const scalar* const __restrict__ upperPtr = matrix.upper().begin(); const scalar* const __restrict__ upperPtr = matrix.upper().begin();
const label nFaces = matrix.upper().size(); const label nFaces = matrix.upper().size();
if (cellColourPtr_.valid()) if (cellColourPtr_)
{ {
const auto& cellColour = cellColourPtr_(); const auto& cellColour = *cellColourPtr_;
for (label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
const label cell = lPtr[face]; const label cell = lPtr[face];

View File

@ -310,9 +310,9 @@ void Foam::distributedDILUPreconditioner::forwardInternalDiag
const scalar* const __restrict__ lowerPtr = matrix.lower().begin(); const scalar* const __restrict__ lowerPtr = matrix.lower().begin();
const label nFaces = matrix.upper().size(); const label nFaces = matrix.upper().size();
if (cellColourPtr_.valid()) if (cellColourPtr_)
{ {
const auto& cellColour = cellColourPtr_(); const auto& cellColour = *cellColourPtr_;
for (label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
const label cell = lPtr[face]; const label cell = lPtr[face];
@ -375,9 +375,9 @@ void Foam::distributedDILUPreconditioner::forwardInternal
const scalar* const __restrict__ lowerPtr = matrix.lower().begin(); const scalar* const __restrict__ lowerPtr = matrix.lower().begin();
const label nFaces = matrix.upper().size(); const label nFaces = matrix.upper().size();
if (cellColourPtr_.valid()) if (cellColourPtr_)
{ {
const auto& cellColour = cellColourPtr_(); const auto& cellColour = *cellColourPtr_;
for (label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
const label sface = losortPtr[face]; const label sface = losortPtr[face];
@ -419,9 +419,9 @@ void Foam::distributedDILUPreconditioner::backwardInternal
const label nFacesM1 = matrix.upper().size() - 1; const label nFacesM1 = matrix.upper().size() - 1;
if (cellColourPtr_.valid()) if (cellColourPtr_)
{ {
const auto& cellColour = cellColourPtr_(); const auto& cellColour = *cellColourPtr_;
for (label face=nFacesM1; face>=0; face--) for (label face=nFacesM1; face>=0; face--)
{ {
const label cell = uPtr[face]; const label cell = uPtr[face];
@ -486,7 +486,7 @@ void Foam::distributedDILUPreconditioner::calcReciprocalD
for (label colouri = 0; colouri < nColours_; colouri++) for (label colouri = 0; colouri < nColours_; colouri++)
{ {
if (cellColourPtr_.valid())// && colourBufs_.set(colouri)) if (cellColourPtr_) // && colourBufs_.set(colouri))
{ {
for (const label inti : lowerGlobalRecv_[colouri]) for (const label inti : lowerGlobalRecv_[colouri])
{ {
@ -497,7 +497,7 @@ void Foam::distributedDILUPreconditioner::calcReciprocalD
forwardInternalDiag(rD, colouri); forwardInternalDiag(rD, colouri);
// Store effect of exchanging rD to higher interfaces in colourBufs_ // Store effect of exchanging rD to higher interfaces in colourBufs_
if (cellColourPtr_.valid()) if (cellColourPtr_)
{ {
sendGlobal(higherGlobalSend_[colouri], rD, higherColour_[colouri]); sendGlobal(higherGlobalSend_[colouri], rD, higherColour_[colouri]);
} }
@ -645,7 +645,7 @@ Foam::distributedDILUPreconditioner::distributedDILUPreconditioner
// Start off with all cells colour 0 // Start off with all cells colour 0
nColours_ = 1; nColours_ = 1;
cellColourPtr_.clear(); cellColourPtr_.reset();
if (coupled_ && haveGlobalCoupled) if (coupled_ && haveGlobalCoupled)
{ {
labelList patchToColour; labelList patchToColour;
@ -653,7 +653,7 @@ Foam::distributedDILUPreconditioner::distributedDILUPreconditioner
//if (haveDistributedAMI) //if (haveDistributedAMI)
//{ //{
// nColours_ = 1; // nColours_ = 1;
// cellColourPtr_() = 0; // *cellColourPtr_ = 0;
// patchToColour = labelList(interfaces.size(), 0); // patchToColour = labelList(interfaces.size(), 0);
//} //}
//else //else
@ -826,7 +826,7 @@ void Foam::distributedDILUPreconditioner::precondition
for (label colouri = 0; colouri < nColours_; colouri++) for (label colouri = 0; colouri < nColours_; colouri++)
{ {
// Do non-processor boundaries for this colour // Do non-processor boundaries for this colour
if (cellColourPtr_.valid())// && colourBufs_.set(colouri)) if (cellColourPtr_) // && colourBufs_.set(colouri))
{ {
for (const label inti : lowerGlobalRecv_[colouri]) for (const label inti : lowerGlobalRecv_[colouri])
{ {
@ -838,7 +838,7 @@ void Foam::distributedDILUPreconditioner::precondition
// Store effect of exchanging rD to higher interfaces // Store effect of exchanging rD to higher interfaces
// in colourBufs_ // in colourBufs_
if (cellColourPtr_.valid()) if (cellColourPtr_)
{ {
sendGlobal sendGlobal
( (
@ -878,7 +878,7 @@ void Foam::distributedDILUPreconditioner::precondition
for (label colouri = nColours_-1; colouri >= 0; colouri--) for (label colouri = nColours_-1; colouri >= 0; colouri--)
{ {
// Do non-processor boundaries for this colour // Do non-processor boundaries for this colour
if (cellColourPtr_.valid())// && colourBufs_.set(colouri)) if (cellColourPtr_) // && colourBufs_.set(colouri))
{ {
for (const label inti : higherGlobalRecv_[colouri]) for (const label inti : higherGlobalRecv_[colouri])
{ {
@ -890,7 +890,7 @@ void Foam::distributedDILUPreconditioner::precondition
// Store effect of exchanging rD to higher interfaces // Store effect of exchanging rD to higher interfaces
// in colourBufs_ // in colourBufs_
if (cellColourPtr_.valid()) if (cellColourPtr_)
{ {
sendGlobal sendGlobal
( (

View File

@ -145,7 +145,7 @@ Foam::label Foam::multiWorldConnections::createCommunicator(const edge& worlds)
// Fallback: do not create, just use local world // Fallback: do not create, just use local world
label comm = UPstream::worldComm; label comm = UPstream::worldComm;
if (!worlds.valid()) if (!worlds.good())
{ {
return comm; return comm;
} }
@ -299,7 +299,7 @@ bool Foam::multiWorldConnections::addConnectionById(const label otherWorld)
// The worlds (sorted) // The worlds (sorted)
edge worlds(worldPair(otherWorld)); edge worlds(worldPair(otherWorld));
if (!worlds.valid()) if (!worlds.good())
{ {
return false; return false;
} }
@ -318,7 +318,7 @@ bool Foam::multiWorldConnections::addConnectionByName(const word& otherWorld)
// The worlds (sorted) // The worlds (sorted)
edge worlds(worldPair(otherWorld)); edge worlds(worldPair(otherWorld));
if (!worlds.valid()) if (!worlds.good())
{ {
return false; return false;
} }
@ -343,7 +343,7 @@ Foam::label Foam::multiWorldConnections::getCommById
// The communication worlds (sorted) // The communication worlds (sorted)
edge worlds(worldPair(otherWorldID)); edge worlds(worldPair(otherWorldID));
if (!worlds.valid()) if (!worlds.good())
{ {
return comm; return comm;
} }
@ -384,7 +384,7 @@ Foam::label Foam::multiWorldConnections::getCommByName
// The communication worlds (sorted) // The communication worlds (sorted)
edge worlds(worldPair(otherWorld)); edge worlds(worldPair(otherWorld));
if (!worlds.valid()) if (!worlds.good())
{ {
return comm; return comm;
} }

View File

@ -206,7 +206,7 @@ Foam::searchableBox::searchableBox
searchableSurface(io), searchableSurface(io),
treeBoundBox(bb) treeBoundBox(bb)
{ {
if (!treeBoundBox::valid()) if (!treeBoundBox::good())
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Illegal bounding box specification : " << "Illegal bounding box specification : "
@ -229,7 +229,7 @@ Foam::searchableBox::searchableBox
{ {
readBoxDim(dict, *this); readBoxDim(dict, *this);
if (!treeBoundBox::valid()) if (!treeBoundBox::good())
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Illegal bounding box specification : " << "Illegal bounding box specification : "

View File

@ -860,7 +860,7 @@ bool Foam::searchableSphere::overlaps(const boundBox& bb) const
return bb.overlaps(origin_, sqr(radius())); return bb.overlaps(origin_, sqr(radius()));
} }
if (!bb.valid()) if (!bb.good())
{ {
return false; return false;
} }

View File

@ -1695,7 +1695,7 @@ Foam::triSurface Foam::triSurfaceTools::collapseEdges
f[1] = pointMap[f[1]]; f[1] = pointMap[f[1]];
f[2] = pointMap[f[2]]; f[2] = pointMap[f[2]];
if (f.valid()) if (f.good())
{ {
newTriangles[nNewTris++] = f; newTriangles[nNewTris++] = f;
} }
@ -1910,7 +1910,7 @@ Foam::triSurface Foam::triSurfaceTools::mergePoints
f[1] = pointMap[f[1]]; f[1] = pointMap[f[1]];
f[2] = pointMap[f[2]]; f[2] = pointMap[f[2]];
if (f.valid()) if (f.good())
{ {
newTriangles[nNewTris++] = f; newTriangles[nNewTris++] = f;
} }

View File

@ -265,7 +265,7 @@ bool objectiveManager::writeObjectives
obj.writeMeanValue(); obj.writeMeanValue();
} }
if (weigthedObjectiveFile_.valid()) if (weigthedObjectiveFile_)
{ {
unsigned int width = IOstream::defaultPrecision() + 5; unsigned int width = IOstream::defaultPrecision() + 5;
weigthedObjectiveFile_() weigthedObjectiveFile_()

View File

@ -128,7 +128,7 @@ Foam::shapeSensitivitiesBase::shapeSensitivitiesBase
) )
: :
meshShape_(mesh), meshShape_(mesh),
surfaceFieldSuffix_(word::null), surfaceFieldSuffix_(),
writeAllSurfaceFiles_ writeAllSurfaceFiles_
( (
dict.getOrDefault<bool> dict.getOrDefault<bool>

View File

@ -194,7 +194,7 @@ void Foam::optMeshMovement::resetDesignVariables()
bool Foam::optMeshMovement::maxAllowedDisplacementSet() const bool Foam::optMeshMovement::maxAllowedDisplacementSet() const
{ {
return maxAllowedDisplacement_.valid(); return bool(maxAllowedDisplacement_);
} }

View File

@ -2347,7 +2347,7 @@ void NURBS3DSurface::writeVTK
{ {
if (Pstream::master()) if (Pstream::master())
{ {
if (vtkFileName.ext() != word::null) if (vtkFileName.has_ext())
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Do not supply a file extension." << "Do not supply a file extension."

View File

@ -409,7 +409,7 @@ void Foam::adjointSimple::clearSensitivities()
Foam::sensitivity& Foam::adjointSimple::getSensitivityBase() Foam::sensitivity& Foam::adjointSimple::getSensitivityBase()
{ {
if (!adjointSensitivity_.valid()) if (!adjointSensitivity_)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Sensitivity object not allocated" << nl << "Sensitivity object not allocated" << nl

View File

@ -103,7 +103,7 @@ void Foam::sampledCuttingPlane::checkBoundsIntersection
// Verify specified bounding box // Verify specified bounding box
const boundBox& clipBb = isoParams_.getClipBounds(); const boundBox& clipBb = isoParams_.getClipBounds();
if (clipBb.valid()) if (clipBb.good())
{ {
// Bounding box does not overlap with (global) mesh! // Bounding box does not overlap with (global) mesh!
if (!clipBb.overlaps(meshBb)) if (!clipBb.overlaps(meshBb))
@ -419,7 +419,7 @@ void Foam::sampledCuttingPlane::createGeometry()
// the initial selection smaller. // the initial selection smaller.
const boundBox& clipBb = isoParams_.getClipBounds(); const boundBox& clipBb = isoParams_.getClipBounds();
if (clipBb.valid() && cellsToSelect.any()) if (clipBb.good() && cellsToSelect.any())
{ {
const auto& cellCentres = fvm.C(); const auto& cellCentres = fvm.C();

View File

@ -166,7 +166,7 @@ Foam::sampledPlane::sampledPlane
<< " origin:" << origin() << " origin:" << origin()
<< " normal:" << normal(); << " normal:" << normal();
if (bounds_.valid()) if (bounds_.good())
{ {
Info<< " bounds:" << bounds_; Info<< " bounds:" << bounds_;
} }

View File

@ -42,7 +42,7 @@ void Foam::cuttingPlane::checkOverlap
const plane& pln = *this; const plane& pln = *this;
// Plane does not intersect the user bounding box // Plane does not intersect the user bounding box
if (userBounds.valid() && !userBounds.intersects(pln)) if (userBounds.good() && !userBounds.intersects(pln))
{ {
WarningInFunction WarningInFunction
<< nl << callerName << nl << callerName

View File

@ -38,7 +38,7 @@ void Foam::cuttingSurfaceBase::checkOverlap
) )
{ {
// User bounding-box does not overlap with (global) mesh! // User bounding-box does not overlap with (global) mesh!
if (userBounds.valid() && !userBounds.overlaps(meshBounds)) if (userBounds.good() && !userBounds.overlaps(meshBounds))
{ {
WarningInFunction WarningInFunction
<< nl << callerName << nl << callerName

View File

@ -183,7 +183,7 @@ Foam::label Foam::isoSurfaceBase::blockCells
{ {
// Could warn about invalid... // Could warn about invalid...
} }
else if (bb.valid()) else if (bb.good())
{ {
const pointField& cc = mesh_.cellCentres(); const pointField& cc = mesh_.cellCentres();

View File

@ -815,7 +815,7 @@ Foam::triSurface Foam::isoSurfaceCell::stitchTriPoints
triPointReverseMap[rawPointi+2], triPointReverseMap[rawPointi+2],
0 0
); );
if (tri.valid()) if (tri.good())
{ {
newToOldTri.append(oldTriI); newToOldTri.append(oldTriI);
dynTris.append(tri); dynTris.append(tri);
@ -1300,7 +1300,7 @@ Foam::isoSurfaceCell::isoSurfaceCell
DynamicList<label> trimTriMap; DynamicList<label> trimTriMap;
// Trimmed to original point // Trimmed to original point
labelList trimTriPointMap; labelList trimTriPointMap;
if (getClipBounds().valid()) if (getClipBounds().good())
{ {
isoSurfacePoint::trimToBox isoSurfacePoint::trimToBox
( (
@ -1332,7 +1332,7 @@ Foam::isoSurfaceCell::isoSurfaceCell
<< " merged triangles." << endl; << " merged triangles." << endl;
} }
if (getClipBounds().valid()) if (getClipBounds().good())
{ {
// Adjust interpolatedPoints_ // Adjust interpolatedPoints_
inplaceRenumber(triPointMergeMap_, interpolatedPoints_); inplaceRenumber(triPointMergeMap_, interpolatedPoints_);

View File

@ -933,7 +933,7 @@ Foam::triSurface Foam::isoSurfacePoint::stitchTriPoints
); );
rawPointi += 3; rawPointi += 3;
if (tri.valid()) if (tri.good())
{ {
newToOldTri.append(oldTriI); newToOldTri.append(oldTriI);
dynTris.append(tri); dynTris.append(tri);
@ -1603,7 +1603,7 @@ Foam::isoSurfacePoint::isoSurfacePoint
DynamicList<label> trimTriMap; DynamicList<label> trimTriMap;
// Trimmed to original point // Trimmed to original point
labelList trimTriPointMap; labelList trimTriPointMap;
if (getClipBounds().valid()) if (getClipBounds().good())
{ {
trimToBox trimToBox
( (
@ -1636,7 +1636,7 @@ Foam::isoSurfacePoint::isoSurfacePoint
} }
if (getClipBounds().valid()) if (getClipBounds().good())
{ {
// Adjust interpolatedPoints_ // Adjust interpolatedPoints_
inplaceRenumber(triPointMergeMap_, interpolatedPoints_); inplaceRenumber(triPointMergeMap_, interpolatedPoints_);

View File

@ -211,7 +211,7 @@ void Foam::triSurface::checkTriangles(const bool verbose)
{ {
const labelledTri& f = (*this)[facei]; const labelledTri& f = (*this)[facei];
if (!f.valid()) if (!f.good())
{ {
// 'degenerate' triangle check // 'degenerate' triangle check
valid.unset(facei); valid.unset(facei);

View File

@ -65,7 +65,7 @@ bool Foam::triSurface::stitchTriangles
tri.region() tri.region()
); );
if (newTri.valid()) if (newTri.good())
{ {
operator[](newTriangleI++) = newTri; operator[](newTriangleI++) = newTri;
} }

View File

@ -512,7 +512,7 @@ const Foam::meshedSurfRef& Foam::surfaceWriter::adjustSurface() const
tmp<pointField> tpts; tmp<pointField> tpts;
if (geometryTransform_.valid()) if (geometryTransform_.good())
{ {
if (!geometryTransform_.R().is_identity()) if (!geometryTransform_.R().is_identity())
{ {
@ -688,7 +688,7 @@ Foam::tmp<Foam::Field<Type>> Foam::surfaceWriter::adjustFieldTemplate
if if
( (
(pTraits<Type>::rank != 0 && pTraits<Type>::nComponents > 1) (pTraits<Type>::rank != 0 && pTraits<Type>::nComponents > 1)
&& geometryTransform_.valid() && geometryTransform_.good()
&& !geometryTransform_.R().is_identity() && !geometryTransform_.R().is_identity()
) )
{ {

View File

@ -151,7 +151,7 @@ Foam::surfaceWriters::x3dWriter::x3dWriter
{ {
Info<< "X3D with colourMap '" << tableName << "' and range "; Info<< "X3D with colourMap '" << tableName << "' and range ";
if (range_.valid()) if (range_.good())
{ {
Info<< range_; Info<< range_;
} }
@ -288,7 +288,7 @@ Foam::fileName Foam::surfaceWriters::x3dWriter::writeTemplate
scalarMinMax range(range_); scalarMinMax range(range_);
if (!range.valid()) if (!range.good())
{ {
range = minMaxMag(values); range = minMaxMag(values);

View File

@ -148,7 +148,7 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
executionIndex_(0), executionIndex_(0),
thermalInertia_(false), thermalInertia_(false),
verbose_(false), verbose_(false),
prefix_(word::null) prefix_()
{ {
this->refValue() = Zero; this->refValue() = Zero;
this->refGrad() = Zero; this->refGrad() = Zero;

View File

@ -107,20 +107,18 @@ Foam::moleFractions<ThermoType>::moleFractions
calcMoleFractions(); calcMoleFractions();
} }
else else
{
if (phaseName_ != word::null)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Cannot find thermodynamics model of type " << "Cannot find thermodynamics model of type "
<< ThermoType::typeName << ThermoType::typeName;
<< " for phase " << phaseName_
<< exit(FatalError); if (!phaseName_.empty())
{
FatalError
<< " for phase " << phaseName_;
} }
FatalErrorInFunction FatalError << exit(FatalError);
<< "Cannot find thermodynamics model of type "
<< ThermoType::typeName
<< exit(FatalError);
} }
} }