Foam::autoPtr<Foam::radiation::absorptionEmissionModel>
Foam::radiation::absorptionEmissionModel::New
(
    const dictionary& dict,
    const fvMesh& mesh
)
{
    word absorptionEmissionModelType(dict.lookup("absorptionEmissionModel"));

    Info<< "Selecting absorptionEmissionModel "
        << absorptionEmissionModelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(absorptionEmissionModelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorIn
        (
            "absorptionEmissionModel::New(const dictionary&, const fvMesh&)"
        )   << "Unknown absorptionEmissionModelType type "
            << absorptionEmissionModelType
            << ", constructor not in hash table" << nl << nl
            << "    Valid absorptionEmissionModel types are :" << nl
            << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError);
    }

    return autoPtr<absorptionEmissionModel>(cstrIter()(dict, mesh));
}
Foam::autoPtr<Foam::kineticTheoryModels::packingLimitModel>
Foam::kineticTheoryModels::packingLimitModel::New
(
    const dictionary& dict,
    const kineticTheorySystem& kt
)
{
    word packingLimitModelType
    (
        dict.lookupOrDefault<word>("packingLimitModel", "constant")
    );

    Info<< "Selecting packingLimitModel "
        << packingLimitModelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(packingLimitModelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalError
            << "packingLimitModel::New(const dictionary&) : " << endl
            << "    unknown packingLimitModelType type "
            << packingLimitModelType
            << ", constructor not in hash table" << endl << endl
            << "    Valid packingLimitModelType types are :" << endl;
        Info<< dictionaryConstructorTablePtr_->sortedToc()
            << abort(FatalError);
    }

    return autoPtr<packingLimitModel>(cstrIter()(dict, kt));
}
示例#3
0
Foam::autoPtr<Foam::extrudeModel> Foam::extrudeModel::New
(
    const dictionary& dict
)
{
    const word modelType(dict.lookup("extrudeModel"));

    Info<< "Selecting extrudeModel " << modelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(modelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorIn
        (
            "extrudeModel::New(const dictionary&)"
        )   << "Unknown extrudeModel type "
            << modelType << nl << nl
            << "Valid extrudeModel types are :" << nl
            << dictionaryConstructorTablePtr_->sortedToc() << nl
            << exit(FatalError);
    }

    return autoPtr<extrudeModel>(cstrIter()(dict));
}
autoPtr<thermalBaffleModel> thermalBaffleModel::New
(
    const fvMesh& mesh,
    const dictionary& dict
)
{
    word modelType =
        dict.lookupOrDefault<word>("thermalBaffleModel", "thermalBaffle");

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(modelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {

        FatalErrorIn
        (
            "thermalBaffleModel::New(const fvMesh&, const dictionary&)"
        )   << "Unknown thermalBaffleModel type " << modelType
            << nl << nl
            <<  "Valid thermalBaffleModel types are:" << nl
            << dictionaryConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    return autoPtr<thermalBaffleModel>(cstrIter()(modelType, mesh, dict));
}
示例#5
0
Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::New
(
    const phaseSystem& fluid,
    const word& phaseName
)
{
    word phaseModelType(fluid.subDict(phaseName).lookup("type"));

    Info<< "Selecting phaseModel for "
        << phaseName << ": " << phaseModelType << endl;

    phaseSystemConstructorTable::iterator cstrIter =
        phaseSystemConstructorTablePtr_->find(phaseModelType);

    if (cstrIter == phaseSystemConstructorTablePtr_->end())
    {
        FatalErrorIn("phaseModel::New")
            << "Unknown phaseModelType type "
            << phaseModelType << endl << endl
            << "Valid phaseModel types are : " << endl
            << phaseSystemConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    return cstrIter()(fluid, phaseName);
}
示例#6
0
autoPtr<breakupModel> breakupModel::New
(
    const dictionary& dict,
    spray& sm
)
{
    word breakupModelType
    (
        dict.lookup("breakupModel")
    );

    Info<< "Selecting breakupModel "
         << breakupModelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(breakupModelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalError
            << "breakupModel::New(const dictionary&, const spray&) : " << nl
            << "    unknown breakupModelType type "
            << breakupModelType
            << ", constructor not in hash table" << endl << nl
            << "    Valid breakupModel types are :" << nl
            << dictionaryConstructorTablePtr_->sortedToc()
            << abort(FatalError);
    }

    return autoPtr<breakupModel>(cstrIter()(dict, sm));
}
Foam::autoPtr<Foam::wallBoilingModels::nucleationSiteModel>
Foam::wallBoilingModels::nucleationSiteModel::New
(
    const dictionary& dict
)
{
    word nucleationSiteModelType(dict.lookup("type"));

    Info<< "Selecting nucleationSiteModel: "
        << nucleationSiteModelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(nucleationSiteModelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorInFunction
            << "Unknown nucleationSiteModelType type "
            << nucleationSiteModelType << endl << endl
            << "Valid nucleationSiteModel types are : " << endl
            << dictionaryConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    return cstrIter()(dict);
}
Foam::autoPtr<Foam::granularPressureModel> Foam::granularPressureModel::New
(
    const dictionary& dict
)
{
    word granularPressureModelType(dict.lookup("granularPressureModel"));

    Info<< "Selecting granularPressureModel "
        << granularPressureModelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(granularPressureModelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalError
            << "granularPressureModel::New(const dictionary&) : " << endl
            << "    unknown granularPressureModelType type "
            << granularPressureModelType
            << ", constructor not in hash table" << endl << endl
            << "    Valid granularPressureModelType types are :" << endl;
        Info<< dictionaryConstructorTablePtr_->toc() << abort(FatalError);
    }

    return autoPtr<granularPressureModel>(cstrIter()(dict));
}
Foam::autoPtr<Foam::barotropicCompressibilityModel>
Foam::barotropicCompressibilityModel::New
(
    const dictionary& compressibilityProperties,
    const volScalarField& gamma
)
{
    word bcModelTypeName
    (
        compressibilityProperties.lookup("barotropicCompressibilityModel")
    );

    Info<< "Selecting compressibility model "
        << bcModelTypeName << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(bcModelTypeName);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorIn
        (
            "barotropicCompressibilityModel::New(const volScalarField&)"
        )   << "Unknown barotropicCompressibilityModel type "
            << bcModelTypeName << endl << endl
            << "Valid  barotropicCompressibilityModels are : " << endl
            << dictionaryConstructorTablePtr_->toc()
            << exit(FatalError);
    }

    return autoPtr<barotropicCompressibilityModel>
    (
        cstrIter()(compressibilityProperties, gamma)
    );
}
示例#10
0
Foam::autoPtr<Foam::topoSetSource> Foam::topoSetSource::New
(
    const word& topoSetSourceType,
    const polyMesh& mesh,
    const dictionary& dict
)
{
    wordConstructorTable::iterator cstrIter =
        wordConstructorTablePtr_->find(topoSetSourceType);

    if (cstrIter == wordConstructorTablePtr_->end())
    {
        FatalErrorIn
        (
            "topoSetSource::New(const word&, "
            "const polyMesh&, const dictionary&)"
        )   << "Unknown topoSetSource type " << topoSetSourceType
            << endl << endl
            << "Valid topoSetSource types : " << endl
            << wordConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    return autoPtr<topoSetSource>(cstrIter()(mesh, dict));
}
示例#11
0
Foam::autoPtr<Foam::topoSetSource> Foam::topoSetSource::New
(
    const word& topoSetSourceType,
    const polyMesh& mesh,
    Istream& is
)
{
    istreamConstructorTable::iterator cstrIter =
        istreamConstructorTablePtr_->find(topoSetSourceType);

    if (cstrIter == istreamConstructorTablePtr_->end())
    {
        FatalErrorIn
        (
            "topoSetSource::New(const word&, "
            "const polyMesh&, Istream&)"
        )   << "Unknown topoSetSource type " << topoSetSourceType
            << endl << endl
            << "Valid topoSetSource types : " << endl
            << istreamConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    return autoPtr<topoSetSource>(cstrIter()(mesh, is));
}
autoPtr<pointDistributions> pointDistributions::New
(
    const fvMesh& mesh,
    const dictionary& dict
)
{
    word pd( dict.lookup("pointDistribution") );

    pointDistributionsConstructorTable::iterator cstrIter =
            pointDistributionsConstructorTablePtr_->find( pd );

    if (cstrIter == pointDistributionsConstructorTablePtr_->end())
    {
        FatalErrorIn
        (
            "pointDistributions::New(const dictionary&)"
        )   << "Unknown point distribution: " << pd
            << endl << endl
            << "Valid methods are :" << endl
            << pointDistributionsConstructorTablePtr_->toc()
            << exit(FatalError);
    }

    return autoPtr<pointDistributions>(cstrIter()( mesh, dict));
}
示例#13
0
Foam::autoPtr<Foam::cellZone> Foam::cellZone::New
(
    const word& name,
    const dictionary& dict,
    const label index,
    const cellZoneMesh& zm
)
{
    if (debug)
    {
        Info<< "cellZone::New(const word&, const dictionary&, const label, "
               "const cellZoneMesh&) : constructing cellZone " << name
            << endl;
    }

    word zoneType(dict.lookup("type"));

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(zoneType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalIOErrorIn
        (
            "cellZone::New(const word&, const dictionary&, "
            "const label, const cellZoneMesh&)",
            dict
        )   << "Unknown cellZone type " << zoneType << endl << endl
            << "Valid cellZone types are :" << endl
            << dictionaryConstructorTablePtr_->sortedToc()
            << exit(FatalIOError);
    }

    return autoPtr<cellZone>(cstrIter()(name, dict, index, zm));
}
Foam::autoPtr<Foam::thermophysicalFunction> Foam::thermophysicalFunction::New
(
    const dictionary& dict
)
{
    if (debug)
    {
        InfoInFunction
            << "Constructing thermophysicalFunction"
            << endl;
    }

    const word thermophysicalFunctionType(dict.lookup("functionType"));

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(thermophysicalFunctionType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorInFunction
            << "Unknown thermophysicalFunction type "
            << thermophysicalFunctionType
            << nl << nl
            << "Valid thermophysicalFunction types are :" << endl
            << dictionaryConstructorTablePtr_->sortedToc()
            << abort(FatalError);
    }

    return autoPtr<thermophysicalFunction>(cstrIter()(dict));
}
Foam::autoPtr<Foam::solidBodyMotionFunction> Foam::solidBodyMotionFunction::New
(
    const dictionary& SBMFCoeffs,
    const Time& runTime
)
{
    const word motionType(SBMFCoeffs.lookup("solidBodyMotionFunction"));

    Info<< "Selecting solid-body motion function " << motionType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(motionType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorInFunction
            << "Unknown solidBodyMotionFunction type "
            << motionType << nl << nl
            << "Valid solidBodyMotionFunctions are : " << endl
            << dictionaryConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    return autoPtr<solidBodyMotionFunction>(cstrIter()(SBMFCoeffs, runTime));
}
示例#16
0
Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
(
    const dictionary& interfaceDict,
    const volScalarField& alpha,
    const phaseModel& phase1,
    const phaseModel& phase2
)
{
    word heatTransferModelType
    (
        interfaceDict.lookup("heatTransferModel" + phase1.name())
    );

    Info<< "Selecting heatTransferModel for phase "
        << phase1.name()
        << ": "
        << heatTransferModelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(heatTransferModelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorIn("heatTransferModel::New")
            << "Unknown heatTransferModelType type "
            << heatTransferModelType << endl << endl
            << "Valid heatTransferModel types are : " << endl
            << dictionaryConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    return cstrIter()(interfaceDict, alpha, phase1, phase2);
}
autoPtr<filmTurbulenceModel> filmTurbulenceModel::New
(
    surfaceFilmModel& model,
    const dictionary& dict
)
{
    const word modelType(dict.lookup("turbulence"));

    Info<< "    Selecting filmTurbulenceModel " << modelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(modelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorIn
        (
            "filmTurbulenceModel::New"
            "("
                "surfaceFilmModel&, "
                "const dictionary&"
            ")"
        )   << "Unknown filmTurbulenceModel type " << modelType
            << nl << nl << "Valid filmTurbulenceModel types are:" << nl
            << dictionaryConstructorTablePtr_->toc()
            << exit(FatalError);
    }

    return autoPtr<filmTurbulenceModel>(cstrIter()(model, dict));
}
示例#18
0
autoPtr<injectionModel> injectionModel::New
(
    const surfaceFilmModel& model,
    const dictionary& dict,
    const word& modelType
)
{
    Info<< "        " << modelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(modelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorIn
        (
            "injectionModel::New(const surfaceFilmModel&, const dictionary&)"
        )   << "Unknown injectionModel type " << modelType
            << nl << nl << "Valid injectionModel types are:" << nl
            << dictionaryConstructorTablePtr_->toc()
            << exit(FatalError);
    }

    return autoPtr<injectionModel>(cstrIter()(model, dict));
}
Foam::autoPtr<Foam::sixDoFRigidBodyMotionRestraint>
Foam::sixDoFRigidBodyMotionRestraint::New(const dictionary& sDoFRBMRDict)
{
    word sixDoFRigidBodyMotionRestraintTypeName =
        sDoFRBMRDict.lookup("sixDoFRigidBodyMotionRestraint");

    // Info<< "Selecting sixDoFRigidBodyMotionRestraint function "
    //     << sixDoFRigidBodyMotionRestraintTypeName << endl;

    dictionaryConstructorTable::iterator cstrIter =
    dictionaryConstructorTablePtr_->find
    (
        sixDoFRigidBodyMotionRestraintTypeName
    );

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorIn
        (
            "sixDoFRigidBodyMotionRestraint::New"
            "("
                "const dictionary& sDoFRBMRDict"
            ")"
        )   << "Unknown sixDoFRigidBodyMotionRestraint type "
            << sixDoFRigidBodyMotionRestraintTypeName << endl << endl
            << "Valid  sixDoFRigidBodyMotionRestraints are : " << endl
            << dictionaryConstructorTablePtr_->toc()
            << exit(FatalError);
    }

    return autoPtr<sixDoFRigidBodyMotionRestraint>(cstrIter()(sDoFRBMRDict));
}
Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New
(
    const dictionary& combustionProperties,
    const hsCombustionThermo& thermo,
    const compressible::turbulenceModel& turbulence,
    const surfaceScalarField& phi,
    const volScalarField& rho
)
{
    word combustionModelTypeName = combustionProperties.lookup
                                   (
                                       "combustionModel"
                                   );

    Info<< "Selecting combustion model " << combustionModelTypeName << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(combustionModelTypeName);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorIn
        (
            "combustionModel::New"
        )   << "Unknown combustionModel type "
            << combustionModelTypeName << endl << endl
            << "Valid  combustionModels are : " << endl
            << dictionaryConstructorTablePtr_->toc()
            << exit(FatalError);
    }

    return autoPtr<combustionModel>
           (cstrIter()(combustionProperties, thermo, turbulence, phi, rho));
}
autoPtr<wallModel> wallModel::New
(
    const dictionary& dict,
    const volVectorField& U,
    spray& sm
)
{
    word wallModelType
    (
        dict.lookup("wallModel")
    );

    Info<< "Selecting wallModel "
         << wallModelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(wallModelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalError
            << "wallModel::New(const dictionary&, const spray&) : " << endl
            << "    unknown wallModelType type "
            << wallModelType
            << ", constructor not in hash table" << endl << endl
            << "    Valid wallModel types are :" << endl;
        Info<< dictionaryConstructorTablePtr_->toc() << abort(FatalError);
    }

    return autoPtr<wallModel>(cstrIter()(dict, U, sm));
}
示例#22
0
Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
(
    const dictionary& propDict,
    const psiuReactionThermo& thermo,
    const compressible::RASModel& turbulence,
    const volScalarField& Su
)
{
    const word modelType(propDict.lookup("XiGModel"));

    Info<< "Selecting flame-wrinkling model " << modelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(modelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorIn
        (
            "XiGModel::New"
            "("
            "    const psiuReactionThermo& thermo,"
            "    const compressible::RASModel& turbulence,"
            "    const volScalarField& Su"
            ")"
        )   << "Unknown XiGModel type "
            << modelType << nl << nl
            << "Valid XiGModels are : " << endl
            << dictionaryConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    return autoPtr<XiGModel>(cstrIter()(propDict, thermo, turbulence, Su));
}
Foam::autoPtr<Foam::lduInterface> Foam::lduInterface::New
(
    const dictionary& dict,
    const label index
)
{
    word patchType(dict.lookup("type"));

    if (debug)
    {
        InfoInFunction << "Constructing lduInterface " << patchType << endl;
    }

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(patchType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalIOErrorInFunction
        (
            dict
        )   << "Unknown lduInterface type "
            << patchType << nl << nl
            << "Valid lduInterface types are :" << endl
            << dictionaryConstructorTablePtr_->sortedToc()
            << exit(FatalIOError);
    }

    return autoPtr<lduInterface>(cstrIter()(dict, index));
}
示例#24
0
Foam::autoPtr<Foam::coordinateSystem> Foam::coordinateSystem::New
(
    const word& coordType,
    const word& name,
    const point& origin,
    const coordinateRotation& cr
)
{
    if (debug)
    {
        Pout<< "coordinateSystem::New(const word&, const word&, "
            << "const point&, const coordinateRotation&) : "
               "constructing coordinateSystem"
            << endl;
    }

    origRotationConstructorTable::iterator cstrIter =
        origRotationConstructorTablePtr_->find(coordType);

    if (cstrIter == origRotationConstructorTablePtr_->end())
    {
        FatalErrorIn
        (
            "coordinateSystem::New(const word&, const word&, "
            "const point&, const coordinateRotation&) : "
            "constructing coordinateSystem"
        )   << "Unknown coordinateSystem type " << coordType << nl << nl
            << "Valid coordinateSystem types are :" << nl
            << origRotationConstructorTablePtr_->toc()
            << exit(FatalError);
    }

    return autoPtr<coordinateSystem>(cstrIter()(name, origin, cr));
}
autoPtr<pyrolysisModel> pyrolysisModel::New(const fvMesh& mesh)
{
    // get model name, but do not register the dictionary
    const word modelType
    (
        IOdictionary
        (
            IOobject
            (
                "pyrolysisProperties",
                mesh.time().constant(),
                mesh,
                IOobject::MUST_READ,
                IOobject::NO_WRITE,
                false
            )
        ).lookup("pyrolysisModel")
    );

    Info<< "Selecting pyrolysisModel " << modelType << endl;

    meshConstructorTable::iterator cstrIter =
        meshConstructorTablePtr_->find(modelType);

    if (cstrIter == meshConstructorTablePtr_->end())
    {
        FatalErrorIn("pyrolysisModel::New(const fvMesh&)")
            << "Unknown pyrolysisModel type " << modelType
            << nl << nl << "Valid pyrolisisModel types are:" << nl
            << meshConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    return autoPtr<pyrolysisModel>(cstrIter()(modelType, mesh));
}
Foam::autoPtr<Foam::solarLoad::solarLoadScatterModel> Foam::solarLoad::solarLoadScatterModel::New
(
    const dictionary& dict,
    const fvMesh& mesh
)
{
    const word modelType(dict.lookup("solarLoadScatterModel"));

    Info<< "Selecting solarLoadScatterModel " << modelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(modelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorIn
        (
            "solarLoadScatterModel::New(const dictionary&, const fvMesh&)"
        )   << "Unknown solarLoadScatterModel type "
            << modelType << nl << nl
            << "Valid solarLoadScatterModel types are :" << nl
            << dictionaryConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    return autoPtr<solarLoadScatterModel>(cstrIter()(dict, mesh));
}
示例#27
0
Foam::autoPtr<Foam::kineticTheoryModels::viscosityModel>
Foam::kineticTheoryModels::viscosityModel::New
(
    const dictionary& dict
)
{
    word viscosityModelType(dict.lookup("viscosityModel"));

    Info<< "Selecting viscosityModel "
        << viscosityModelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(viscosityModelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalError
            << "viscosityModel::New(const dictionary&) : " << endl
            << "    unknown viscosityModelType type "
            << viscosityModelType
            << ", constructor not in hash table" << endl << endl
            << "    Valid viscosityModelType types are :" << endl;
        Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
    }

    return autoPtr<viscosityModel>(cstrIter()(dict));
}
autoPtr<polyMappingModel> polyMappingModel::New
(
    polyMoleculeCloud& molCloud,
    const dictionary& dict
)
{
    word polyMappingModelName
    (
        dict.lookup("model")
    );

    Info<< "Selecting model "
         << polyMappingModelName << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(polyMappingModelName);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalError
            << "polyMappingModel::New(const dictionary&) : " << endl
            << "    unknown molsToDeleteModel type "
            << polyMappingModelName
            << ", constructor not in hash table" << endl << endl
            << "    Valid types are :" << endl;
        Info<< dictionaryConstructorTablePtr_->toc() << abort(FatalError);
    }

    return autoPtr<polyMappingModel>
	(
		cstrIter()(molCloud, dict)
	);
}
autoPtr<IOModel> IOModel::New
(
    const dictionary& dict,
    cfdemCloud& sm
)
{
    word IOModelType
    (
        dict.lookup("IOModel")
    );

    Info<< "Selecting IOModel "
         << IOModelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(IOModelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalError
            << "IOModel::New(const dictionary&, const spray&) : "
            << endl
            << "    unknown IOModelType type "
            << IOModelType
            << ", constructor not in hash table" << endl << endl
            << "    Valid IOModel types are :"
            << endl;
        Info<< dictionaryConstructorTablePtr_->toc()
            << abort(FatalError);
    }

    return autoPtr<IOModel>(cstrIter()(dict,sm));
}
Foam::autoPtr<Foam::interfaceCompositionModel>
Foam::interfaceCompositionModel::New
(
    const dictionary& dict,
    const phasePair& pair
)
{
    word interfaceCompositionModelType
    (
        word(dict.lookup("type"))
      + "<"
      + pair.phase1().thermo().type()
      + ","
      + pair.phase2().thermo().type()
      + ">"
    );

    Info<< "Selecting interfaceCompositionModel for "
        << pair << ": " << interfaceCompositionModelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(interfaceCompositionModelType);

    if (cstrIter == dictionaryConstructorTablePtr_->end())
    {
        FatalErrorInFunction
            << "Unknown interfaceCompositionModelType type "
            << interfaceCompositionModelType << endl << endl
            << "Valid interfaceCompositionModel types are : " << endl
            << dictionaryConstructorTablePtr_->sortedToc()
            << exit(FatalError);
    }

    return cstrIter()(dict, pair);
}