mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use singleton method for accessing runtime selection
STYLE: use alias to mark partialFaceAreaWeightAMI deprecation after v2012
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -39,9 +39,9 @@ Foam::autoPtr<Foam::ODESolver> Foam::ODESolver::New
|
||||
const word solverType(dict.get<word>("solver"));
|
||||
Info<< "Selecting ODE solver " << solverType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(solverType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(solverType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -52,7 +52,7 @@ Foam::autoPtr<Foam::ODESolver> Foam::ODESolver::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<ODESolver>(cstrIter()(odes, dict));
|
||||
return autoPtr<ODESolver>(ctorPtr(odes, dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -58,9 +58,9 @@ Foam::autoPtr<Foam::token::compound> Foam::token::compound::New
|
||||
Istream& is
|
||||
)
|
||||
{
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(compoundType);
|
||||
auto* ctorPtr = IstreamConstructorTable(compoundType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -71,7 +71,7 @@ Foam::autoPtr<Foam::token::compound> Foam::token::compound::New
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<Foam::token::compound>(cstrIter()(is));
|
||||
return autoPtr<Foam::token::compound>(ctorPtr(is));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -100,10 +100,10 @@ bool Foam::functionEntry::execute
|
||||
return true;
|
||||
}
|
||||
|
||||
auto mfIter =
|
||||
executedictionaryIstreamMemberFunctionTablePtr_->cfind(functionName);
|
||||
auto* mfuncPtr =
|
||||
executedictionaryIstreamMemberFunctionTable(functionName);
|
||||
|
||||
if (!mfIter.found())
|
||||
if (!mfuncPtr)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown functionEntry '" << functionName
|
||||
@ -114,7 +114,7 @@ bool Foam::functionEntry::execute
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return mfIter()(parentDict, is);
|
||||
return mfuncPtr(parentDict, is);
|
||||
}
|
||||
|
||||
|
||||
@ -139,13 +139,10 @@ bool Foam::functionEntry::execute
|
||||
return true;
|
||||
}
|
||||
|
||||
auto mfIter =
|
||||
executeprimitiveEntryIstreamMemberFunctionTablePtr_->cfind
|
||||
(
|
||||
functionName
|
||||
);
|
||||
auto* mfuncPtr =
|
||||
executeprimitiveEntryIstreamMemberFunctionTable(functionName);
|
||||
|
||||
if (!mfIter.found())
|
||||
if (!mfuncPtr)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown functionEntry '" << functionName
|
||||
@ -156,7 +153,7 @@ bool Foam::functionEntry::execute
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return mfIter()(parentDict, entry, is);
|
||||
return mfuncPtr(parentDict, entry, is);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -108,9 +108,9 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(functionType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(functionType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
// FatalError (not FatalIOError) to ensure it can be caught
|
||||
// as an exception and ignored
|
||||
@ -122,7 +122,7 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<functionObject>(cstrIter()(name, runTime, dict));
|
||||
return autoPtr<functionObject>(ctorPtr(name, runTime, dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Original code Copyright (C) 2014-2018 Bernhard Gschaider
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -119,9 +119,9 @@ Foam::exprTools::expressionEntry::New
|
||||
const word& name
|
||||
)
|
||||
{
|
||||
auto cstrIter = emptyConstructorTablePtr_->cfind(name);
|
||||
auto* ctorPtr = emptyConstructorTable(name);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -131,7 +131,7 @@ Foam::exprTools::expressionEntry::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<expressionEntry>(cstrIter()());
|
||||
return autoPtr<expressionEntry>(ctorPtr());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -314,9 +314,9 @@ Foam::expressions::exprResult::New
|
||||
|
||||
if (dict.getOrDefault("unsetValue", false))
|
||||
{
|
||||
auto cstrIter = emptyConstructorTablePtr_->cfind(resultType);
|
||||
auto* ctorPtr = emptyConstructorTable(resultType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -330,13 +330,13 @@ Foam::expressions::exprResult::New
|
||||
DebugInfo
|
||||
<< "Creating unset result of type " << resultType << nl;
|
||||
|
||||
return autoPtr<exprResult>(cstrIter()());
|
||||
return autoPtr<exprResult>(ctorPtr());
|
||||
}
|
||||
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(resultType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(resultType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -350,7 +350,7 @@ Foam::expressions::exprResult::New
|
||||
DebugInfo
|
||||
<< "Creating result of type " << resultType << nl;
|
||||
|
||||
return autoPtr<exprResult>(cstrIter()(dict));
|
||||
return autoPtr<exprResult>(ctorPtr(dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -93,14 +94,13 @@ Foam::pointPatchField<Type>::NewCalculatedType
|
||||
const pointPatchField<Type2>& pf
|
||||
)
|
||||
{
|
||||
auto patchTypeCstrIter =
|
||||
pointPatchConstructorTablePtr_->cfind(pf.patch().type());
|
||||
auto* patchTypeCtor = pointPatchConstructorTable(pf.patch().type());
|
||||
|
||||
if (patchTypeCstrIter.found())
|
||||
if (patchTypeCtor)
|
||||
{
|
||||
return autoPtr<pointPatchField<Type>>
|
||||
(
|
||||
patchTypeCstrIter()
|
||||
patchTypeCtor
|
||||
(
|
||||
pf.patch(),
|
||||
Field<Type>::null()
|
||||
|
||||
@ -39,9 +39,9 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
{
|
||||
DebugInFunction << "Constructing pointPatchField<Type>" << endl;
|
||||
|
||||
auto cstrIter = pointPatchConstructorTablePtr_->cfind(patchFieldType);
|
||||
auto* ctorPtr = pointPatchConstructorTable(patchFieldType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -51,7 +51,7 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
autoPtr<pointPatchField<Type>> pfPtr(cstrIter()(p, iF));
|
||||
autoPtr<pointPatchField<Type>> pfPtr(ctorPtr(p, iF));
|
||||
|
||||
if
|
||||
(
|
||||
@ -64,10 +64,9 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
// Incompatible (constraint-wise) with the patch type
|
||||
// - use default constraint type
|
||||
|
||||
auto patchTypeCstrIter =
|
||||
pointPatchConstructorTablePtr_->cfind(p.type());
|
||||
auto* patchTypeCtor = pointPatchConstructorTable(p.type());
|
||||
|
||||
if (!patchTypeCstrIter.found())
|
||||
if (!patchTypeCtor)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Inconsistent patch and patchField types for\n"
|
||||
@ -76,7 +75,7 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return patchTypeCstrIter()(p, iF);
|
||||
return patchTypeCtor(p, iF);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -115,16 +114,16 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
|
||||
const word patchFieldType(dict.get<word>("type"));
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchFieldType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(patchFieldType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
if (!disallowGenericPointPatchField)
|
||||
{
|
||||
cstrIter = dictionaryConstructorTablePtr_->cfind("generic");
|
||||
ctorPtr = dictionaryConstructorTable("generic");
|
||||
}
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Unknown patchField type " << patchFieldType
|
||||
@ -136,7 +135,7 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
}
|
||||
|
||||
// Construct (but not necessarily returned)
|
||||
autoPtr<pointPatchField<Type>> pfPtr(cstrIter()(p, iF, dict));
|
||||
autoPtr<pointPatchField<Type>> pfPtr(ctorPtr(p, iF, dict));
|
||||
|
||||
if
|
||||
(
|
||||
@ -149,10 +148,9 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
// Incompatible (constraint-wise) with the patch type
|
||||
// - use default constraint type
|
||||
|
||||
auto patchTypeCstrIter =
|
||||
dictionaryConstructorTablePtr_->cfind(p.type());
|
||||
auto* patchTypeCtor = dictionaryConstructorTable(p.type());
|
||||
|
||||
if (!patchTypeCstrIter.found())
|
||||
if (!patchTypeCtor)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Inconsistent patch and patchField types for\n"
|
||||
@ -161,7 +159,7 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
return patchTypeCstrIter()(p, iF, dict);
|
||||
return patchTypeCtor(p, iF, dict);
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,9 +178,9 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
{
|
||||
DebugInFunction << "Constructing pointPatchField<Type>" << endl;
|
||||
|
||||
auto cstrIter = patchMapperConstructorTablePtr_->cfind(ptf.type());
|
||||
auto* ctorPtr = patchMapperConstructorTable(ptf.type());
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -192,7 +190,7 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(ptf, p, iF, pfMapper);
|
||||
return ctorPtr(ptf, p, iF, pfMapper);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -711,9 +711,9 @@ Foam::fileOperation::New
|
||||
DebugInFunction
|
||||
<< "Constructing fileHandler" << endl;
|
||||
|
||||
auto cstrIter = wordConstructorTablePtr_->cfind(handlerType);
|
||||
auto* ctorPtr = wordConstructorTable(handlerType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -723,7 +723,7 @@ Foam::fileOperation::New
|
||||
) << abort(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<fileOperation>(cstrIter()(verbose));
|
||||
return autoPtr<fileOperation>(ctorPtr(verbose));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -85,9 +85,9 @@ Foam::fileOperations::fileOperationInitialise::New
|
||||
{
|
||||
DebugInFunction << "Constructing fileOperationInitialise" << endl;
|
||||
|
||||
auto cstrIter = wordConstructorTablePtr_->cfind(type);
|
||||
auto* ctorPtr = wordConstructorTable(type);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -97,7 +97,7 @@ Foam::fileOperations::fileOperationInitialise::New
|
||||
) << abort(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<fileOperationInitialise>(cstrIter()(argc, argv));
|
||||
return autoPtr<fileOperationInitialise>(ctorPtr(argc, argv));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -219,9 +219,9 @@ Foam::autoPtr<Foam::graph::writer> Foam::graph::writer::New
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
auto cstrIter = wordConstructorTablePtr_->cfind(graphFormat);
|
||||
auto* ctorPtr = wordConstructorTable(graphFormat);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -231,7 +231,7 @@ Foam::autoPtr<Foam::graph::writer> Foam::graph::writer::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<graph::writer>(cstrIter()());
|
||||
return autoPtr<graph::writer>(ctorPtr());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -42,9 +42,9 @@ Foam::autoPtr<Foam::tableReader<Type>> Foam::tableReader<Type>::New
|
||||
"openFoam"
|
||||
);
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(readerType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(readerType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -55,7 +55,7 @@ Foam::autoPtr<Foam::tableReader<Type>> Foam::tableReader<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<tableReader<Type>>(cstrIter()(spec));
|
||||
return autoPtr<tableReader<Type>>(ctorPtr(spec));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -57,9 +57,9 @@ Foam::autoPtr<Foam::interpolationWeights> Foam::interpolationWeights::New
|
||||
{
|
||||
DebugInFunction << "Selecting interpolationWeights " << type << endl;
|
||||
|
||||
auto cstrIter = wordConstructorTablePtr_->cfind(type);
|
||||
auto* ctorPtr = wordConstructorTable(type);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -69,7 +69,7 @@ Foam::autoPtr<Foam::interpolationWeights> Foam::interpolationWeights::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<interpolationWeights>(cstrIter()(samples));
|
||||
return autoPtr<interpolationWeights>(ctorPtr(samples));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -45,10 +45,9 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New
|
||||
|
||||
if (sol.matrix().symmetric())
|
||||
{
|
||||
auto cstrIter =
|
||||
symMatrixConstructorTablePtr_->cfind(preconditionerName);
|
||||
auto* ctorPtr = symMatrixConstructorTable(preconditionerName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -61,7 +60,7 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New
|
||||
|
||||
return autoPtr<typename LduMatrix<Type, DType, LUType>::preconditioner>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
sol,
|
||||
preconditionerDict
|
||||
@ -70,10 +69,9 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New
|
||||
}
|
||||
else if (sol.matrix().asymmetric())
|
||||
{
|
||||
auto cstrIter =
|
||||
asymMatrixConstructorTablePtr_->cfind(preconditionerName);
|
||||
auto* ctorPtr = asymMatrixConstructorTable(preconditionerName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -86,7 +84,7 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New
|
||||
|
||||
return autoPtr<typename LduMatrix<Type, DType, LUType>::preconditioner>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
sol,
|
||||
preconditionerDict
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -43,9 +43,9 @@ Foam::LduMatrix<Type, DType, LUType>::smoother::New
|
||||
|
||||
if (matrix.symmetric())
|
||||
{
|
||||
auto cstrIter = symMatrixConstructorTablePtr_->cfind(smootherName);
|
||||
auto* ctorPtr = symMatrixConstructorTable(smootherName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -58,7 +58,7 @@ Foam::LduMatrix<Type, DType, LUType>::smoother::New
|
||||
|
||||
return autoPtr<typename LduMatrix<Type, DType, LUType>::smoother>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
fieldName,
|
||||
matrix
|
||||
@ -67,9 +67,9 @@ Foam::LduMatrix<Type, DType, LUType>::smoother::New
|
||||
}
|
||||
else if (matrix.asymmetric())
|
||||
{
|
||||
auto cstrIter = asymMatrixConstructorTablePtr_->cfind(smootherName);
|
||||
auto* ctorPtr = asymMatrixConstructorTable(smootherName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -82,7 +82,7 @@ Foam::LduMatrix<Type, DType, LUType>::smoother::New
|
||||
|
||||
return autoPtr<typename LduMatrix<Type, DType, LUType>::smoother>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
fieldName,
|
||||
matrix
|
||||
|
||||
@ -56,9 +56,9 @@ Foam::LduMatrix<Type, DType, LUType>::solver::New
|
||||
}
|
||||
else if (matrix.symmetric())
|
||||
{
|
||||
auto cstrIter = symMatrixConstructorTablePtr_->cfind(solverName);
|
||||
auto* ctorPtr = symMatrixConstructorTable(solverName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -71,7 +71,7 @@ Foam::LduMatrix<Type, DType, LUType>::solver::New
|
||||
|
||||
return autoPtr<typename LduMatrix<Type, DType, LUType>::solver>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
fieldName,
|
||||
matrix,
|
||||
@ -81,9 +81,9 @@ Foam::LduMatrix<Type, DType, LUType>::solver::New
|
||||
}
|
||||
else if (matrix.asymmetric())
|
||||
{
|
||||
auto cstrIter = asymMatrixConstructorTablePtr_->cfind(solverName);
|
||||
auto* ctorPtr = asymMatrixConstructorTable(solverName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -96,7 +96,7 @@ Foam::LduMatrix<Type, DType, LUType>::solver::New
|
||||
|
||||
return autoPtr<typename LduMatrix<Type, DType, LUType>::solver>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
fieldName,
|
||||
matrix,
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -90,9 +90,9 @@ Foam::lduMatrix::preconditioner::New
|
||||
|
||||
if (sol.matrix().symmetric())
|
||||
{
|
||||
auto cstrIter = symMatrixConstructorTablePtr_->cfind(name);
|
||||
auto* ctorPtr = symMatrixConstructorTable(name);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -105,7 +105,7 @@ Foam::lduMatrix::preconditioner::New
|
||||
|
||||
return autoPtr<lduMatrix::preconditioner>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
sol,
|
||||
controls
|
||||
@ -114,9 +114,9 @@ Foam::lduMatrix::preconditioner::New
|
||||
}
|
||||
else if (sol.matrix().asymmetric())
|
||||
{
|
||||
auto cstrIter = asymMatrixConstructorTablePtr_->cfind(name);
|
||||
auto* ctorPtr = asymMatrixConstructorTable(name);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -129,7 +129,7 @@ Foam::lduMatrix::preconditioner::New
|
||||
|
||||
return autoPtr<lduMatrix::preconditioner>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
sol,
|
||||
controls
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -93,9 +93,9 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New
|
||||
|
||||
if (matrix.symmetric())
|
||||
{
|
||||
auto cstrIter = symMatrixConstructorTablePtr_->cfind(name);
|
||||
auto* ctorPtr = symMatrixConstructorTable(name);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -108,7 +108,7 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New
|
||||
|
||||
return autoPtr<lduMatrix::smoother>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
fieldName,
|
||||
matrix,
|
||||
@ -120,9 +120,9 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New
|
||||
}
|
||||
else if (matrix.asymmetric())
|
||||
{
|
||||
auto cstrIter = asymMatrixConstructorTablePtr_->cfind(name);
|
||||
auto* ctorPtr = asymMatrixConstructorTable(name);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -135,7 +135,7 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New
|
||||
|
||||
return autoPtr<lduMatrix::smoother>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
fieldName,
|
||||
matrix,
|
||||
|
||||
@ -70,9 +70,9 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New
|
||||
}
|
||||
else if (matrix.symmetric())
|
||||
{
|
||||
auto cstrIter = symMatrixConstructorTablePtr_->cfind(name);
|
||||
auto* ctorPtr = symMatrixConstructorTable(name);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -85,7 +85,7 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New
|
||||
|
||||
return autoPtr<lduMatrix::solver>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
fieldName,
|
||||
matrix,
|
||||
@ -98,9 +98,9 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New
|
||||
}
|
||||
else if (matrix.asymmetric())
|
||||
{
|
||||
auto cstrIter = asymMatrixConstructorTablePtr_->cfind(name);
|
||||
auto* ctorPtr = asymMatrixConstructorTable(name);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -113,7 +113,7 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New
|
||||
|
||||
return autoPtr<lduMatrix::solver>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
fieldName,
|
||||
matrix,
|
||||
|
||||
@ -319,9 +319,9 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New
|
||||
lduMeshConstructorTablePtr_
|
||||
);
|
||||
|
||||
auto cstrIter = lduMeshConstructorTablePtr_->cfind(agglomeratorType);
|
||||
auto* ctorPtr = lduMeshConstructorTable(agglomeratorType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown GAMGAgglomeration type "
|
||||
@ -333,7 +333,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return store(cstrIter()(mesh, controlDict).ptr());
|
||||
return store(ctorPtr(mesh, controlDict).ptr());
|
||||
}
|
||||
}
|
||||
|
||||
@ -370,20 +370,15 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New
|
||||
lduMatrixConstructorTablePtr_
|
||||
);
|
||||
|
||||
if
|
||||
(
|
||||
!lduMatrixConstructorTablePtr_
|
||||
|| !lduMatrixConstructorTablePtr_->found(agglomeratorType)
|
||||
)
|
||||
auto* ctorPtr = lduMatrixConstructorTable(agglomeratorType);
|
||||
|
||||
if (!ctorPtr)
|
||||
{
|
||||
return New(mesh, controlDict);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto cstrIter =
|
||||
lduMatrixConstructorTablePtr_->cfind(agglomeratorType);
|
||||
|
||||
return store(cstrIter()(matrix, controlDict).ptr());
|
||||
return store(ctorPtr(matrix, controlDict).ptr());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -422,9 +417,9 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New
|
||||
geometryConstructorTablePtr_
|
||||
);
|
||||
|
||||
auto cstrIter = geometryConstructorTablePtr_->cfind(agglomeratorType);
|
||||
auto* ctorPtr = geometryConstructorTable(agglomeratorType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown GAMGAgglomeration type "
|
||||
@ -436,7 +431,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New
|
||||
|
||||
return store
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
mesh,
|
||||
cellVolumes,
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -364,9 +365,9 @@ Foam::autoPtr<Foam::GAMGProcAgglomeration> Foam::GAMGProcAgglomeration::New
|
||||
{
|
||||
DebugInFunction << "Constructing GAMGProcAgglomeration" << endl;
|
||||
|
||||
auto cstrIter = GAMGAgglomerationConstructorTablePtr_->cfind(type);
|
||||
auto* ctorPtr = GAMGAgglomerationConstructorTable(type);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown GAMGProcAgglomeration type "
|
||||
@ -376,7 +377,7 @@ Foam::autoPtr<Foam::GAMGProcAgglomeration> Foam::GAMGProcAgglomeration::New
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<GAMGProcAgglomeration>(cstrIter()(agglom, controlDict));
|
||||
return autoPtr<GAMGProcAgglomeration>(ctorPtr(agglom, controlDict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -38,9 +38,9 @@ Foam::autoPtr<Foam::GAMGInterfaceField> Foam::GAMGInterfaceField::New
|
||||
{
|
||||
const word coupleType(fineInterface.interfaceFieldType());
|
||||
|
||||
auto cstrIter = lduInterfaceFieldConstructorTablePtr_->cfind(coupleType);
|
||||
auto* ctorPtr = lduInterfaceFieldConstructorTable(coupleType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -50,7 +50,7 @@ Foam::autoPtr<Foam::GAMGInterfaceField> Foam::GAMGInterfaceField::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<GAMGInterfaceField>(cstrIter()(GAMGCp, fineInterface));
|
||||
return autoPtr<GAMGInterfaceField>(ctorPtr(GAMGCp, fineInterface));
|
||||
}
|
||||
|
||||
|
||||
@ -63,9 +63,9 @@ Foam::autoPtr<Foam::GAMGInterfaceField> Foam::GAMGInterfaceField::New
|
||||
{
|
||||
const word coupleType(GAMGCp.type());
|
||||
|
||||
auto cstrIter = lduInterfaceConstructorTablePtr_->cfind(coupleType);
|
||||
auto* ctorPtr = lduInterfaceConstructorTable(coupleType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -75,7 +75,7 @@ Foam::autoPtr<Foam::GAMGInterfaceField> Foam::GAMGInterfaceField::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<GAMGInterfaceField>(cstrIter()(GAMGCp, doTransform, rank));
|
||||
return autoPtr<GAMGInterfaceField>(ctorPtr(GAMGCp, doTransform, rank));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -46,9 +46,9 @@ Foam::autoPtr<Foam::GAMGInterface> Foam::GAMGInterface::New
|
||||
{
|
||||
const word coupleType(fineInterface.type());
|
||||
|
||||
auto cstrIter = lduInterfaceConstructorTablePtr_->cfind(coupleType);
|
||||
auto* ctorPtr = lduInterfaceConstructorTable(coupleType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -60,7 +60,7 @@ Foam::autoPtr<Foam::GAMGInterface> Foam::GAMGInterface::New
|
||||
|
||||
return autoPtr<GAMGInterface>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
index,
|
||||
coarseInterfaces,
|
||||
@ -82,9 +82,9 @@ Foam::autoPtr<Foam::GAMGInterface> Foam::GAMGInterface::New
|
||||
Istream& is
|
||||
)
|
||||
{
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(coupleType);
|
||||
auto* ctorPtr = IstreamConstructorTable(coupleType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -94,7 +94,7 @@ Foam::autoPtr<Foam::GAMGInterface> Foam::GAMGInterface::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<GAMGInterface>(cstrIter()(index, coarseInterfaces, is));
|
||||
return autoPtr<GAMGInterface>(ctorPtr(index, coarseInterfaces, is));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -38,9 +38,9 @@ Foam::autoPtr<Foam::facePointPatch> Foam::facePointPatch::New
|
||||
{
|
||||
DebugInFunction << "Constructing facePointPatch" << endl;
|
||||
|
||||
auto cstrIter = polyPatchConstructorTablePtr_->cfind(patch.type());
|
||||
auto* ctorPtr = polyPatchConstructorTable(patch.type());
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -50,7 +50,7 @@ Foam::autoPtr<Foam::facePointPatch> Foam::facePointPatch::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<facePointPatch>(cstrIter()(patch, bm));
|
||||
return autoPtr<facePointPatch>(ctorPtr(patch, bm));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -276,21 +276,27 @@ Foam::polyPatch::~polyPatch()
|
||||
|
||||
bool Foam::polyPatch::constraintType(const word& pt)
|
||||
{
|
||||
return pointPatchField<scalar>::pointPatchConstructorTablePtr_->found(pt);
|
||||
return
|
||||
(
|
||||
pointPatchField<scalar>::pointPatchConstructorTablePtr_
|
||||
&& pointPatchField<scalar>::pointPatchConstructorTablePtr_->found(pt)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::wordList Foam::polyPatch::constraintTypes()
|
||||
{
|
||||
wordList cTypes(dictionaryConstructorTablePtr_->size());
|
||||
const auto& cnstrTable = *dictionaryConstructorTablePtr_;
|
||||
|
||||
wordList cTypes(cnstrTable.size());
|
||||
|
||||
label i = 0;
|
||||
|
||||
forAllConstIters(*dictionaryConstructorTablePtr_, cstrIter)
|
||||
forAllConstIters(cnstrTable, iter)
|
||||
{
|
||||
if (constraintType(cstrIter.key()))
|
||||
if (constraintType(iter.key()))
|
||||
{
|
||||
cTypes[i++] = cstrIter.key();
|
||||
cTypes[i++] = iter.key();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -43,9 +43,9 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New
|
||||
{
|
||||
DebugInFunction << "Constructing polyPatch" << endl;
|
||||
|
||||
auto cstrIter = wordConstructorTablePtr_->cfind(patchType);
|
||||
auto* ctorPtr = wordConstructorTable(patchType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -57,7 +57,7 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New
|
||||
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
name,
|
||||
size,
|
||||
@ -98,16 +98,16 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New
|
||||
{
|
||||
DebugInFunction << "Constructing polyPatch" << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(patchType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
if (!disallowGenericPolyPatch)
|
||||
{
|
||||
cstrIter = dictionaryConstructorTablePtr_->cfind("genericPatch");
|
||||
ctorPtr = dictionaryConstructorTable("genericPatch");
|
||||
}
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -119,7 +119,7 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New
|
||||
}
|
||||
}
|
||||
|
||||
return autoPtr<polyPatch>(cstrIter()(name, dict, index, bm, patchType));
|
||||
return autoPtr<polyPatch>(ctorPtr(name, dict, index, bm, patchType));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -43,9 +43,9 @@ Foam::autoPtr<Foam::cellZone> Foam::cellZone::New
|
||||
|
||||
const word zoneType(dict.get<word>("type"));
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(zoneType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(zoneType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -56,7 +56,7 @@ Foam::autoPtr<Foam::cellZone> Foam::cellZone::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<cellZone>(cstrIter()(name, dict, index, zm));
|
||||
return autoPtr<cellZone>(ctorPtr(name, dict, index, zm));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -43,9 +43,9 @@ Foam::autoPtr<Foam::faceZone> Foam::faceZone::New
|
||||
|
||||
const word zoneType(dict.get<word>("type"));
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(zoneType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(zoneType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -56,7 +56,7 @@ Foam::autoPtr<Foam::faceZone> Foam::faceZone::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<faceZone>(cstrIter()(name, dict, index, zm));
|
||||
return autoPtr<faceZone>(ctorPtr(name, dict, index, zm));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -43,9 +43,9 @@ Foam::autoPtr<Foam::pointZone> Foam::pointZone::New
|
||||
|
||||
const word zoneType(dict.get<word>("type"));
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(zoneType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(zoneType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -56,7 +56,7 @@ Foam::autoPtr<Foam::pointZone> Foam::pointZone::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<pointZone>(cstrIter()(name, dict, index, zm));
|
||||
return autoPtr<pointZone>(ctorPtr(name, dict, index, zm));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -123,9 +123,9 @@ Foam::Function1<Type>::New
|
||||
}
|
||||
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Unknown Function1 type "
|
||||
@ -135,7 +135,7 @@ Foam::Function1<Type>::New
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(entryName, *coeffs);
|
||||
return ctorPtr(entryName, *coeffs);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -163,9 +163,9 @@ Foam::LESModel<BasicTurbulenceModel>::New
|
||||
|
||||
Info<< "Selecting LES turbulence model " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -178,7 +178,7 @@ Foam::LESModel<BasicTurbulenceModel>::New
|
||||
|
||||
return autoPtr<LESModel>
|
||||
(
|
||||
cstrIter()(alpha, rho, U, alphaRhoPhi, phi, transport, propertiesName)
|
||||
ctorPtr(alpha, rho, U, alphaRhoPhi, phi, transport, propertiesName)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -77,9 +77,9 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New
|
||||
|
||||
Info<< "Selecting LES " << lookupName << " type " << deltaType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(deltaType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(deltaType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -90,7 +90,7 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<LESdelta>(cstrIter()(name, turbulence, dict));
|
||||
return autoPtr<LESdelta>(ctorPtr(name, turbulence, dict));
|
||||
}
|
||||
|
||||
|
||||
@ -107,16 +107,19 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New
|
||||
|
||||
Info<< "Selecting LES " << lookupName << " type " << deltaType << endl;
|
||||
|
||||
// Additional ones first
|
||||
auto cstrIter = additionalConstructors.cfind(deltaType);
|
||||
|
||||
// Regular ones
|
||||
if (!cstrIter.found())
|
||||
// First any additional ones
|
||||
{
|
||||
cstrIter = dictionaryConstructorTablePtr_->cfind(deltaType);
|
||||
auto ctorIter = additionalConstructors.cfind(deltaType);
|
||||
|
||||
if (ctorIter.found())
|
||||
{
|
||||
return autoPtr<LESdelta>(ctorIter.val()(name, turbulence, dict));
|
||||
}
|
||||
}
|
||||
|
||||
if (!cstrIter.found())
|
||||
auto* ctorPtr = dictionaryConstructorTable(deltaType);
|
||||
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -126,7 +129,7 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New
|
||||
*dictionaryConstructorTablePtr_
|
||||
);
|
||||
|
||||
if (additionalConstructors.size())
|
||||
if (!additionalConstructors.empty())
|
||||
{
|
||||
FatalIOError
|
||||
<< " and " << additionalConstructors.sortedToc() << nl;
|
||||
@ -136,7 +139,7 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<LESdelta>(cstrIter()(name, turbulence, dict));
|
||||
return autoPtr<LESdelta>(ctorPtr(name, turbulence, dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -49,9 +49,9 @@ Foam::autoPtr<Foam::LESfilter> Foam::LESfilter::New
|
||||
{
|
||||
const word filterType(dict.get<word>(filterDictName));
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(filterType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(filterType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -62,7 +62,7 @@ Foam::autoPtr<Foam::LESfilter> Foam::LESfilter::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<LESfilter>(cstrIter()(mesh, dict));
|
||||
return autoPtr<LESfilter>(ctorPtr(mesh, dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -145,9 +145,9 @@ Foam::RASModel<BasicTurbulenceModel>::New
|
||||
|
||||
Info<< "Selecting RAS turbulence model " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -160,7 +160,7 @@ Foam::RASModel<BasicTurbulenceModel>::New
|
||||
|
||||
return autoPtr<RASModel>
|
||||
(
|
||||
cstrIter()(alpha, rho, U, alphaRhoPhi, phi, transport, propertiesName)
|
||||
ctorPtr(alpha, rho, U, alphaRhoPhi, phi, transport, propertiesName)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -105,9 +105,9 @@ Foam::TurbulenceModel<Alpha, Rho, BasicTurbulenceModel, TransportModel>::New
|
||||
|
||||
Info<< "Selecting turbulence model type " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -120,7 +120,7 @@ Foam::TurbulenceModel<Alpha, Rho, BasicTurbulenceModel, TransportModel>::New
|
||||
|
||||
return autoPtr<TurbulenceModel>
|
||||
(
|
||||
cstrIter()(alpha, rho, U, alphaRhoPhi, phi, transport, propertiesName)
|
||||
ctorPtr(alpha, rho, U, alphaRhoPhi, phi, transport, propertiesName)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018-2020 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -40,9 +40,9 @@ Foam::laminarModels::generalizedNewtonianViscosityModel::New
|
||||
|
||||
Info<< "Selecting generalized Newtonian model " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->find(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -53,7 +53,7 @@ Foam::laminarModels::generalizedNewtonianViscosityModel::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<generalizedNewtonianViscosityModel>(cstrIter()(dict));
|
||||
return autoPtr<generalizedNewtonianViscosityModel>(ctorPtr(dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -120,9 +120,9 @@ Foam::laminarModel<BasicTurbulenceModel>::New
|
||||
|
||||
Info<< "Selecting laminar stress model " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -135,7 +135,7 @@ Foam::laminarModel<BasicTurbulenceModel>::New
|
||||
|
||||
return autoPtr<laminarModel>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
alpha,
|
||||
rho,
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -45,9 +45,9 @@ Foam::autoPtr<Foam::reactionRateFlameArea> Foam::reactionRateFlameArea::New
|
||||
Info<< "Selecting reaction rate flame area correlation "
|
||||
<< modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -61,7 +61,7 @@ Foam::autoPtr<Foam::reactionRateFlameArea> Foam::reactionRateFlameArea::New
|
||||
const word className = modelType.substr(0, modelType.find('<'));
|
||||
|
||||
return autoPtr<reactionRateFlameArea>
|
||||
(cstrIter()(className, dict, mesh, combModel));
|
||||
(ctorPtr(className, dict, mesh, combModel));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -186,7 +186,7 @@ Foam::autoPtr<CombustionModel> Foam::combustionModel::New
|
||||
|
||||
return autoPtr<CombustionModel>
|
||||
(
|
||||
ctorIter()(combModelName, thermo, turb, combustionProperties)
|
||||
ctorIter.val()(combModelName, thermo, turb, combustionProperties)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -72,9 +72,8 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
auto doInitCstrIter = doInitConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (doInitCstrIter.found())
|
||||
auto* doInitCtor = doInitConstructorTable(modelType);
|
||||
if (doInitCtor)
|
||||
{
|
||||
DebugInfo
|
||||
<< "Constructing dynamicFvMesh with explicit initialisation"
|
||||
@ -82,7 +81,7 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
|
||||
|
||||
// Two-step constructor
|
||||
// 1. Construct mesh, do not initialise
|
||||
autoPtr<dynamicFvMesh> meshPtr(doInitCstrIter()(io, false));
|
||||
autoPtr<dynamicFvMesh> meshPtr(doInitCtor(io, false));
|
||||
|
||||
// 2. Initialise parents and itself
|
||||
meshPtr().init(true);
|
||||
@ -90,9 +89,9 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
|
||||
return meshPtr;
|
||||
}
|
||||
|
||||
auto cstrIter = IOobjectConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = IOobjectConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -103,7 +102,7 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<dynamicFvMesh>(cstrIter()(io));
|
||||
return autoPtr<dynamicFvMesh>(ctorPtr(io));
|
||||
}
|
||||
|
||||
DebugInfo
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -64,12 +64,12 @@ Foam::simplifiedMeshes::simplifiedDynamicFvMeshBase::New
|
||||
|
||||
const word modelType(dict.get<word>("dynamicFvMesh"));
|
||||
|
||||
auto cstrIter = timeConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = timeConstructorTable(modelType);
|
||||
|
||||
if (cstrIter.found())
|
||||
if (ctorPtr)
|
||||
{
|
||||
Info<< "Selecting simplified mesh model " << modelType << endl;
|
||||
return autoPtr<dynamicFvMesh>(cstrIter()(io.time(), io.name()));
|
||||
return autoPtr<dynamicFvMesh>(ctorPtr(io.time(), io.name()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -48,9 +48,9 @@ Foam::autoPtr<Foam::cellLooper> Foam::cellLooper::New
|
||||
const polyMesh& mesh
|
||||
)
|
||||
{
|
||||
auto cstrIter = wordConstructorTablePtr_->cfind(type);
|
||||
auto* ctorPtr = wordConstructorTable(type);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -60,7 +60,7 @@ Foam::autoPtr<Foam::cellLooper> Foam::cellLooper::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<cellLooper>(cstrIter()(mesh));
|
||||
return autoPtr<cellLooper>(ctorPtr(mesh));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -108,9 +108,9 @@ Foam::displacementMotionSolver::New
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
auto cstrIter = displacementConstructorTablePtr_->cfind(solverTypeName);
|
||||
auto* ctorPtr = displacementConstructorTable(solverTypeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -123,7 +123,7 @@ Foam::displacementMotionSolver::New
|
||||
|
||||
return autoPtr<displacementMotionSolver>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
mesh,
|
||||
solverDict,
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -40,9 +40,9 @@ Foam::autoPtr<Foam::solidBodyMotionFunction> Foam::solidBodyMotionFunction::New
|
||||
|
||||
Info<< "Selecting solid-body motion function " << motionType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(motionType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(motionType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -53,7 +53,7 @@ Foam::autoPtr<Foam::solidBodyMotionFunction> Foam::solidBodyMotionFunction::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<solidBodyMotionFunction>(cstrIter()(dict, runTime));
|
||||
return autoPtr<solidBodyMotionFunction>(ctorPtr(dict, runTime));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -130,9 +130,9 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(solverName);
|
||||
auto* ctorPtr = dictionaryConstructorTable(solverName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -143,7 +143,7 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<motionSolver>(cstrIter()(mesh, solverDict));
|
||||
return autoPtr<motionSolver>(ctorPtr(mesh, solverDict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -43,9 +43,9 @@ Foam::autoPtr<Foam::polyMeshModifier> Foam::polyMeshModifier::New
|
||||
|
||||
const word modelType(dict.get<word>("type"));
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -56,7 +56,7 @@ Foam::autoPtr<Foam::polyMeshModifier> Foam::polyMeshModifier::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<polyMeshModifier>(cstrIter()(name, dict, index, mme));
|
||||
return autoPtr<polyMeshModifier>(ctorPtr(name, dict, index, mme));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -50,9 +50,9 @@ Foam::autoPtr<Foam::engineMesh> Foam::engineMesh::New(const IOobject& io)
|
||||
|
||||
Info<< "Selecting engineMesh " << modelType << endl;
|
||||
|
||||
auto cstrIter = IOobjectConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = IOobjectConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -63,7 +63,7 @@ Foam::autoPtr<Foam::engineMesh> Foam::engineMesh::New(const IOobject& io)
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<engineMesh>(cstrIter()(io));
|
||||
return autoPtr<engineMesh>(ctorPtr(io));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -52,9 +52,9 @@ Foam::autoPtr<Foam::engineTime> Foam::engineTime::New
|
||||
|
||||
Info<< "Selecting engine type " << engineType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(engineType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(engineType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -67,7 +67,7 @@ Foam::autoPtr<Foam::engineTime> Foam::engineTime::New
|
||||
|
||||
return autoPtr<engineTime>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
name,
|
||||
rootPath,
|
||||
|
||||
@ -98,9 +98,9 @@ Foam::autoPtr<Foam::fa::option> Foam::fa::option::New
|
||||
dictionaryConstructorTablePtr_
|
||||
);
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown faOption model type "
|
||||
@ -110,7 +110,7 @@ Foam::autoPtr<Foam::fa::option> Foam::fa::option::New
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<option>(cstrIter()(name, modelType, coeffs, patch));
|
||||
return autoPtr<option>(ctorPtr(name, modelType, coeffs, patch));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -39,9 +39,9 @@ Foam::autoPtr<Foam::writer<Type>> Foam::writer<Type>::New
|
||||
const word& writeType
|
||||
)
|
||||
{
|
||||
auto cstrIter = wordConstructorTablePtr_->cfind(writeType);
|
||||
auto* ctorPtr = wordConstructorTable(writeType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -51,7 +51,7 @@ Foam::autoPtr<Foam::writer<Type>> Foam::writer<Type>::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<writer<Type>>(cstrIter()());
|
||||
return autoPtr<writer<Type>>(ctorPtr());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -43,9 +43,9 @@ Foam::autoPtr<Foam::faPatch> Foam::faPatch::New
|
||||
|
||||
const word patchType(dict.get<word>("type"));
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(patchType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -56,7 +56,7 @@ Foam::autoPtr<Foam::faPatch> Foam::faPatch::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<faPatch>(cstrIter()(name, dict, index, bm));
|
||||
return autoPtr<faPatch>(ctorPtr(name, dict, index, bm));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -103,12 +104,11 @@ Foam::tmp<Foam::faPatchField<Type>> Foam::faPatchField<Type>::NewCalculatedType
|
||||
const faPatchField<Type2>& pf
|
||||
)
|
||||
{
|
||||
auto patchTypeCstrIter =
|
||||
patchConstructorTablePtr_->cfind(pf.patch().type());
|
||||
auto* patchTypeCtor = patchConstructorTable(pf.patch().type());
|
||||
|
||||
if (patchTypeCstrIter.found())
|
||||
if (patchTypeCtor)
|
||||
{
|
||||
return patchTypeCstrIter()
|
||||
return patchTypeCtor
|
||||
(
|
||||
pf.patch(),
|
||||
DimensionedField<Type, areaMesh>::null()
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -44,9 +44,9 @@ Foam::tmp<Foam::faPatchField<Type>> Foam::faPatchField<Type>::New
|
||||
<< "p.Type():" << p.type()
|
||||
<< endl;
|
||||
|
||||
auto cstrIter = patchConstructorTablePtr_->cfind(patchFieldType);
|
||||
auto* ctorPtr = patchConstructorTable(patchFieldType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -56,7 +56,7 @@ Foam::tmp<Foam::faPatchField<Type>> Foam::faPatchField<Type>::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
auto patchTypeCstrIter = patchConstructorTablePtr_->cfind(p.type());
|
||||
auto* patchTypeCtor = patchConstructorTable(p.type());
|
||||
|
||||
if
|
||||
(
|
||||
@ -64,21 +64,21 @@ Foam::tmp<Foam::faPatchField<Type>> Foam::faPatchField<Type>::New
|
||||
|| actualPatchType != p.type()
|
||||
)
|
||||
{
|
||||
if (patchTypeCstrIter.found())
|
||||
if (patchTypeCtor)
|
||||
{
|
||||
return patchTypeCstrIter()(p, iF);
|
||||
return patchTypeCtor(p, iF);
|
||||
}
|
||||
else
|
||||
{
|
||||
return cstrIter()(p, iF);
|
||||
return ctorPtr(p, iF);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tmp<faPatchField<Type>> tfap = cstrIter()(p, iF);
|
||||
tmp<faPatchField<Type>> tfap = ctorPtr(p, iF);
|
||||
|
||||
// Check if constraint type override and store patchType if so
|
||||
if (patchTypeCstrIter.found())
|
||||
if (patchTypeCtor)
|
||||
{
|
||||
tfap.ref().patchType() = actualPatchType;
|
||||
}
|
||||
@ -110,16 +110,16 @@ Foam::tmp<Foam::faPatchField<Type>> Foam::faPatchField<Type>::New
|
||||
|
||||
const word patchFieldType(dict.get<word>("type"));
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchFieldType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(patchFieldType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
if (!disallowGenericFaPatchField)
|
||||
{
|
||||
cstrIter = dictionaryConstructorTablePtr_->cfind("generic");
|
||||
ctorPtr = dictionaryConstructorTable("generic");
|
||||
}
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Unknown patchField type " << patchFieldType
|
||||
@ -130,9 +130,9 @@ Foam::tmp<Foam::faPatchField<Type>> Foam::faPatchField<Type>::New
|
||||
}
|
||||
}
|
||||
|
||||
auto patchTypeCstrIter = dictionaryConstructorTablePtr_->cfind(p.type());
|
||||
auto* patchTypeCtor = dictionaryConstructorTable(p.type());
|
||||
|
||||
if (patchTypeCstrIter.found() && *patchTypeCstrIter != *cstrIter)
|
||||
if (patchTypeCtor && patchTypeCtor != ctorPtr)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "inconsistent patch and patchField types for \n"
|
||||
@ -141,7 +141,7 @@ Foam::tmp<Foam::faPatchField<Type>> Foam::faPatchField<Type>::New
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(p, iF, dict);
|
||||
return ctorPtr(p, iF, dict);
|
||||
}
|
||||
|
||||
|
||||
@ -156,9 +156,9 @@ Foam::tmp<Foam::faPatchField<Type>> Foam::faPatchField<Type>::New
|
||||
{
|
||||
DebugInFunction << "Constructing faPatchField<Type>" << endl;
|
||||
|
||||
auto cstrIter = patchMapperConstructorTablePtr_->cfind(ptf.type());
|
||||
auto* ctorPtr = patchMapperConstructorTable(ptf.type());
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -168,14 +168,14 @@ Foam::tmp<Foam::faPatchField<Type>> Foam::faPatchField<Type>::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
auto patchTypeCstrIter = patchMapperConstructorTablePtr_->cfind(p.type());
|
||||
auto* patchTypeCtor = patchMapperConstructorTable(p.type());
|
||||
|
||||
if (patchTypeCstrIter.found())
|
||||
if (patchTypeCtor)
|
||||
{
|
||||
return patchTypeCstrIter()(ptf, p, iF, pfMapper);
|
||||
return patchTypeCtor(ptf, p, iF, pfMapper);
|
||||
}
|
||||
|
||||
return cstrIter()(ptf, p, iF, pfMapper);
|
||||
return ctorPtr(ptf, p, iF, pfMapper);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -103,12 +104,11 @@ Foam::faePatchField<Type>::NewCalculatedType
|
||||
const faePatchField<Type2>& pf
|
||||
)
|
||||
{
|
||||
auto patchTypeCstrIter =
|
||||
patchConstructorTablePtr_->cfind(pf.patch().type());
|
||||
auto* patchTypeCtor = patchConstructorTable(pf.patch().type());
|
||||
|
||||
if (patchTypeCstrIter.found())
|
||||
if (patchTypeCtor)
|
||||
{
|
||||
return patchTypeCstrIter()
|
||||
return patchTypeCtor
|
||||
(
|
||||
pf.patch(),
|
||||
DimensionedField<Type, edgeMesh>::null()
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -38,9 +38,9 @@ Foam::tmp<Foam::faePatchField<Type>> Foam::faePatchField<Type>::New
|
||||
{
|
||||
DebugInFunction << "Constructing faePatchField" << endl;
|
||||
|
||||
auto cstrIter = patchConstructorTablePtr_->cfind(patchFieldType);
|
||||
auto* ctorPtr = patchConstructorTable(patchFieldType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -50,15 +50,15 @@ Foam::tmp<Foam::faePatchField<Type>> Foam::faePatchField<Type>::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
auto patchTypeCstrIter = patchConstructorTablePtr_->cfind(p.type());
|
||||
auto* patchTypeCtor = patchConstructorTable(p.type());
|
||||
|
||||
if (patchTypeCstrIter.found())
|
||||
if (patchTypeCtor)
|
||||
{
|
||||
return patchTypeCstrIter()(p, iF);
|
||||
return patchTypeCtor(p, iF);
|
||||
}
|
||||
else
|
||||
{
|
||||
return cstrIter()(p, iF);
|
||||
return ctorPtr(p, iF);
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,16 +75,16 @@ Foam::tmp<Foam::faePatchField<Type>> Foam::faePatchField<Type>::New
|
||||
|
||||
const word patchFieldType(dict.get<word>("type"));
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchFieldType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(patchFieldType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
if (!disallowGenericFaePatchField)
|
||||
{
|
||||
cstrIter = dictionaryConstructorTablePtr_->cfind("generic");
|
||||
ctorPtr = dictionaryConstructorTable("generic");
|
||||
}
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Unknown patchField type " << patchFieldType
|
||||
@ -95,9 +95,9 @@ Foam::tmp<Foam::faePatchField<Type>> Foam::faePatchField<Type>::New
|
||||
}
|
||||
}
|
||||
|
||||
auto patchTypeCstrIter = dictionaryConstructorTablePtr_->cfind(p.type());
|
||||
auto* patchTypeCtor = dictionaryConstructorTable(p.type());
|
||||
|
||||
if (patchTypeCstrIter.found() && *patchTypeCstrIter != *cstrIter)
|
||||
if (patchTypeCtor && patchTypeCtor != ctorPtr)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "inconsistent patch and patchField types for \n"
|
||||
@ -106,7 +106,7 @@ Foam::tmp<Foam::faePatchField<Type>> Foam::faePatchField<Type>::New
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(p, iF, dict);
|
||||
return ctorPtr(p, iF, dict);
|
||||
}
|
||||
|
||||
|
||||
@ -121,9 +121,9 @@ Foam::tmp<Foam::faePatchField<Type>> Foam::faePatchField<Type>::New
|
||||
{
|
||||
DebugInFunction << "Constructing faePatchField<Type>" << endl;
|
||||
|
||||
auto cstrIter = patchMapperConstructorTablePtr_->cfind(ptf.type());
|
||||
auto* ctorPtr = patchMapperConstructorTable(ptf.type());
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -133,14 +133,14 @@ Foam::tmp<Foam::faePatchField<Type>> Foam::faePatchField<Type>::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
auto patchTypeCstrIter = patchMapperConstructorTablePtr_->cfind(p.type());
|
||||
auto* patchTypeCtor = patchMapperConstructorTable(p.type());
|
||||
|
||||
if (patchTypeCstrIter.found())
|
||||
if (patchTypeCtor)
|
||||
{
|
||||
return patchTypeCstrIter()(ptf, p, iF, pfMapper);
|
||||
return patchTypeCtor(ptf, p, iF, pfMapper);
|
||||
}
|
||||
|
||||
return cstrIter()(ptf, p, iF, pfMapper);
|
||||
return ctorPtr(ptf, p, iF, pfMapper);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -58,9 +58,9 @@ Foam::fa::convectionScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = IstreamConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -71,7 +71,7 @@ Foam::fa::convectionScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, faceFlux, schemeData);
|
||||
return ctorPtr(mesh, faceFlux, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 Volkswagen AG
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -68,9 +68,9 @@ tmp<faD2dt2Scheme<Type>> faD2dt2Scheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = IstreamConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -81,7 +81,7 @@ tmp<faD2dt2Scheme<Type>> faD2dt2Scheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
return ctorPtr(mesh, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -66,9 +66,9 @@ tmp<faDdtScheme<Type>> faDdtScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = IstreamConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -79,7 +79,7 @@ tmp<faDdtScheme<Type>> faDdtScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
return ctorPtr(mesh, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -67,9 +67,9 @@ tmp<divScheme<Type>> divScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = IstreamConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -80,7 +80,7 @@ tmp<divScheme<Type>> divScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
return ctorPtr(mesh, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -66,9 +66,9 @@ tmp<gradScheme<Type>> gradScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = IstreamConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -79,7 +79,7 @@ tmp<gradScheme<Type>> gradScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
return ctorPtr(mesh, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -67,9 +67,9 @@ tmp<laplacianScheme<Type>> laplacianScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = IstreamConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -80,7 +80,7 @@ tmp<laplacianScheme<Type>> laplacianScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
return ctorPtr(mesh, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -69,9 +69,9 @@ tmp<lnGradScheme<Type>> lnGradScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = MeshConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = MeshConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -82,7 +82,7 @@ tmp<lnGradScheme<Type>> lnGradScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
return ctorPtr(mesh, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -61,9 +61,9 @@ Foam::edgeInterpolationScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = MeshConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = MeshConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -74,7 +74,7 @@ Foam::edgeInterpolationScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
return ctorPtr(mesh, schemeData);
|
||||
}
|
||||
|
||||
|
||||
@ -106,9 +106,9 @@ Foam::edgeInterpolationScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = MeshFluxConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = MeshFluxConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -119,7 +119,7 @@ Foam::edgeInterpolationScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, faceFlux, schemeData);
|
||||
return ctorPtr(mesh, faceFlux, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -52,9 +52,9 @@ Foam::autoPtr<Foam::SRF::SRFModel> Foam::SRF::SRFModel::New
|
||||
|
||||
Info<< "Selecting SRFModel " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -65,7 +65,7 @@ Foam::autoPtr<Foam::SRF::SRFModel> Foam::SRF::SRFModel::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<SRFModel>(cstrIter()(Urel));
|
||||
return autoPtr<SRFModel>(ctorPtr(Urel));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -97,9 +97,9 @@ Foam::autoPtr<Foam::fv::option> Foam::fv::option::New
|
||||
dictionaryConstructorTablePtr_
|
||||
);
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -110,7 +110,7 @@ Foam::autoPtr<Foam::fv::option> Foam::fv::option::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<fv::option>(cstrIter()(name, modelType, coeffs, mesh));
|
||||
return autoPtr<fv::option>(ctorPtr(name, modelType, coeffs, mesh));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -43,9 +43,9 @@ Foam::autoPtr<Foam::porosityModel> Foam::porosityModel::New
|
||||
Info<< "Porosity region " << name << ":" << nl
|
||||
<< " selecting model: " << modelType << endl;
|
||||
|
||||
auto cstrIter = meshConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = meshConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -58,7 +58,7 @@ Foam::autoPtr<Foam::porosityModel> Foam::porosityModel::New
|
||||
|
||||
return autoPtr<porosityModel>
|
||||
(
|
||||
cstrIter()
|
||||
ctorPtr
|
||||
(
|
||||
name,
|
||||
modelType,
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2010-2018 Bernhard Gschaider
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -53,9 +53,9 @@ Foam::expressions::fvExprDriver::New
|
||||
{
|
||||
const word driverType(dict.get<word>("valueType"));
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(driverType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(driverType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -70,7 +70,7 @@ Foam::expressions::fvExprDriver::New
|
||||
|
||||
resetDefaultMesh(mesh, false); // lazy
|
||||
|
||||
return autoPtr<fvExprDriver>(cstrIter()(dict, mesh));
|
||||
return autoPtr<fvExprDriver>(ctorPtr(dict, mesh));
|
||||
}
|
||||
|
||||
|
||||
@ -82,9 +82,9 @@ Foam::expressions::fvExprDriver::New
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
auto cstrIter = idNameConstructorTablePtr_->cfind(driverType);
|
||||
auto* ctorPtr = idNameConstructorTable(driverType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -98,7 +98,7 @@ Foam::expressions::fvExprDriver::New
|
||||
|
||||
resetDefaultMesh(mesh, false); // lazy
|
||||
|
||||
return autoPtr<fvExprDriver>(cstrIter()(id, mesh));
|
||||
return autoPtr<fvExprDriver>(ctorPtr(id, mesh));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -104,11 +105,11 @@ Foam::fvPatchField<Type>::NewCalculatedType
|
||||
const fvPatch& p
|
||||
)
|
||||
{
|
||||
auto patchTypeCstrIter = patchConstructorTablePtr_->cfind(p.type());
|
||||
auto* patchTypeCtor = patchConstructorTable(p.type());
|
||||
|
||||
if (patchTypeCstrIter.found())
|
||||
if (patchTypeCtor)
|
||||
{
|
||||
return patchTypeCstrIter()
|
||||
return patchTypeCtor
|
||||
(
|
||||
p,
|
||||
DimensionedField<Type, volMesh>::null()
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -41,9 +41,9 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
|
||||
<< "patchFieldType = " << patchFieldType
|
||||
<< " : " << p.type() << nl;
|
||||
|
||||
auto cstrIter = patchConstructorTablePtr_->cfind(patchFieldType);
|
||||
auto* ctorPtr = patchConstructorTable(patchFieldType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -53,7 +53,7 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
auto patchTypeCstrIter = patchConstructorTablePtr_->cfind(p.type());
|
||||
auto* patchTypeCtor = patchConstructorTable(p.type());
|
||||
|
||||
if
|
||||
(
|
||||
@ -61,21 +61,21 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
|
||||
|| actualPatchType != p.type()
|
||||
)
|
||||
{
|
||||
if (patchTypeCstrIter.found())
|
||||
if (patchTypeCtor)
|
||||
{
|
||||
return patchTypeCstrIter()(p, iF);
|
||||
return patchTypeCtor(p, iF);
|
||||
}
|
||||
else
|
||||
{
|
||||
return cstrIter()(p, iF);
|
||||
return ctorPtr(p, iF);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tmp<fvPatchField<Type>> tfvp = cstrIter()(p, iF);
|
||||
tmp<fvPatchField<Type>> tfvp = ctorPtr(p, iF);
|
||||
|
||||
// Check if constraint type override and store patchType if so
|
||||
if (patchTypeCstrIter.found())
|
||||
if (patchTypeCtor)
|
||||
{
|
||||
tfvp.ref().patchType() = actualPatchType;
|
||||
}
|
||||
@ -108,16 +108,16 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
|
||||
DebugInFunction
|
||||
<< "patchFieldType = " << patchFieldType << nl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchFieldType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(patchFieldType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
if (!disallowGenericFvPatchField)
|
||||
{
|
||||
cstrIter = dictionaryConstructorTablePtr_->cfind("generic");
|
||||
ctorPtr = dictionaryConstructorTable("generic");
|
||||
}
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Unknown patchField type " << patchFieldType
|
||||
@ -134,10 +134,9 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
|
||||
|| dict.get<word>("patchType") != p.type()
|
||||
)
|
||||
{
|
||||
auto patchTypeCstrIter
|
||||
= dictionaryConstructorTablePtr_->cfind(p.type());
|
||||
auto* patchTypeCtor = dictionaryConstructorTable(p.type());
|
||||
|
||||
if (patchTypeCstrIter.found() && patchTypeCstrIter() != cstrIter())
|
||||
if (patchTypeCtor && patchTypeCtor != ctorPtr)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "inconsistent patch and patchField types for\n"
|
||||
@ -147,7 +146,7 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
|
||||
}
|
||||
}
|
||||
|
||||
return cstrIter()(p, iF, dict);
|
||||
return ctorPtr(p, iF, dict);
|
||||
}
|
||||
|
||||
|
||||
@ -163,9 +162,9 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
|
||||
DebugInFunction
|
||||
<< "Constructing fvPatchField<Type>" << nl;
|
||||
|
||||
auto cstrIter = patchMapperConstructorTablePtr_->cfind(ptf.type());
|
||||
auto* ctorPtr = patchMapperConstructorTable(ptf.type());
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -175,7 +174,7 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(ptf, p, iF, pfMapper);
|
||||
return ctorPtr(ptf, p, iF, pfMapper);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -102,11 +103,11 @@ Foam::fvsPatchField<Type>::NewCalculatedType
|
||||
const fvPatch& p
|
||||
)
|
||||
{
|
||||
auto patchTypeCstrIter = patchConstructorTablePtr_->cfind(p.type());
|
||||
auto* patchTypeCtor = patchConstructorTable(p.type());
|
||||
|
||||
if (patchTypeCstrIter.found())
|
||||
if (patchTypeCtor)
|
||||
{
|
||||
return patchTypeCstrIter()
|
||||
return patchTypeCtor
|
||||
(
|
||||
p,
|
||||
DimensionedField<Type, surfaceMesh>::null()
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -39,9 +39,9 @@ Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New
|
||||
{
|
||||
DebugInFunction << "Constructing fvsPatchField" << endl;
|
||||
|
||||
auto cstrIter = patchConstructorTablePtr_->cfind(patchFieldType);
|
||||
auto* ctorPtr = patchConstructorTable(patchFieldType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -57,15 +57,15 @@ Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New
|
||||
|| actualPatchType != p.type()
|
||||
)
|
||||
{
|
||||
auto patchTypeCstrIter = patchConstructorTablePtr_->cfind(p.type());
|
||||
auto* patchTypeCtor = patchConstructorTable(p.type());
|
||||
|
||||
if (patchTypeCstrIter.found())
|
||||
if (patchTypeCtor)
|
||||
{
|
||||
return patchTypeCstrIter()(p, iF);
|
||||
return patchTypeCtor(p, iF);
|
||||
}
|
||||
}
|
||||
|
||||
return cstrIter()(p, iF);
|
||||
return ctorPtr(p, iF);
|
||||
}
|
||||
|
||||
|
||||
@ -93,16 +93,16 @@ Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New
|
||||
|
||||
const word patchFieldType(dict.get<word>("type"));
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchFieldType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(patchFieldType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
if (!disallowGenericFvsPatchField)
|
||||
{
|
||||
cstrIter = dictionaryConstructorTablePtr_->cfind("generic");
|
||||
ctorPtr = dictionaryConstructorTable("generic");
|
||||
}
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Unknown patchField type " << patchFieldType
|
||||
@ -119,10 +119,9 @@ Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New
|
||||
|| dict.get<word>("patchType") != p.type()
|
||||
)
|
||||
{
|
||||
auto patchTypeCstrIter
|
||||
= dictionaryConstructorTablePtr_->cfind(p.type());
|
||||
auto* patchTypeCtor = dictionaryConstructorTable(p.type());
|
||||
|
||||
if (patchTypeCstrIter.found() && patchTypeCstrIter() != cstrIter())
|
||||
if (patchTypeCtor && patchTypeCtor != ctorPtr)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "inconsistent patch and patchField types for\n"
|
||||
@ -132,7 +131,7 @@ Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New
|
||||
}
|
||||
}
|
||||
|
||||
return cstrIter()(p, iF, dict);
|
||||
return ctorPtr(p, iF, dict);
|
||||
}
|
||||
|
||||
|
||||
@ -147,9 +146,9 @@ Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New
|
||||
{
|
||||
DebugInFunction << "Constructing fvsPatchField" << endl;
|
||||
|
||||
auto cstrIter = patchMapperConstructorTablePtr_->cfind(ptf.type());
|
||||
auto* ctorPtr = patchMapperConstructorTable(ptf.type());
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -159,14 +158,14 @@ Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
auto patchTypeCstrIter = patchMapperConstructorTablePtr_->cfind(p.type());
|
||||
auto* patchTypeCtor = patchMapperConstructorTable(p.type());
|
||||
|
||||
if (patchTypeCstrIter.found())
|
||||
if (patchTypeCtor)
|
||||
{
|
||||
return patchTypeCstrIter()(ptf, p, iF, pfMapper);
|
||||
return patchTypeCtor(ptf, p, iF, pfMapper);
|
||||
}
|
||||
|
||||
return cstrIter()(ptf, p, iF, pfMapper);
|
||||
return ctorPtr(ptf, p, iF, pfMapper);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -85,9 +85,9 @@ tmp<convectionScheme<Type>> convectionScheme<Type>::New
|
||||
InfoInFunction << "schemeName:" << schemeName << endl;
|
||||
}
|
||||
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = IstreamConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -98,7 +98,7 @@ tmp<convectionScheme<Type>> convectionScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, faceFlux, schemeData);
|
||||
return ctorPtr(mesh, faceFlux, schemeData);
|
||||
}
|
||||
|
||||
|
||||
@ -128,9 +128,9 @@ tmp<convectionScheme<Type>> convectionScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = MultivariateConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = MultivariateConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -141,7 +141,7 @@ tmp<convectionScheme<Type>> convectionScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, fields, faceFlux, schemeData);
|
||||
return ctorPtr(mesh, fields, faceFlux, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -64,9 +64,9 @@ tmp<d2dt2Scheme<Type>> d2dt2Scheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = IstreamConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -77,7 +77,7 @@ tmp<d2dt2Scheme<Type>> d2dt2Scheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
return ctorPtr(mesh, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -68,9 +68,9 @@ tmp<ddtScheme<Type>> ddtScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = IstreamConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -81,7 +81,7 @@ tmp<ddtScheme<Type>> ddtScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
return ctorPtr(mesh, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -67,9 +68,9 @@ tmp<divScheme<Type>> divScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = IstreamConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInFunction(schemeData)
|
||||
<< "unknown div scheme "
|
||||
@ -79,7 +80,7 @@ tmp<divScheme<Type>> divScheme<Type>::New
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
return ctorPtr(mesh, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -55,9 +55,9 @@ Foam::tmp<Foam::fv::gradScheme<Type>> Foam::fv::gradScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = IstreamConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -68,7 +68,7 @@ Foam::tmp<Foam::fv::gradScheme<Type>> Foam::fv::gradScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
return ctorPtr(mesh, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -66,9 +66,9 @@ tmp<laplacianScheme<Type, GType>> laplacianScheme<Type, GType>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = IstreamConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -79,7 +79,7 @@ tmp<laplacianScheme<Type, GType>> laplacianScheme<Type, GType>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
return ctorPtr(mesh, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -68,9 +68,9 @@ tmp<snGradScheme<Type>> snGradScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = MeshConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = MeshConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -81,7 +81,7 @@ tmp<snGradScheme<Type>> snGradScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
return ctorPtr(mesh, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 DLR
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -45,9 +46,9 @@ Foam::autoPtr<Foam::multiDimPolyFunctions> Foam::multiDimPolyFunctions::New
|
||||
const labelVector& dirs
|
||||
)
|
||||
{
|
||||
auto cstrIter = wordConstructorTablePtr_->cfind(multiDimPolyFunctionsType);
|
||||
auto* ctorPtr = wordConstructorTable(multiDimPolyFunctionsType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -57,7 +58,7 @@ Foam::autoPtr<Foam::multiDimPolyFunctions> Foam::multiDimPolyFunctions::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<multiDimPolyFunctions>(cstrIter()(dirs));
|
||||
return autoPtr<multiDimPolyFunctions>(ctorPtr(dirs));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -60,9 +60,9 @@ Foam::fvGeometryScheme::New
|
||||
InfoInFunction << "Geometry scheme = " << schemeName << endl;
|
||||
}
|
||||
|
||||
auto cstrIter = dictConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = dictConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -73,7 +73,7 @@ Foam::fvGeometryScheme::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, dict);
|
||||
return ctorPtr(mesh, dict);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -80,21 +80,27 @@ Foam::fvPatch::~fvPatch()
|
||||
|
||||
bool Foam::fvPatch::constraintType(const word& pt)
|
||||
{
|
||||
return fvPatchField<scalar>::patchConstructorTablePtr_->found(pt);
|
||||
return
|
||||
(
|
||||
fvPatchField<scalar>::patchConstructorTablePtr_
|
||||
&& fvPatchField<scalar>::patchConstructorTablePtr_->found(pt)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::wordList Foam::fvPatch::constraintTypes()
|
||||
{
|
||||
wordList cTypes(polyPatchConstructorTablePtr_->size());
|
||||
const auto& cnstrTable = *polyPatchConstructorTablePtr_;
|
||||
|
||||
wordList cTypes(cnstrTable.size());
|
||||
|
||||
label i = 0;
|
||||
|
||||
forAllConstIters(*polyPatchConstructorTablePtr_, cstrIter)
|
||||
forAllConstIters(cnstrTable, iter)
|
||||
{
|
||||
if (constraintType(cstrIter.key()))
|
||||
if (constraintType(iter.key()))
|
||||
{
|
||||
cTypes[i++] = cstrIter.key();
|
||||
cTypes[i++] = iter.key();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -39,9 +39,9 @@ Foam::autoPtr<Foam::fvPatch> Foam::fvPatch::New
|
||||
{
|
||||
DebugInFunction << "Constructing fvPatch" << endl;
|
||||
|
||||
auto cstrIter = polyPatchConstructorTablePtr_->cfind(patch.type());
|
||||
auto* ctorPtr = polyPatchConstructorTable(patch.type());
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -51,7 +51,7 @@ Foam::autoPtr<Foam::fvPatch> Foam::fvPatch::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<fvPatch>(cstrIter()(patch, bm));
|
||||
return autoPtr<fvPatch>(ctorPtr(patch, bm));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -42,7 +42,7 @@ defineRunTimeSelectionTable(simplifiedFvMesh, time);
|
||||
|
||||
bool Foam::simplifiedFvMesh::fvPatchFieldExists(const word& patchType)
|
||||
{
|
||||
if
|
||||
return
|
||||
(
|
||||
fvPatchField<scalar>::dictionaryConstructorTablePtr_->found(patchType)
|
||||
|| fvPatchField<vector>::dictionaryConstructorTablePtr_->found(patchType)
|
||||
@ -51,12 +51,7 @@ bool Foam::simplifiedFvMesh::fvPatchFieldExists(const word& patchType)
|
||||
|| fvPatchField<symmTensor>::
|
||||
dictionaryConstructorTablePtr_->found(patchType)
|
||||
|| fvPatchField<tensor>::dictionaryConstructorTablePtr_->found(patchType)
|
||||
)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -90,9 +85,9 @@ Foam::autoPtr<Foam::simplifiedFvMesh> Foam::simplifiedFvMesh::New
|
||||
{
|
||||
Info<< "Selecting simplified mesh model " << modelType << endl;
|
||||
|
||||
auto cstrIter = timeConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = timeConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -102,7 +97,7 @@ Foam::autoPtr<Foam::simplifiedFvMesh> Foam::simplifiedFvMesh::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<simplifiedFvMesh>(cstrIter()(runTime));
|
||||
return autoPtr<simplifiedFvMesh>(ctorPtr(runTime));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -71,9 +71,9 @@ Foam::patchDistMethod::New
|
||||
);
|
||||
|
||||
Info<< "Selecting patchDistMethod " << modelType << endl;
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -84,7 +84,7 @@ Foam::patchDistMethod::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict, mesh, patchIDs);
|
||||
return ctorPtr(dict, mesh, patchIDs);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -38,9 +38,9 @@ Foam::autoPtr<Foam::interpolation<Type>> Foam::interpolation<Type>::New
|
||||
const GeometricField<Type, fvPatchField, volMesh>& psi
|
||||
)
|
||||
{
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(interpolationType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(interpolationType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalErrorInLookup
|
||||
(
|
||||
@ -50,7 +50,7 @@ Foam::autoPtr<Foam::interpolation<Type>> Foam::interpolation<Type>::New
|
||||
) << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<interpolation<Type>>(cstrIter()(psi));
|
||||
return autoPtr<interpolation<Type>>(ctorPtr(psi));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -59,9 +59,9 @@ Foam::limitedSurfaceInterpolationScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = MeshConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = MeshConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -72,7 +72,7 @@ Foam::limitedSurfaceInterpolationScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
return ctorPtr(mesh, schemeData);
|
||||
}
|
||||
|
||||
|
||||
@ -104,9 +104,9 @@ Foam::limitedSurfaceInterpolationScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = MeshFluxConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = MeshFluxConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -117,7 +117,7 @@ Foam::limitedSurfaceInterpolationScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, faceFlux, schemeData);
|
||||
return ctorPtr(mesh, faceFlux, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -68,9 +68,9 @@ Foam::multivariateSurfaceInterpolationScheme<Type>::New
|
||||
|
||||
const word schemeName(schemeData);
|
||||
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = IstreamConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -81,7 +81,7 @@ Foam::multivariateSurfaceInterpolationScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, vtfs, faceFlux, schemeData);
|
||||
return ctorPtr(mesh, vtfs, faceFlux, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -58,9 +58,9 @@ Foam::surfaceInterpolationScheme<Type>::New
|
||||
InfoInFunction << "Discretisation scheme = " << schemeName << endl;
|
||||
}
|
||||
|
||||
auto cstrIter = MeshConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = MeshConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -71,7 +71,7 @@ Foam::surfaceInterpolationScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
return ctorPtr(mesh, schemeData);
|
||||
}
|
||||
|
||||
|
||||
@ -101,9 +101,9 @@ Foam::surfaceInterpolationScheme<Type>::New
|
||||
InfoInFunction << "Discretisation scheme = " << schemeName << endl;
|
||||
}
|
||||
|
||||
auto cstrIter = MeshFluxConstructorTablePtr_->cfind(schemeName);
|
||||
auto* ctorPtr = MeshFluxConstructorTable(schemeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -114,7 +114,7 @@ Foam::surfaceInterpolationScheme<Type>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, faceFlux, schemeData);
|
||||
return ctorPtr(mesh, faceFlux, schemeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -38,9 +38,9 @@ Foam::autoPtr<Foam::DMDModel> Foam::DMDModel::New
|
||||
{
|
||||
const word modelType(dict.get<word>("DMDModel"));
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -51,7 +51,7 @@ Foam::autoPtr<Foam::DMDModel> Foam::DMDModel::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<DMDModel>(cstrIter()(mesh, name, dict));
|
||||
return autoPtr<DMDModel>(ctorPtr(mesh, name, dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -46,9 +46,9 @@ Foam::functionObjects::fieldValue::New
|
||||
Info<< "Selecting " << typeName << ' ' << modelType << endl;
|
||||
}
|
||||
|
||||
auto cstrIter = runTimeConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = runTimeConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -59,7 +59,7 @@ Foam::functionObjects::fieldValue::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<fieldValue>(cstrIter()(name, runTime, dict));
|
||||
return autoPtr<fieldValue>(ctorPtr(name, runTime, dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -42,9 +42,9 @@ Foam::autoPtr<Foam::heatTransferCoeffModel> Foam::heatTransferCoeffModel::New
|
||||
|
||||
Info<< "Selecting heat transfer coefficient model " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -55,7 +55,7 @@ Foam::autoPtr<Foam::heatTransferCoeffModel> Foam::heatTransferCoeffModel::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<heatTransferCoeffModel>(cstrIter()(dict, mesh, TName));
|
||||
return autoPtr<heatTransferCoeffModel>(ctorPtr(dict, mesh, TName));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2015 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -43,9 +43,9 @@ Foam::functionObjects::runTimeControls::runTimeCondition::New
|
||||
|
||||
Info<< "Selecting runTimeCondition " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -59,7 +59,7 @@ Foam::functionObjects::runTimeControls::runTimeCondition::New
|
||||
return
|
||||
autoPtr<runTimeCondition>
|
||||
(
|
||||
cstrIter()(conditionName, obr, dict, state)
|
||||
ctorPtr(conditionName, obr, dict, state)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -57,9 +57,9 @@ Foam::autoPtr<Foam::motionDiffusivity> Foam::motionDiffusivity::New
|
||||
|
||||
Info<< "Selecting motion diffusion: " << modelType << endl;
|
||||
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = IstreamConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -70,7 +70,7 @@ Foam::autoPtr<Foam::motionDiffusivity> Foam::motionDiffusivity::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<motionDiffusivity>(cstrIter()(mesh, is));
|
||||
return autoPtr<motionDiffusivity>(ctorPtr(mesh, is));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2015 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -76,9 +76,9 @@ Foam::motionInterpolation::New(const fvMesh& mesh, Istream& is)
|
||||
|
||||
Info<< "Selecting motion interpolation: " << modelType << endl;
|
||||
|
||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = IstreamConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -89,7 +89,7 @@ Foam::motionInterpolation::New(const fvMesh& mesh, Istream& is)
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<motionInterpolation>(cstrIter()(mesh, is));
|
||||
return autoPtr<motionInterpolation>(ctorPtr(mesh, is));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -75,9 +75,9 @@ Foam::autoPtr<Foam::profileModel> Foam::profileModel::New
|
||||
|
||||
Info<< " - creating " << modelType << " profile " << modelName << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -88,7 +88,7 @@ Foam::autoPtr<Foam::profileModel> Foam::profileModel::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<profileModel>(cstrIter()(dict, modelName));
|
||||
return autoPtr<profileModel>(ctorPtr(dict, modelName));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -40,9 +40,9 @@ Foam::autoPtr<Foam::trimModel> Foam::trimModel::New
|
||||
|
||||
Info<< " Selecting " << typeName << " " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -53,7 +53,7 @@ Foam::autoPtr<Foam::trimModel> Foam::trimModel::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<trimModel>(cstrIter()(rotor, dict));
|
||||
return autoPtr<trimModel>(ctorPtr(rotor, dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -42,9 +42,9 @@ Foam::BinaryCollisionModel<CloudType>::New
|
||||
|
||||
Info<< "Selecting BinaryCollisionModel " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -57,7 +57,7 @@ Foam::BinaryCollisionModel<CloudType>::New
|
||||
|
||||
return autoPtr<BinaryCollisionModel<CloudType>>
|
||||
(
|
||||
cstrIter()(dict, owner)
|
||||
ctorPtr(dict, owner)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -42,9 +42,9 @@ Foam::InflowBoundaryModel<CloudType>::New
|
||||
|
||||
Info<< "Selecting InflowBoundaryModel " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -55,7 +55,7 @@ Foam::InflowBoundaryModel<CloudType>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<InflowBoundaryModel<CloudType>>(cstrIter()(dict, owner));
|
||||
return autoPtr<InflowBoundaryModel<CloudType>>(ctorPtr(dict, owner));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -42,9 +42,9 @@ Foam::WallInteractionModel<CloudType>::New
|
||||
|
||||
Info<< "Selecting WallInteractionModel " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -55,7 +55,7 @@ Foam::WallInteractionModel<CloudType>::New
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<WallInteractionModel<CloudType>>(cstrIter()(dict, owner));
|
||||
return autoPtr<WallInteractionModel<CloudType>>(ctorPtr(dict, owner));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -40,9 +40,9 @@ Foam::autoPtr<Foam::distributionModel> Foam::distributionModel::New
|
||||
|
||||
Info<< "Selecting distribution model " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
auto* ctorPtr = dictionaryConstructorTable(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!ctorPtr)
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
@ -56,7 +56,7 @@ Foam::autoPtr<Foam::distributionModel> Foam::distributionModel::New
|
||||
const dictionary distributionDict =
|
||||
dict.subOrEmptyDict(modelType & "Distribution");
|
||||
|
||||
return autoPtr<distributionModel>(cstrIter()(distributionDict, rndGen));
|
||||
return autoPtr<distributionModel>(ctorPtr(distributionDict, rndGen));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user