mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'bug-wrong-FatalIOError-message' into 'master'
BUG: Wrong FatalIOError message in displacementMethod and optMeshMovement (#1537) See merge request Development/openfoam!320
This commit is contained in:
@ -75,12 +75,11 @@ Foam::autoPtr<Foam::displacementMethod> Foam::displacementMethod::New
|
|||||||
false
|
false
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
word motionSolverName(dynamicMeshDict.get<word>("solver"));
|
word solverType(dynamicMeshDict.get<word>("solver"));
|
||||||
word modelType("displacementMethod" + motionSolverName);
|
|
||||||
|
|
||||||
Info<< "displacementMethod type : " << modelType << endl;
|
Info<< "displacementMethod type : " << solverType << endl;
|
||||||
|
|
||||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(solverType);
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
@ -88,9 +87,9 @@ Foam::autoPtr<Foam::displacementMethod> Foam::displacementMethod::New
|
|||||||
(
|
(
|
||||||
dynamicMeshDict,
|
dynamicMeshDict,
|
||||||
"solver",
|
"solver",
|
||||||
modelType,
|
solverType,
|
||||||
*dictionaryConstructorTablePtr_
|
*dictionaryConstructorTablePtr_
|
||||||
) << exit(FatalError);
|
) << exit(FatalIOError);
|
||||||
}
|
}
|
||||||
return autoPtr<displacementMethod>(cstrIter()(mesh, patchIDs));
|
return autoPtr<displacementMethod>(cstrIter()(mesh, patchIDs));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -82,7 +82,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("displacementMethoddisplacementLaplacian");
|
TypeName("displacementLaplacian");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|||||||
@ -86,7 +86,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("displacementMethodelasticityMotionSolver");
|
TypeName("elasticityMotionSolver");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|||||||
@ -83,7 +83,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("displacementMethodlaplacianMotionSolver");
|
TypeName("laplacianMotionSolver");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|||||||
@ -84,7 +84,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("displacementMethodvelocityLaplacian");
|
TypeName("velocityLaplacian");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|||||||
@ -77,7 +77,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("displacementMethodvolumetricBSplinesMotionSolver");
|
TypeName("volumetricBSplinesMotionSolver");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|||||||
@ -110,7 +110,7 @@ Foam::autoPtr<Foam::optMeshMovement> Foam::optMeshMovement::New
|
|||||||
"type",
|
"type",
|
||||||
modelType,
|
modelType,
|
||||||
*dictionaryConstructorTablePtr_
|
*dictionaryConstructorTablePtr_
|
||||||
) << exit(FatalError);
|
) << exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<optMeshMovement>(cstrIter()(mesh, dict, patchIDs));
|
return autoPtr<optMeshMovement>(cstrIter()(mesh, dict, patchIDs));
|
||||||
@ -156,9 +156,10 @@ void Foam::optMeshMovement::writeMeshQualityMetrics()
|
|||||||
if (writeMeshQualityMetrics_)
|
if (writeMeshQualityMetrics_)
|
||||||
{
|
{
|
||||||
cellQuality cellQualityEngine(mesh_);
|
cellQuality cellQualityEngine(mesh_);
|
||||||
tmp<scalarField> cellNonOrtho = cellQualityEngine.nonOrthogonality();
|
tmp<scalarField> cellNonOrtho(cellQualityEngine.nonOrthogonality());
|
||||||
tmp<scalarField> cellSkewness = cellQualityEngine.skewness();
|
tmp<scalarField> cellSkewness(cellQualityEngine.skewness());
|
||||||
Info<< "Average, Max cell non - orthogonality " << gAverage(cellNonOrtho())
|
Info<< "Average, Max cell non - orthogonality "
|
||||||
|
<< gAverage(cellNonOrtho())
|
||||||
<< " " << gMax(cellNonOrtho()) << endl;
|
<< " " << gMax(cellNonOrtho()) << endl;
|
||||||
Info<< "Average, Max cell skewness " << gAverage(cellSkewness())
|
Info<< "Average, Max cell skewness " << gAverage(cellSkewness())
|
||||||
<< " " << gMax(cellSkewness()) << endl;
|
<< " " << gMax(cellSkewness()) << endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user