Commit df90d1ab authored by Mark Olesen's avatar Mark Olesen
Browse files

Merge commit 'OpenCFD/master' into olesenm

parents 5872f2a7 a7c5d31c
......@@ -52,7 +52,7 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
) << "Unknown PDRDragModel type "
<< PDRDragModelTypeName << endl << endl
<< "Valid PDRDragModels are : " << endl
<< dictionaryConstructorTablePtr_->toc()
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
......
......@@ -56,7 +56,7 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
) << "Unknown XiEqModel type "
<< XiEqModelTypeName << endl << endl
<< "Valid XiEqModels are : " << endl
<< dictionaryConstructorTablePtr_->toc()
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
......
......@@ -56,7 +56,7 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
) << "Unknown XiGModel type "
<< XiGModelTypeName << endl << endl
<< "Valid XiGModels are : " << endl
<< dictionaryConstructorTablePtr_->toc()
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
......
......@@ -54,7 +54,7 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
) << "Unknown XiModel type "
<< XiModelTypeName << endl << endl
<< "Valid XiModels are : " << endl
<< dictionaryConstructorTablePtr_->toc()
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
......
......@@ -70,7 +70,7 @@ Foam::phaseChangeTwoPhaseMixture::New
) << "Unknown phaseChangeTwoPhaseMixture type "
<< phaseChangeTwoPhaseMixtureTypeName << endl << endl
<< "Valid phaseChangeTwoPhaseMixtures are : " << endl
<< componentsConstructorTablePtr_->toc()
<< componentsConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
......
......@@ -57,7 +57,7 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
<< dragModelType
<< ", constructor not in hash table" << endl << endl
<< " Valid dragModel types are : " << endl;
Info << dictionaryConstructorTablePtr_->toc() << abort(FatalError);
Info << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
}
return cstrIter()(interfaceDict, alpha, phasea, phaseb);
......
......@@ -49,7 +49,7 @@ Foam::autoPtr<Foam::conductivityModel> Foam::conductivityModel::New
<< conductivityModelType
<< ", constructor not in hash table" << endl << endl
<< " Valid conductivityModelType types are :" << endl;
Info<< dictionaryConstructorTablePtr_->toc() << abort(FatalError);
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
}
return autoPtr<conductivityModel>(cstrIter()(dict));
......
......@@ -49,7 +49,7 @@ Foam::autoPtr<Foam::frictionalStressModel> Foam::frictionalStressModel::New
<< frictionalStressModelType
<< ", constructor not in hash table" << endl << endl
<< " Valid frictionalStressModelType types are :" << endl;
Info<< dictionaryConstructorTablePtr_->toc() << abort(FatalError);
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
}
return autoPtr<frictionalStressModel>(cstrIter()(dict));
......
......@@ -49,7 +49,7 @@ Foam::autoPtr<Foam::granularPressureModel> Foam::granularPressureModel::New
<< granularPressureModelType
<< ", constructor not in hash table" << endl << endl
<< " Valid granularPressureModelType types are :" << endl;
Info<< dictionaryConstructorTablePtr_->toc() << abort(FatalError);
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
}
return autoPtr<granularPressureModel>(cstrIter()(dict));
......
......@@ -49,7 +49,7 @@ Foam::autoPtr<Foam::radialModel> Foam::radialModel::New
<< radialModelType
<< ", constructor not in hash table" << endl << endl
<< " Valid radialModelType types are :" << endl;
Info<< dictionaryConstructorTablePtr_->toc() << abort(FatalError);
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
}
return autoPtr<radialModel>(cstrIter()(dict));
......
......@@ -50,7 +50,7 @@ Foam::kineticTheoryModels::viscosityModel::New
<< viscosityModelType
<< ", constructor not in hash table" << endl << endl
<< " Valid viscosityModelType types are :" << endl;
Info<< dictionaryConstructorTablePtr_->toc() << abort(FatalError);
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
}
return autoPtr<viscosityModel>(cstrIter()(dict));
......
......@@ -56,6 +56,7 @@ int main()
table1.erase("abs");
Info<< "\ntable1 toc: " << table1.toc() << endl;
Info<< "\ntable1 sortedToc: " << table1.sortedToc() << endl;
table1.printInfo(Info)
<< "table1 [" << table1.size() << "] " << endl;
forAllIter(HASHTABLE_CLASS<double>, table1, iter)
......
......@@ -107,7 +107,7 @@ autoPtr<curvedEdge> curvedEdge::New(const pointField& points, Istream& is)
FatalErrorIn("curvedEdge::New(const pointField&, Istream&)")
<< "Unknown curvedEdge type " << curvedEdgeType << endl << endl
<< "Valid curvedEdge types are" << endl
<< IstreamConstructorTablePtr_->toc()
<< IstreamConstructorTablePtr_->sortedToc()
<< abort(FatalError);
}
......
......@@ -47,7 +47,7 @@ Foam::autoPtr<Foam::extrudeModel> Foam::extrudeModel::New
<< extrudeModelType
<< ", constructor not in hash table" << nl << nl
<< " Valid extrudeModel types are :" << nl
<< dictionaryConstructorTablePtr_->toc() << nl
<< dictionaryConstructorTablePtr_->sortedToc() << nl
<< exit(FatalError);
}
......
......@@ -47,7 +47,7 @@ Foam::autoPtr<Foam::ODESolver> Foam::ODESolver::New
) << "Unknown ODESolver type "
<< ODESolverTypeName << endl << endl
<< "Valid ODESolvers are : " << endl
<< ODEConstructorTablePtr_->toc()
<< ODEConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
......
......@@ -231,7 +231,6 @@ Foam::HashTable<T, Key, Hash>::find
}
// Return the table of contents
template<class T, class Key, class Hash>
Foam::List<Key> Foam::HashTable<T, Key, Hash>::toc() const
{
......@@ -247,6 +246,16 @@ Foam::List<Key> Foam::HashTable<T, Key, Hash>::toc() const
}
template<class T, class Key, class Hash>
Foam::List<Key> Foam::HashTable<T, Key, Hash>::sortedToc() const
{
List<Key> sortedList = this->toc();
sort(sortedList);
return sortedList;
}
template<class T, class Key, class Hash>
bool Foam::HashTable<T, Key, Hash>::set
(
......
......@@ -198,6 +198,9 @@ public:
//- Return the table of contents
List<Key> toc() const;
//- Return the table of contents as a sorted list
List<Key> sortedToc() const;
//- Print information
Ostream& printInfo(Ostream&) const;
......
......@@ -67,7 +67,7 @@ Foam::autoPtr<Foam::token::compound> Foam::token::compound::New
FatalErrorIn("token::compound::New(const word&, Istream&)")
<< "Unknown compound type " << compoundType << nl << nl
<< "Valid compound types:" << endl
<< IstreamConstructorTablePtr_->toc()
<< IstreamConstructorTablePtr_->sortedToc()
<< abort(FatalError);
}
......
......@@ -89,7 +89,7 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
) << "Unknown function type "
<< functionType << nl << nl
<< "Valid functions are : " << nl
<< dictionaryConstructorTablePtr_->toc() << endl
<< dictionaryConstructorTablePtr_->sortedToc() << endl
<< exit(FatalError);
}
......
......@@ -55,7 +55,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
<< patchFieldType
<< endl << endl
<< "Valid patchField types are :" << endl
<< pointPatchConstructorTablePtr_->toc()
<< pointPatchConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
......@@ -111,7 +111,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
) << "Unknown patchField type " << patchFieldType
<< " for patch type " << p.type() << endl << endl
<< "Valid patchField types are :" << endl
<< dictionaryConstructorTablePtr_->toc()
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
}
}
......@@ -182,7 +182,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
) << "unknown patchTypefield type "
<< ptf.type() << endl << endl
<< "Valid patchField types are :" << endl
<< patchMapperConstructorTablePtr_->toc()
<< patchMapperConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment