Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
5cfa9762
Commit
5cfa9762
authored
Apr 20, 2010
by
Mark Olesen
Browse files
STYLE: more consistent New methods, use unregistered IOobject where appropriate
parent
9707e5c1
Changes
166
Hide whitespace changes
Inline
Side-by-side
applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C
View file @
5cfa9762
...
...
@@ -27,7 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam
::
autoPtr
<
Foam
::
PDRDragModel
>
Foam
::
PDRDragModel
::
New
Foam
::
autoPtr
<
Foam
::
PDRDragModel
>
Foam
::
PDRDragModel
::
New
(
const
dictionary
&
PDRProperties
,
const
compressible
::
RASModel
&
turbulence
,
...
...
@@ -36,12 +37,15 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
const
surfaceScalarField
&
phi
)
{
word
PDRDragModelTypeName
=
PDRProperties
.
lookup
(
"PDRDragModel"
);
const
word
modelType
(
PDRProperties
.
lookup
(
"PDRDragModel"
)
);
Info
<<
"Selecting flame-wrinkling model "
<<
PDRDragM
odelType
Name
<<
endl
;
Info
<<
"Selecting flame-wrinkling model "
<<
m
odelType
<<
endl
;
dictionaryConstructorTable
::
iterator
cstrIter
=
dictionaryConstructorTablePtr_
->
find
(
PDRDragM
odelType
Name
);
dictionaryConstructorTablePtr_
->
find
(
m
odelType
);
if
(
cstrIter
==
dictionaryConstructorTablePtr_
->
end
())
{
...
...
@@ -49,7 +53,7 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
(
"PDRDragModel::New"
)
<<
"Unknown PDRDragModel type "
<<
PDRDragM
odelType
Name
<<
end
l
<<
end
l
<<
m
odelType
<<
n
l
<<
n
l
<<
"Valid PDRDragModels are : "
<<
endl
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
exit
(
FatalError
);
...
...
applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C
View file @
5cfa9762
...
...
@@ -27,7 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam
::
autoPtr
<
Foam
::
XiEqModel
>
Foam
::
XiEqModel
::
New
Foam
::
autoPtr
<
Foam
::
XiEqModel
>
Foam
::
XiEqModel
::
New
(
const
dictionary
&
XiEqProperties
,
const
hhuCombustionThermo
&
thermo
,
...
...
@@ -35,12 +36,15 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
const
volScalarField
&
Su
)
{
word
XiEqModelTypeName
=
XiEqProperties
.
lookup
(
"XiEqModel"
);
const
word
modelType
(
XiEqProperties
.
lookup
(
"XiEqModel"
)
);
Info
<<
"Selecting flame-wrinkling model "
<<
XiEqM
odelType
Name
<<
endl
;
Info
<<
"Selecting flame-wrinkling model "
<<
m
odelType
<<
endl
;
dictionaryConstructorTable
::
iterator
cstrIter
=
dictionaryConstructorTablePtr_
->
find
(
XiEqM
odelType
Name
);
dictionaryConstructorTablePtr_
->
find
(
m
odelType
);
if
(
cstrIter
==
dictionaryConstructorTablePtr_
->
end
())
{
...
...
@@ -53,8 +57,8 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
" const volScalarField& Su"
")"
)
<<
"Unknown XiEqModel type "
<<
XiEqM
odelType
Name
<<
end
l
<<
end
l
<<
"Valid
XiEqModels are : "
<<
endl
<<
m
odelType
<<
n
l
<<
n
l
<<
"Valid XiEqModels are : "
<<
endl
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
exit
(
FatalError
);
}
...
...
applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C
View file @
5cfa9762
...
...
@@ -27,7 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam
::
autoPtr
<
Foam
::
XiGModel
>
Foam
::
XiGModel
::
New
Foam
::
autoPtr
<
Foam
::
XiGModel
>
Foam
::
XiGModel
::
New
(
const
dictionary
&
XiGProperties
,
const
hhuCombustionThermo
&
thermo
,
...
...
@@ -35,12 +36,15 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
const
volScalarField
&
Su
)
{
word
XiGModelTypeName
=
XiGProperties
.
lookup
(
"XiGModel"
);
const
word
modelType
(
XiGProperties
.
lookup
(
"XiGModel"
)
);
Info
<<
"Selecting flame-wrinkling model "
<<
XiGM
odelType
Name
<<
endl
;
Info
<<
"Selecting flame-wrinkling model "
<<
m
odelType
<<
endl
;
dictionaryConstructorTable
::
iterator
cstrIter
=
dictionaryConstructorTablePtr_
->
find
(
XiGM
odelType
Name
);
dictionaryConstructorTablePtr_
->
find
(
m
odelType
);
if
(
cstrIter
==
dictionaryConstructorTablePtr_
->
end
())
{
...
...
@@ -53,8 +57,8 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
" const volScalarField& Su"
")"
)
<<
"Unknown XiGModel type "
<<
XiGM
odelType
Name
<<
end
l
<<
end
l
<<
"Valid
XiGModels are : "
<<
endl
<<
m
odelType
<<
n
l
<<
n
l
<<
"Valid XiGModels are : "
<<
endl
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
exit
(
FatalError
);
}
...
...
applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C
View file @
5cfa9762
...
...
@@ -27,7 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam
::
autoPtr
<
Foam
::
XiModel
>
Foam
::
XiModel
::
New
Foam
::
autoPtr
<
Foam
::
XiModel
>
Foam
::
XiModel
::
New
(
const
dictionary
&
XiProperties
,
const
hhuCombustionThermo
&
thermo
,
...
...
@@ -38,12 +39,15 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
const
surfaceScalarField
&
phi
)
{
word
XiModelTypeName
=
XiProperties
.
lookup
(
"XiModel"
);
const
word
modelType
(
XiProperties
.
lookup
(
"XiModel"
)
);
Info
<<
"Selecting flame-wrinkling model "
<<
XiM
odelType
Name
<<
endl
;
Info
<<
"Selecting flame-wrinkling model "
<<
m
odelType
<<
endl
;
dictionaryConstructorTable
::
iterator
cstrIter
=
dictionaryConstructorTablePtr_
->
find
(
XiM
odelType
Name
);
dictionaryConstructorTablePtr_
->
find
(
m
odelType
);
if
(
cstrIter
==
dictionaryConstructorTablePtr_
->
end
())
{
...
...
@@ -51,8 +55,8 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
(
"XiModel::New"
)
<<
"Unknown XiModel type "
<<
XiM
odelType
Name
<<
end
l
<<
end
l
<<
"Valid
XiModels are : "
<<
endl
<<
m
odelType
<<
n
l
<<
n
l
<<
"Valid XiModels are : "
<<
endl
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
exit
(
FatalError
);
}
...
...
applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C
View file @
5cfa9762
...
...
@@ -27,7 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam
::
autoPtr
<
Foam
::
combustionModel
>
Foam
::
combustionModel
::
New
Foam
::
autoPtr
<
Foam
::
combustionModel
>
Foam
::
combustionModel
::
New
(
const
dictionary
&
combustionProperties
,
const
hsCombustionThermo
&
thermo
,
...
...
@@ -36,15 +37,18 @@ Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New
const
volScalarField
&
rho
)
{
word
combustionModelTypeName
=
combustionProperties
.
lookup
const
word
modelType
(
"combustionModel"
combustionProperties
.
lookup
(
"combustionModel"
)
);
Info
<<
"Selecting combustion model "
<<
combustionM
odelType
Name
<<
endl
;
Info
<<
"Selecting combustion model "
<<
m
odelType
<<
endl
;
dictionaryConstructorTable
::
iterator
cstrIter
=
dictionaryConstructorTablePtr_
->
find
(
combustionM
odelType
Name
);
dictionaryConstructorTablePtr_
->
find
(
m
odelType
);
if
(
cstrIter
==
dictionaryConstructorTablePtr_
->
end
())
{
...
...
@@ -52,8 +56,8 @@ Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New
(
"combustionModel::New"
)
<<
"Unknown combustionModel type "
<<
combustionM
odelType
Name
<<
end
l
<<
end
l
<<
"Valid
combustionModels are : "
<<
endl
<<
m
odelType
<<
n
l
<<
n
l
<<
"Valid combustionModels are : "
<<
endl
<<
dictionaryConstructorTablePtr_
->
toc
()
<<
exit
(
FatalError
);
}
...
...
applications/solvers/lagrangian/coalChemistryFoam/createFields.H
View file @
5cfa9762
...
...
@@ -11,7 +11,7 @@
basicMultiComponentMixture
&
composition
=
thermo
.
composition
();
PtrList
<
volScalarField
>&
Y
=
composition
.
Y
();
word
inertSpecie
(
thermo
.
lookup
(
"inertSpecie"
));
const
word
inertSpecie
(
thermo
.
lookup
(
"inertSpecie"
));
if
(
!
composition
.
contains
(
inertSpecie
))
{
...
...
applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H
View file @
5cfa9762
...
...
@@ -11,7 +11,7 @@
basicMultiComponentMixture
&
composition
=
thermo
.
composition
();
PtrList
<
volScalarField
>&
Y
=
composition
.
Y
();
word
inertSpecie
(
thermo
.
lookup
(
"inertSpecie"
));
const
word
inertSpecie
(
thermo
.
lookup
(
"inertSpecie"
));
if
(
!
composition
.
contains
(
inertSpecie
))
{
...
...
applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H
View file @
5cfa9762
...
...
@@ -11,7 +11,7 @@
basicMultiComponentMixture
&
composition
=
thermo
.
composition
();
PtrList
<
volScalarField
>&
Y
=
composition
.
Y
();
word
inertSpecie
(
thermo
.
lookup
(
"inertSpecie"
));
const
word
inertSpecie
(
thermo
.
lookup
(
"inertSpecie"
));
volScalarField
&
p
=
thermo
.
p
();
volScalarField
&
hs
=
thermo
.
hs
();
...
...
applications/solvers/lagrangian/reactingParcelFoam/createFields.H
View file @
5cfa9762
...
...
@@ -11,7 +11,7 @@
basicMultiComponentMixture
&
composition
=
thermo
.
composition
();
PtrList
<
volScalarField
>&
Y
=
composition
.
Y
();
word
inertSpecie
(
thermo
.
lookup
(
"inertSpecie"
));
const
word
inertSpecie
(
thermo
.
lookup
(
"inertSpecie"
));
if
(
!
composition
.
contains
(
inertSpecie
))
{
...
...
applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C
View file @
5cfa9762
...
...
@@ -36,22 +36,21 @@ Foam::phaseChangeTwoPhaseMixture::New
const
word
&
alpha1Name
)
{
IOdictionary
transportPropertiesDict
// get model name, but do not register the dictionary
const
word
phaseChangeTwoPhaseMixtureTypeName
(
IO
object
IO
dictionary
(
"transportProperties"
,
U
.
time
().
constant
(),
U
.
db
(),
IOobject
::
MUST_READ
,
IOobject
::
NO_WRITE
,
false
)
);
word
phaseChangeTwoPhaseMixtureTypeName
(
transportPropertiesDict
.
lookup
(
"phaseChangeTwoPhaseMixture"
)
IOobject
(
"transportProperties"
,
U
.
time
().
constant
(),
U
.
db
(),
IOobject
::
MUST_READ
,
IOobject
::
NO_WRITE
,
false
)
).
lookup
(
"phaseChangeTwoPhaseMixture"
)
);
Info
<<
"Selecting phaseChange model "
...
...
@@ -67,8 +66,8 @@ Foam::phaseChangeTwoPhaseMixture::New
(
"phaseChangeTwoPhaseMixture::New"
)
<<
"Unknown phaseChangeTwoPhaseMixture type "
<<
phaseChangeTwoPhaseMixtureTypeName
<<
end
l
<<
end
l
<<
"Valid
phaseChangeTwoPhaseMixtures are : "
<<
endl
<<
phaseChangeTwoPhaseMixtureTypeName
<<
n
l
<<
n
l
<<
"Valid phaseChangeTwoPhaseMixture
type
s are : "
<<
endl
<<
componentsConstructorTablePtr_
->
sortedToc
()
<<
exit
(
FatalError
);
}
...
...
applications/solvers/multiphase/settlingFoam/createFields.H
View file @
5cfa9762
...
...
@@ -159,7 +159,7 @@
Info
<<
"Selecting Drift-Flux model "
<<
endl
;
word
VdjModel
(
transportProperties
.
lookup
(
"VdjModel"
));
const
word
VdjModel
(
transportProperties
.
lookup
(
"VdjModel"
));
Info
<<
tab
<<
VdjModel
<<
" selected
\n
"
<<
endl
;
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModelNew.C
View file @
5cfa9762
...
...
@@ -27,7 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam
::
autoPtr
<
Foam
::
dragModel
>
Foam
::
dragModel
::
New
Foam
::
autoPtr
<
Foam
::
dragModel
>
Foam
::
dragModel
::
New
(
const
dictionary
&
interfaceDict
,
const
volScalarField
&
alpha
,
...
...
@@ -35,7 +36,7 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
const
phaseModel
&
phaseb
)
{
word
dragM
odelType
const
word
m
odelType
(
interfaceDict
.
lookup
(
"dragModel"
+
phasea
.
name
())
);
...
...
@@ -43,20 +44,21 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
Info
<<
"Selecting dragModel for phase "
<<
phasea
.
name
()
<<
": "
<<
dragM
odelType
<<
endl
;
<<
m
odelType
<<
endl
;
dictionaryConstructorTable
::
iterator
cstrIter
=
dictionaryConstructorTablePtr_
->
find
(
dragM
odelType
);
dictionaryConstructorTablePtr_
->
find
(
m
odelType
);
if
(
cstrIter
==
dictionaryConstructorTablePtr_
->
end
())
{
FatalError
<<
"dragModel::New : "
<<
endl
<<
" unknown dragModelType type "
<<
dragModelType
<<
", constructor not in hash table"
<<
endl
<<
endl
<<
" Valid dragModel types are : "
<<
endl
;
Info
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
abort
(
FatalError
);
FatalErrorIn
(
"dragModel::New(...)"
)
<<
"Unknown dragModel type "
<<
modelType
<<
nl
<<
nl
<<
"Valid dragModel types are : "
<<
endl
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
abort
(
FatalError
);
}
return
cstrIter
()(
interfaceDict
,
alpha
,
phasea
,
phaseb
);
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C
View file @
5cfa9762
...
...
@@ -27,28 +27,32 @@ License
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam
::
autoPtr
<
Foam
::
conductivityModel
>
Foam
::
conductivityModel
::
New
Foam
::
autoPtr
<
Foam
::
conductivityModel
>
Foam
::
conductivityModel
::
New
(
const
dictionary
&
dict
)
{
word
conductivityModelType
(
dict
.
lookup
(
"conductivityModel"
));
const
word
modelType
(
dict
.
lookup
(
"conductivityModel"
)
);
Info
<<
"Selecting conductivityModel "
<<
conductivityModelType
<<
endl
;
Info
<<
"Selecting conductivityModel "
<<
modelType
<<
endl
;
dictionaryConstructorTable
::
iterator
cstrIter
=
dictionaryConstructorTablePtr_
->
find
(
conductivityM
odelType
);
dictionaryConstructorTablePtr_
->
find
(
m
odelType
);
if
(
cstrIter
==
dictionaryConstructorTablePtr_
->
end
())
{
FatalError
<<
"conductivityModel::New(const dictionary&) : "
<<
endl
<<
" unknown conductivityModelType type "
<<
conductivityModelType
<<
", constructor not in hash table"
<<
endl
<<
endl
<<
" Valid conductivityModelType types are :"
<<
endl
;
Info
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
abort
(
FatalError
);
FatalErrorIn
(
"conductivityModel::New(const dictionary&)"
)
<<
"Unknown conductivityModel type "
<<
modelType
<<
nl
<<
nl
<<
"Valid conductivityModel types are :"
<<
endl
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
abort
(
FatalError
);
}
return
autoPtr
<
conductivityModel
>
(
cstrIter
()(
dict
));
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C
View file @
5cfa9762
...
...
@@ -27,28 +27,33 @@ License
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam
::
autoPtr
<
Foam
::
frictionalStressModel
>
Foam
::
frictionalStressModel
::
New
Foam
::
autoPtr
<
Foam
::
frictionalStressModel
>
Foam
::
frictionalStressModel
::
New
(
const
dictionary
&
dict
)
{
word
frictionalStressModelType
(
dict
.
lookup
(
"frictionalStressModel"
));
const
word
modelType
(
dict
.
lookup
(
"frictionalStressModel"
)
);
Info
<<
"Selecting frictionalStressModel "
<<
frictionalStressModelType
<<
endl
;
Info
<<
"Selecting frictionalStressModel "
<<
modelType
<<
endl
;
dictionaryConstructorTable
::
iterator
cstrIter
=
dictionaryConstructorTablePtr_
->
find
(
frictionalStressM
odelType
);
dictionaryConstructorTablePtr_
->
find
(
m
odelType
);
if
(
cstrIter
==
dictionaryConstructorTablePtr_
->
end
())
{
FatalError
<<
"frictionalStressModel::New(const dictionary&) : "
<<
endl
<<
" unknown frictionalStressModelType type "
<<
frictionalStressModelType
<<
", constructor not in hash table"
<<
endl
<<
endl
<<
" Valid frictionalStressModelType types are :"
<<
endl
;
Info
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
abort
(
FatalError
);
FatalErrorIn
(
"frictionalStressModel::New(const dictionary&)"
)
<<
"Unknown frictionalStressModel type "
<<
modelType
<<
nl
<<
nl
<<
"Valid frictionalStressModel types are :"
<<
endl
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
abort
(
FatalError
);
}
return
autoPtr
<
frictionalStressModel
>
(
cstrIter
()(
dict
));
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C
View file @
5cfa9762
...
...
@@ -27,28 +27,32 @@ License
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam
::
autoPtr
<
Foam
::
granularPressureModel
>
Foam
::
granularPressureModel
::
New
Foam
::
autoPtr
<
Foam
::
granularPressureModel
>
Foam
::
granularPressureModel
::
New
(
const
dictionary
&
dict
)
{
word
granularPressureModelType
(
dict
.
lookup
(
"granularPressureModel"
));
const
word
modelType
(
dict
.
lookup
(
"granularPressureModel"
)
);
Info
<<
"Selecting granularPressureModel "
<<
granularPressureModelType
<<
endl
;
Info
<<
"Selecting granularPressureModel "
<<
modelType
<<
endl
;
dictionaryConstructorTable
::
iterator
cstrIter
=
dictionaryConstructorTablePtr_
->
find
(
granularPressureM
odelType
);
dictionaryConstructorTablePtr_
->
find
(
m
odelType
);
if
(
cstrIter
==
dictionaryConstructorTablePtr_
->
end
())
{
FatalError
<<
"granularPressureModel::New(const dictionary&) : "
<<
endl
<<
" unknown granularPressureModelType type "
<<
granularPressureModelType
<<
", constructor not in hash table"
<<
endl
<<
endl
<<
" Valid granularPressureModelType types are :"
<<
endl
;
Info
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
abort
(
FatalError
);
FatalErrorIn
(
"granularPressureModel::New(const dictionary&)"
)
<<
"Unknown granularPressureModel type "
<<
modelType
<<
nl
<<
nl
<<
"Valid granularPressureModel types are :"
<<
endl
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
abort
(
FatalError
);
}
return
autoPtr
<
granularPressureModel
>
(
cstrIter
()(
dict
));
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModelNew.C
View file @
5cfa9762
...
...
@@ -27,28 +27,33 @@ License
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam
::
autoPtr
<
Foam
::
radialModel
>
Foam
::
radialModel
::
New
Foam
::
autoPtr
<
Foam
::
radialModel
>
Foam
::
radialModel
::
New
(
const
dictionary
&
dict
)
{
word
radialModelType
(
dict
.
lookup
(
"radialModel"
));
const
word
modelType
(
dict
.
lookup
(
"radialModel"
)
);
Info
<<
"Selecting radialModel "
<<
radialModelType
<<
endl
;
Info
<<
"Selecting radialModel "
<<
modelType
<<
endl
;
dictionaryConstructorTable
::
iterator
cstrIter
=
dictionaryConstructorTablePtr_
->
find
(
radialM
odelType
);
dictionaryConstructorTablePtr_
->
find
(
m
odelType
);
if
(
cstrIter
==
dictionaryConstructorTablePtr_
->
end
())
{
FatalError
<<
"radialModel::New(const dictionary&) : "
<<
endl
<<
" unknown radialModelType type "
<<
radialModelType
<<
", constructor not in hash table"
<<
endl
<<
endl
<<
" Valid radialModelType types are :"
<<
endl
;
Info
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
abort
(
FatalError
);
FatalErrorIn
(
"radialModel::New(const dictionary&)"
)
<<
"Unknown radialModel type "
<<
modelType
<<
nl
<<
nl
<<
"Valid radialModel types are :"
<<
endl
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
abort
(
FatalError
);
}
return
autoPtr
<
radialModel
>
(
cstrIter
()(
dict
));
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C
View file @
5cfa9762
...
...
@@ -33,23 +33,26 @@ Foam::kineticTheoryModels::viscosityModel::New
const
dictionary
&
dict
)
{
word
viscosityModelType
(
dict
.
lookup
(
"viscosityModel"
));
const
word
modelType
(
dict
.
lookup
(
"viscosityModel"
)
);
Info
<<
"Selecting viscosityModel "
<<
viscosityModelType
<<
endl
;
Info
<<
"Selecting viscosityModel "
<<
modelType
<<
endl
;
dictionaryConstructorTable
::
iterator
cstrIter
=
dictionaryConstructorTablePtr_
->
find
(
viscosityM
odelType
);
dictionaryConstructorTablePtr_
->
find
(
m
odelType
);
if
(
cstrIter
==
dictionaryConstructorTablePtr_
->
end
())
{
FatalError
<<
"viscosityModel::New(const dictionary&) : "
<<
endl
<<
" unknown viscosityModelType type "
<<
viscosityModelType
<<
", constructor not in hash table"
<<
endl
<<
endl
<<
" Valid viscosityModelType types are :"
<<
endl
;
Info
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
abort
(
FatalError
);
FatalErrorIn