ENH: use singleton method for accessing runtime selection
STYLE: use alias to mark partialFaceAreaWeightAMI deprecation after v2012
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -135,11 +135,11 @@ autoPtr<ATCModel> ATCModel::New
|
||||
{
|
||||
const word modelType(dict.get<word>("ATCModel"));
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
Info<< "ATCModel type " << modelType << endl;
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -152,7 +152,7 @@ autoPtr<ATCModel> ATCModel::New
|
||||
|
||||
return autoPtr<ATCModel>
|
||||
(
|
||||
cstrIter()(mesh, primalVars, adjointVars, dict)
|
||||
ctorPtr(mesh, primalVars, adjointVars, dict)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -93,9 +93,9 @@ autoPtr<zeroATCcells> zeroATCcells::New
|
||||
dict.getOrDefault<word>("maskType", "faceCells")
|
||||
);
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -106,7 +106,7 @@ autoPtr<zeroATCcells> zeroATCcells::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<zeroATCcells> (cstrIter()(mesh,dict));
|
||||
return autoPtr<zeroATCcells> (ctorPtr(mesh,dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -63,9 +63,9 @@ autoPtr<boundaryAdjointContribution> boundaryAdjointContribution::New
|
||||
const fvPatch& patch
|
||||
)
|
||||
{
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(simulationType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(simulationType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -78,7 +78,7 @@ autoPtr<boundaryAdjointContribution> boundaryAdjointContribution::New
|
||||
return
|
||||
autoPtr<boundaryAdjointContribution>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
managerName,
|
||||
adjointSolverName,
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -79,9 +79,9 @@ Foam::autoPtr<Foam::displacementMethod> Foam::displacementMethod::New
|
||||
|
||||
Info<< "displacementMethod type : " << solverType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(solverType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(solverType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -91,7 +91,7 @@ Foam::autoPtr<Foam::displacementMethod> Foam::displacementMethod::New
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
return autoPtr<displacementMethod>(cstrIter()(mesh, patchIDs));
|
||||
return autoPtr<displacementMethod>(ctorPtr(mesh, patchIDs));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2021 PCOpt/NTUA
|
||||
Copyright (C) 2013-2021 FOSS GP
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -146,9 +146,9 @@ autoPtr<objectiveManager> objectiveManager::New
|
||||
const word objectiveType(dict.get<word>("type"));
|
||||
const word managerType("objectiveManager" & objectiveType);
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(managerType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(managerType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -161,7 +161,7 @@ autoPtr<objectiveManager> objectiveManager::New
|
||||
|
||||
return autoPtr<objectiveManager>
|
||||
(
|
||||
cstrIter()(mesh, dict, adjointSolverName, primalSolverName)
|
||||
ctorPtr(mesh, dict, adjointSolverName, primalSolverName)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -106,9 +106,9 @@ autoPtr<objectiveIncompressible> objectiveIncompressible::New
|
||||
Info<< "Creating objective function : " << dict.dictName()
|
||||
<< " of type " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -121,7 +121,7 @@ autoPtr<objectiveIncompressible> objectiveIncompressible::New
|
||||
|
||||
return autoPtr<objectiveIncompressible>
|
||||
(
|
||||
cstrIter()(mesh, dict, adjointSolverName, primalSolverName)
|
||||
ctorPtr(mesh, dict, adjointSolverName, primalSolverName)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2020 PCOpt/NTUA
|
||||
Copyright (C) 2013-2020 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -211,9 +211,9 @@ autoPtr<objective> objective::New
|
||||
const word& primalSolverName
|
||||
)
|
||||
{
|
||||
auto cstrIter = objectiveConstructorTablePtr_->cfind(objectiveType);
|
||||
auto* ctorPtr = objectiveConstructorTable(objectiveType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -226,7 +226,7 @@ autoPtr<objective> objective::New
|
||||
|
||||
return autoPtr<objective>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
mesh,
|
||||
dict,
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2020 PCOpt/NTUA
|
||||
Copyright (C) 2013-2020 FOSS GP
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -81,9 +81,9 @@ autoPtr<adjointSensitivity> adjointSensitivity::New
|
||||
|
||||
Info<< "adjointSensitivity type : " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -96,7 +96,7 @@ autoPtr<adjointSensitivity> adjointSensitivity::New
|
||||
|
||||
return autoPtr<adjointSensitivity>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
mesh,
|
||||
dict,
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -106,9 +106,9 @@ Foam::autoPtr<Foam::lineSearch> Foam::lineSearch::New
|
||||
|
||||
if (modelType != "none")
|
||||
{
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -119,7 +119,7 @@ Foam::autoPtr<Foam::lineSearch> Foam::lineSearch::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
lineSrch.reset((cstrIter()(dict, time)).ptr());
|
||||
lineSrch.reset((ctorPtr(dict, time)).ptr());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -63,9 +63,9 @@ Foam::autoPtr<Foam::stepUpdate> Foam::stepUpdate::New(const dictionary& dict)
|
||||
|
||||
Info<< "stepUpdate type : " << type << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(type);
|
||||
auto* ctorPtr = dictionaryConstructorTable(type);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -76,7 +76,7 @@ Foam::autoPtr<Foam::stepUpdate> Foam::stepUpdate::New(const dictionary& dict)
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<stepUpdate>(cstrIter()(dict));
|
||||
return autoPtr<stepUpdate>(ctorPtr(dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -100,9 +100,9 @@ Foam::autoPtr<Foam::optMeshMovement> Foam::optMeshMovement::New
|
||||
|
||||
Info<< "optMeshMovement type : " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -113,7 +113,7 @@ Foam::autoPtr<Foam::optMeshMovement> Foam::optMeshMovement::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<optMeshMovement>(cstrIter()(mesh, dict, patchIDs));
|
||||
return autoPtr<optMeshMovement>(ctorPtr(mesh, dict, patchIDs));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -164,9 +164,9 @@ Foam::autoPtr<Foam::optimisationManager> Foam::optimisationManager::New
|
||||
|
||||
Info<< "optimisationManager type : " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -177,7 +177,7 @@ Foam::autoPtr<Foam::optimisationManager> Foam::optimisationManager::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<optimisationManager>(cstrIter()(mesh));
|
||||
return autoPtr<optimisationManager>(ctorPtr(mesh));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2020 PCOpt/NTUA
|
||||
Copyright (C) 2013-2020 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -134,9 +134,9 @@ autoPtr<optimisationType> optimisationType::New
|
||||
|
||||
Info<< "optimisationType type : " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -149,7 +149,7 @@ autoPtr<optimisationType> optimisationType::New
|
||||
|
||||
return autoPtr<optimisationType>
|
||||
(
|
||||
cstrIter()(mesh, dict, adjointSolverManagers)
|
||||
ctorPtr(mesh, dict, adjointSolverManagers)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -269,9 +269,9 @@ Foam::autoPtr<Foam::updateMethod> Foam::updateMethod::New
|
||||
|
||||
Info<< "updateMethod type : " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -282,7 +282,7 @@ Foam::autoPtr<Foam::updateMethod> Foam::updateMethod::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<updateMethod>(cstrIter()(mesh, dict));
|
||||
return autoPtr<updateMethod>(ctorPtr(mesh, dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2020 PCOpt/NTUA
|
||||
Copyright (C) 2013-2020 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -757,9 +757,9 @@ Foam::autoPtr<Foam::NURBS3DVolume> Foam::NURBS3DVolume::New
|
||||
|
||||
Info<< "NURBS3DVolume type : " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -770,7 +770,7 @@ Foam::autoPtr<Foam::NURBS3DVolume> Foam::NURBS3DVolume::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<NURBS3DVolume>(cstrIter()(dict, mesh, computeParamCoors));
|
||||
return autoPtr<NURBS3DVolume>(ctorPtr(dict, mesh, computeParamCoors));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 PCOpt/NTUA
|
||||
Copyright (C) 2020 FOSS GP
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -120,9 +121,9 @@ Foam::autoPtr<Foam::controlPointsDefinition> Foam::controlPointsDefinition::New
|
||||
|
||||
Info<< "controlPointsDefinition type : " << type << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(type);
|
||||
auto* ctorPtr = dictionaryConstructorTable(type);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -133,7 +134,7 @@ Foam::autoPtr<Foam::controlPointsDefinition> Foam::controlPointsDefinition::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<controlPointsDefinition>(cstrIter()(box));
|
||||
return autoPtr<controlPointsDefinition>(ctorPtr(box));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -85,9 +85,9 @@ Foam::autoPtr<Foam::adjointSolver> Foam::adjointSolver::New
|
||||
{
|
||||
const word solverType(dict.get<word>("type"));
|
||||
|
||||
auto cstrIter = adjointSolverConstructorTablePtr_->cfind(solverType);
|
||||
auto* ctorPtr = adjointSolverConstructorTable(solverType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -100,7 +100,7 @@ Foam::autoPtr<Foam::adjointSolver> Foam::adjointSolver::New
|
||||
|
||||
return autoPtr<adjointSolver>
|
||||
(
|
||||
cstrIter()(mesh, managerType, dict, primalSolverName)
|
||||
ctorPtr(mesh, managerType, dict, primalSolverName)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2020 PCOpt/NTUA
|
||||
Copyright (C) 2013-2020 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -78,9 +78,9 @@ Foam::incompressibleAdjointSolver::New
|
||||
)
|
||||
{
|
||||
const word solverType(dict.get<word>("solver"));
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(solverType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(solverType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -94,7 +94,7 @@ Foam::incompressibleAdjointSolver::New
|
||||
return
|
||||
autoPtr<incompressibleAdjointSolver>
|
||||
(
|
||||
cstrIter()(mesh, managerType, dict, primalSolverName)
|
||||
ctorPtr(mesh, managerType, dict, primalSolverName)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2020 PCOpt/NTUA
|
||||
Copyright (C) 2013-2020 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -83,9 +83,9 @@ Foam::incompressiblePrimalSolver::New
|
||||
)
|
||||
{
|
||||
const word solverType(dict.get<word>("solver"));
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(solverType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(solverType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -99,7 +99,7 @@ Foam::incompressiblePrimalSolver::New
|
||||
return
|
||||
autoPtr<incompressiblePrimalSolver>
|
||||
(
|
||||
cstrIter()(mesh, managerType, dict)
|
||||
ctorPtr(mesh, managerType, dict)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -64,9 +64,9 @@ Foam::autoPtr<Foam::primalSolver> Foam::primalSolver::New
|
||||
{
|
||||
const word solverType(dict.get<word>("type"));
|
||||
|
||||
auto cstrIter = primalSolverConstructorTablePtr_->cfind(solverType);
|
||||
auto* ctorPtr = primalSolverConstructorTable(solverType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -77,7 +77,7 @@ Foam::autoPtr<Foam::primalSolver> Foam::primalSolver::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<primalSolver>(cstrIter()(mesh, managerType, dict));
|
||||
return autoPtr<primalSolver>(ctorPtr(mesh, managerType, dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -67,9 +67,9 @@ Foam::autoPtr<Foam::SIMPLEControl> Foam::SIMPLEControl::New
|
||||
const solver& solver
|
||||
)
|
||||
{
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(managerType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(managerType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -79,7 +79,7 @@ Foam::autoPtr<Foam::SIMPLEControl> Foam::SIMPLEControl::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<SIMPLEControl>(cstrIter()(mesh, managerType, solver));
|
||||
return autoPtr<SIMPLEControl>(ctorPtr(mesh, managerType, solver));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -184,9 +184,9 @@ autoPtr<adjointRASModel> adjointRASModel::New
|
||||
|
||||
Info<< "Selecting adjointRAS turbulence model " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -199,7 +199,7 @@ autoPtr<adjointRASModel> adjointRASModel::New
|
||||
|
||||
return autoPtr<adjointRASModel>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
primalVars,
|
||||
adjointVars,
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -99,10 +99,9 @@ autoPtr<adjointTurbulenceModel> adjointTurbulenceModel::New
|
||||
|
||||
Info<< "Selecting turbulence model type " << modelType << endl;
|
||||
|
||||
auto cstrIter =
|
||||
adjointTurbulenceModelConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = adjointTurbulenceModelConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -114,7 +113,7 @@ autoPtr<adjointTurbulenceModel> adjointTurbulenceModel::New
|
||||
|
||||
return autoPtr<adjointTurbulenceModel>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
primalVars,
|
||||
adjointVars,
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -277,9 +277,9 @@ autoPtr<RASModelVariables> RASModelVariables::New
|
||||
|
||||
Info<< "Creating references for RASModel variables : " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -290,7 +290,7 @@ autoPtr<RASModelVariables> RASModelVariables::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<RASModelVariables>(cstrIter()(mesh, SolverControl));
|
||||
return autoPtr<RASModelVariables>(ctorPtr(mesh, SolverControl));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user