STYLE: more consistent New methods, use unregistered IOobject where appropriate
This commit is contained in:
@ -30,17 +30,16 @@ License
|
||||
Foam::autoPtr<Foam::sixDoFRigidBodyMotionConstraint>
|
||||
Foam::sixDoFRigidBodyMotionConstraint::New(const dictionary& sDoFRBMCDict)
|
||||
{
|
||||
word sixDoFRigidBodyMotionConstraintTypeName =
|
||||
sDoFRBMCDict.lookup("sixDoFRigidBodyMotionConstraint");
|
||||
const word constraintType
|
||||
(
|
||||
sDoFRBMCDict.lookup("sixDoFRigidBodyMotionConstraint")
|
||||
);
|
||||
|
||||
// Info<< "Selecting sixDoFRigidBodyMotionConstraint function "
|
||||
// << sixDoFRigidBodyMotionConstraintTypeName << endl;
|
||||
// << constraintType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find
|
||||
(
|
||||
sixDoFRigidBodyMotionConstraintTypeName
|
||||
);
|
||||
dictionaryConstructorTablePtr_->find(constraintType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
@ -51,8 +50,8 @@ Foam::sixDoFRigidBodyMotionConstraint::New(const dictionary& sDoFRBMCDict)
|
||||
"const dictionary& sDoFRBMCDict"
|
||||
")"
|
||||
) << "Unknown sixDoFRigidBodyMotionConstraint type "
|
||||
<< sixDoFRigidBodyMotionConstraintTypeName << endl << endl
|
||||
<< "Valid sixDoFRigidBodyMotionConstraints are : " << endl
|
||||
<< constraintType << nl << nl
|
||||
<< "Valid sixDoFRigidBodyMotionConstraints are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -30,17 +30,16 @@ License
|
||||
Foam::autoPtr<Foam::sixDoFRigidBodyMotionRestraint>
|
||||
Foam::sixDoFRigidBodyMotionRestraint::New(const dictionary& sDoFRBMRDict)
|
||||
{
|
||||
word sixDoFRigidBodyMotionRestraintTypeName =
|
||||
sDoFRBMRDict.lookup("sixDoFRigidBodyMotionRestraint");
|
||||
const word restraintType
|
||||
(
|
||||
sDoFRBMRDict.lookup("sixDoFRigidBodyMotionRestraint")
|
||||
);
|
||||
|
||||
// Info<< "Selecting sixDoFRigidBodyMotionRestraint function "
|
||||
// << sixDoFRigidBodyMotionRestraintTypeName << endl;
|
||||
// << restraintType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find
|
||||
(
|
||||
sixDoFRigidBodyMotionRestraintTypeName
|
||||
);
|
||||
dictionaryConstructorTablePtr_->find(restraintType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
@ -51,8 +50,8 @@ Foam::sixDoFRigidBodyMotionRestraint::New(const dictionary& sDoFRBMRDict)
|
||||
"const dictionary& sDoFRBMRDict"
|
||||
")"
|
||||
) << "Unknown sixDoFRigidBodyMotionRestraint type "
|
||||
<< sixDoFRigidBodyMotionRestraintTypeName << endl << endl
|
||||
<< "Valid sixDoFRigidBodyMotionRestraints are : " << endl
|
||||
<< restraintType << nl << nl
|
||||
<< "Valid sixDoFRigidBodyMotionRestraint types are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -193,7 +193,7 @@ bool Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::read
|
||||
|
||||
moment_ = interpolationTable<scalar>(sDoFRBMRCoeffs_);
|
||||
|
||||
word angleFormat = sDoFRBMRCoeffs_.lookup("angleFormat");
|
||||
const word angleFormat = sDoFRBMRCoeffs_.lookup("angleFormat");
|
||||
|
||||
if (angleFormat == "degrees" || angleFormat == "degree")
|
||||
{
|
||||
@ -210,7 +210,7 @@ bool Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::read
|
||||
"Foam::sixDoFRigidBodyMotionRestraints::"
|
||||
"tabulatedAxialAngularSpring::read"
|
||||
"("
|
||||
"const dictionary& sDoFRBMCDict"
|
||||
"const dictionary&"
|
||||
")"
|
||||
)
|
||||
<< "angleFormat must be degree, degrees, radian or radians"
|
||||
|
||||
Reference in New Issue
Block a user