mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of develop.openfoam.com:Development/OpenFOAM-plus into feature-shared-file
Conflicts: applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/pointFile/pointFile.C applications/utilities/miscellaneous/foamHelp/helpTypes/helpBoundary/helpBoundary.C applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUpdateInfo.C applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C applications/utilities/postProcessing/velocityField/Co/Co.C applications/utilities/postProcessing/velocityField/Pe/Pe.C applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C applications/utilities/preProcessing/changeDictionary/changeDictionary.C applications/utilities/preProcessing/setFields/setFields.C applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C applications/utilities/surface/surfaceMeshImport/surfaceMeshImport.C applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C src/OpenFOAM/db/IOobject/IOobject.C src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C src/OpenFOAM/db/IOobjects/IOField/IOField.C src/OpenFOAM/db/IOobjects/IOList/IOList.C src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C src/OpenFOAM/db/Time/findInstance.C src/OpenFOAM/db/regIOobject/regIOobject.C src/OpenFOAM/db/regIOobject/regIOobjectI.H src/OpenFOAM/db/regIOobject/regIOobjectRead.C src/OpenFOAM/db/regIOobject/regIOobjectWrite.C src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/IOmapDistribute.C src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C src/dynamicMesh/fvMeshDistribute/IOmapDistributePolyMesh.C src/dynamicMesh/motionSolver/componentDisplacement/componentDisplacementMotionSolver.C src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8Data.C src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.C src/edgeMesh/edgeMeshFormats/edgeMesh/edgeMeshFormat.C src/edgeMesh/extendedEdgeMesh/extendedEdgeMeshFormats/extendedEdgeMeshFormat/extendedEdgeMeshFormat.C src/edgeMesh/extendedEdgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMesh.C src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.C src/lagrangian/basic/Cloud/CloudIO.C src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.C src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransformTemplates.C src/postProcessing/functionObjects/field/readFields/readFieldsTemplates.C src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -64,15 +64,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolationMethodToWord
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"const Foam::word"
|
||||
"Foam::AMIInterpolation<SourcePatch, TargetPatch>::"
|
||||
"interpolationMethodToWord"
|
||||
"("
|
||||
"const interpolationMethod&"
|
||||
")"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Unhandled interpolationMethod enumeration " << method
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -122,16 +114,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::wordTointerpolationMethod
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::AMIInterpolation<SourcePatch, TargetPatch>::"
|
||||
"interpolationMethod"
|
||||
"Foam::AMIInterpolation<SourcePatch, TargetPatch>::"
|
||||
"wordTointerpolationMethod"
|
||||
"("
|
||||
"const word&"
|
||||
")"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Invalid interpolationMethod " << im
|
||||
<< ". Valid methods are:" << methods
|
||||
<< exit(FatalError);
|
||||
@ -177,15 +160,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::projectPointsToSurface
|
||||
|
||||
if (nMiss > 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::AMIInterpolation<SourcePatch, TargetPatch>::"
|
||||
"projectPointsToSurface"
|
||||
"("
|
||||
"const searchableSurface&, "
|
||||
"pointField&"
|
||||
") const"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Error projecting points to surface: "
|
||||
<< nMiss << " faces could not be determined"
|
||||
<< abort(FatalError);
|
||||
@ -827,15 +802,8 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation
|
||||
|| fineAMI.tgtAddress().size() != targetRestrictAddressing.size()
|
||||
)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation"
|
||||
"("
|
||||
"const AMIInterpolation<SourcePatch, TargetPatch>&, "
|
||||
"const labelList&, "
|
||||
"const labelList&"
|
||||
")"
|
||||
) << "Size mismatch." << nl
|
||||
FatalErrorInFunction
|
||||
<< "Size mismatch." << nl
|
||||
<< "Source patch size:" << fineAMI.srcAddress().size() << nl
|
||||
<< "Source agglomeration size:"
|
||||
<< sourceRestrictAddressing.size() << nl
|
||||
@ -1359,16 +1327,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
|
||||
{
|
||||
if (fld.size() != srcAddress_.size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"AMIInterpolation::interpolateToTarget"
|
||||
"("
|
||||
"const UList<Type>&, "
|
||||
"const CombineOp&, "
|
||||
"List<Type>&, "
|
||||
"const UList<Type>&"
|
||||
") const"
|
||||
) << "Supplied field size is not equal to source patch size" << nl
|
||||
FatalErrorInFunction
|
||||
<< "Supplied field size is not equal to source patch size" << nl
|
||||
<< " source patch = " << srcAddress_.size() << nl
|
||||
<< " target patch = " << tgtAddress_.size() << nl
|
||||
<< " supplied field = " << fld.size()
|
||||
@ -1379,16 +1339,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
|
||||
{
|
||||
if (defaultValues.size() != tgtAddress_.size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"AMIInterpolation::interpolateToTarget"
|
||||
"("
|
||||
"const UList<Type>&, "
|
||||
"const CombineOp&, "
|
||||
"List<Type>&, "
|
||||
"const UList<Type>&"
|
||||
") const"
|
||||
) << "Employing default values when sum of weights falls below "
|
||||
FatalErrorInFunction
|
||||
<< "Employing default values when sum of weights falls below "
|
||||
<< lowWeightCorrection_
|
||||
<< " but supplied default field size is not equal to target "
|
||||
<< "patch size" << nl
|
||||
@ -1460,16 +1412,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
|
||||
{
|
||||
if (fld.size() != tgtAddress_.size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"AMIInterpolation::interpolateToSource"
|
||||
"("
|
||||
"const UList<Type>&, "
|
||||
"const CombineOp&, "
|
||||
"List<Type>&, "
|
||||
"const UList<Type>&"
|
||||
") const"
|
||||
) << "Supplied field size is not equal to target patch size" << nl
|
||||
FatalErrorInFunction
|
||||
<< "Supplied field size is not equal to target patch size" << nl
|
||||
<< " source patch = " << srcAddress_.size() << nl
|
||||
<< " target patch = " << tgtAddress_.size() << nl
|
||||
<< " supplied field = " << fld.size()
|
||||
@ -1480,16 +1424,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
|
||||
{
|
||||
if (defaultValues.size() != srcAddress_.size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"AMIInterpolation::interpolateToSource"
|
||||
"("
|
||||
"const UList<Type>&, "
|
||||
"const CombineOp&, "
|
||||
"List<Type>&, "
|
||||
"const UList<Type>&"
|
||||
") const"
|
||||
) << "Employing default values when sum of weights falls below "
|
||||
FatalErrorInFunction
|
||||
<< "Employing default values when sum of weights falls below "
|
||||
<< lowWeightCorrection_
|
||||
<< " but supplied default field size is not equal to target "
|
||||
<< "patch size" << nl
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -54,7 +54,7 @@ void Foam::AMIMethod<SourcePatch, TargetPatch>::checkPatches() const
|
||||
|
||||
if (!bbTgtInf.contains(bbSrc))
|
||||
{
|
||||
WarningIn("AMIMethod<SourcePatch, TargetPatch>::checkPatches()")
|
||||
WarningInFunction
|
||||
<< "Source and target patch bounding boxes are not similar"
|
||||
<< nl
|
||||
<< " source box span : " << bbSrc.span() << nl
|
||||
@ -94,18 +94,7 @@ bool Foam::AMIMethod<SourcePatch, TargetPatch>::initialise
|
||||
}
|
||||
else if (!tgtPatch_.size())
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"void Foam::AMIMethod<SourcePatch, TargetPatch>::initialise"
|
||||
"("
|
||||
"labelListList&, "
|
||||
"scalarListList&, "
|
||||
"labelListList&, "
|
||||
"scalarListList&, "
|
||||
"label&, "
|
||||
"label&"
|
||||
")"
|
||||
)
|
||||
WarningInFunction
|
||||
<< srcPatch_.size() << " source faces but no target faces" << endl;
|
||||
|
||||
return false;
|
||||
@ -135,18 +124,8 @@ bool Foam::AMIMethod<SourcePatch, TargetPatch>::initialise
|
||||
{
|
||||
if (requireMatch_)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::AMIMethod<SourcePatch, TargetPatch>::initialise"
|
||||
"("
|
||||
"labelListList&, "
|
||||
"scalarListList&, "
|
||||
"labelListList&, "
|
||||
"scalarListList&, "
|
||||
"label&, "
|
||||
"label&"
|
||||
")"
|
||||
) << "Unable to find initial target face"
|
||||
FatalErrorInFunction
|
||||
<< "Unable to find initial target face"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -49,20 +49,8 @@ Foam::AMIMethod<SourcePatch, TargetPatch>::New
|
||||
|
||||
if (cstrIter == componentsConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"AMIMethod<SourcePatch, TargetPatch>::New"
|
||||
"("
|
||||
"const word&, "
|
||||
"const SourcePatch&, "
|
||||
"const TargetPatch&, "
|
||||
"const scalarField&, "
|
||||
"const scalarField&, "
|
||||
"const faceAreaIntersect::triangulationMode&, "
|
||||
"const bool, "
|
||||
"const bool"
|
||||
")"
|
||||
) << "Unknown AMIMethod type "
|
||||
FatalErrorInFunction
|
||||
<< "Unknown AMIMethod type "
|
||||
<< methodName << nl << nl
|
||||
<< "Valid AMIMethod types are:" << nl
|
||||
<< componentsConstructorTablePtr_->sortedToc() << exit(FatalError);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -284,20 +284,8 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces
|
||||
|
||||
if (errorOnNotFound)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::"
|
||||
"setNextFaces"
|
||||
"("
|
||||
"label&, "
|
||||
"label&, "
|
||||
"label&, "
|
||||
"const boolList&, "
|
||||
"labelList&, "
|
||||
"const DynamicList<label>&, "
|
||||
"bool"
|
||||
") const"
|
||||
) << "Unable to set source and target faces" << abort(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Unable to set source and target faces" << abort(FatalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -348,15 +336,8 @@ Foam::scalar Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::interArea
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::"
|
||||
"interArea"
|
||||
"("
|
||||
"const label, "
|
||||
"const label"
|
||||
") const"
|
||||
) << "Invalid normal for source face " << srcFaceI
|
||||
WarningInFunction
|
||||
<< "Invalid normal for source face " << srcFaceI
|
||||
<< " points " << UIndirectList<point>(srcPoints, src)
|
||||
<< " target face " << tgtFaceI
|
||||
<< " points " << UIndirectList<point>(tgtPoints, tgt)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -108,17 +108,7 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::setNextNearestFaces
|
||||
{
|
||||
const vectorField& srcCf = this->srcPatch_.faceCentres();
|
||||
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::mapNearestAMI<SourcePatch, TargetPatch>::"
|
||||
"setNextNearestFaces"
|
||||
"("
|
||||
"boolList&, "
|
||||
"label&, "
|
||||
"label&, "
|
||||
"label&"
|
||||
") const"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Unable to find target face for source face "
|
||||
<< srcFaceI << " with face centre " << srcCf[srcFaceI]
|
||||
<< abort(FatalError);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -155,10 +155,7 @@ public:
|
||||
{
|
||||
//TBD. How to serialise the AMI such that we can stream
|
||||
// cyclicACMIGAMGInterface.
|
||||
notImplemented
|
||||
(
|
||||
"cyclicACMIGAMGInterface::write(Ostream&) const"
|
||||
);
|
||||
NotImplemented;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -155,7 +155,7 @@ public:
|
||||
{
|
||||
//TBD. How to serialise the AMI such that we can stream
|
||||
// cyclicAMIGAMGInterface.
|
||||
notImplemented("cyclicAMIGAMGInterface::write(Ostream&) const");
|
||||
NotImplemented;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -355,16 +355,8 @@ Foam::scalar Foam::faceAreaIntersect::calc
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::scalar Foam::faceAreaIntersect::calc"
|
||||
"("
|
||||
"const face&, "
|
||||
"const face&, "
|
||||
"const vector&, "
|
||||
"const triangulationMode&"
|
||||
")"
|
||||
) << "Unknown triangulation mode enumeration"
|
||||
FatalErrorInFunction
|
||||
<< "Unknown triangulation mode enumeration"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -59,14 +59,8 @@ Foam::cyclicACMIPointPatchField<Type>::cyclicACMIPointPatchField
|
||||
{
|
||||
if (!isType<cyclicACMIPointPatch>(p))
|
||||
{
|
||||
FatalIOErrorIn
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
"cyclicACMIPointPatchField<Type>::cyclicACMIPointPatchField\n"
|
||||
"(\n"
|
||||
" const pointPatch&,\n"
|
||||
" const DimensionedField<Type, pointMesh>&,\n"
|
||||
" const dictionary&\n"
|
||||
")\n",
|
||||
dict
|
||||
) << "patch " << this->patch().index() << " not cyclicACMI type. "
|
||||
<< "Patch type = " << p.type()
|
||||
@ -91,16 +85,8 @@ Foam::cyclicACMIPointPatchField<Type>::cyclicACMIPointPatchField
|
||||
{
|
||||
if (!isType<cyclicACMIPointPatch>(this->patch()))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"cyclicACMIPointPatchField<Type>::cyclicACMIPointPatchField\n"
|
||||
"(\n"
|
||||
" const cyclicACMIPointPatchField<Type>&,\n"
|
||||
" const pointPatch&,\n"
|
||||
" const DimensionedField<Type, pointMesh>&,\n"
|
||||
" const pointPatchFieldMapper&\n"
|
||||
")\n"
|
||||
) << "Field type does not correspond to patch type for patch "
|
||||
FatalErrorInFunction
|
||||
<< "Field type does not correspond to patch type for patch "
|
||||
<< this->patch().index() << "." << endl
|
||||
<< "Field type: " << typeName << endl
|
||||
<< "Patch type: " << this->patch().type()
|
||||
|
||||
@ -44,7 +44,11 @@ const Foam::scalar Foam::cyclicACMIPolyPatch::tolerance_ = 1e-6;
|
||||
|
||||
void Foam::cyclicACMIPolyPatch::initPatchFaceAreas() const
|
||||
{
|
||||
if (!empty() && faceAreas0_.empty())
|
||||
if
|
||||
(
|
||||
!empty()
|
||||
&& (faceAreas0_.empty() || boundaryMesh().mesh().moving())
|
||||
)
|
||||
{
|
||||
faceAreas0_ = faceAreas();
|
||||
}
|
||||
@ -52,9 +56,13 @@ void Foam::cyclicACMIPolyPatch::initPatchFaceAreas() const
|
||||
const cyclicACMIPolyPatch& nbrACMI =
|
||||
refCast<const cyclicACMIPolyPatch>(this->neighbPatch());
|
||||
|
||||
if (!nbrACMI.empty() && nbrACMI.faceAreas0().empty())
|
||||
if
|
||||
(
|
||||
!nbrACMI.empty()
|
||||
&& (nbrACMI.faceAreas0().empty() || boundaryMesh().mesh().moving())
|
||||
)
|
||||
{
|
||||
nbrACMI.initPatchFaceAreas();
|
||||
nbrACMI.faceAreas0_ = nbrACMI.faceAreas();
|
||||
}
|
||||
}
|
||||
|
||||
@ -127,7 +135,7 @@ void Foam::cyclicACMIPolyPatch::setNeighbourFaceAreas() const
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIn("cyclicACMIPolyPatch::setNeighbourFaceAreas() const")
|
||||
WarningInFunction
|
||||
<< "Target mask size differs to that of the neighbour patch\n"
|
||||
<< " May occur when decomposing." << endl;
|
||||
}
|
||||
@ -136,11 +144,13 @@ void Foam::cyclicACMIPolyPatch::setNeighbourFaceAreas() const
|
||||
|
||||
void Foam::cyclicACMIPolyPatch::initGeometry(PstreamBuffers& pBufs)
|
||||
{
|
||||
// Initialise the AMI so that base geometry (e.g. cell volumes) are
|
||||
// correctly evaluated
|
||||
resetAMI();
|
||||
|
||||
// Note: cyclicAMIPolyPatch clears AMI so do first
|
||||
cyclicAMIPolyPatch::initGeometry(pBufs);
|
||||
|
||||
// Initialise the AMI so that base geometry (e.g. cell volumes) are
|
||||
// correctly evaluated before e.g. any of the processor patches gets
|
||||
// hit (since uses cell volumes in its initGeometry)
|
||||
resetAMI();
|
||||
}
|
||||
|
||||
|
||||
@ -156,7 +166,13 @@ void Foam::cyclicACMIPolyPatch::initMovePoints
|
||||
const pointField& p
|
||||
)
|
||||
{
|
||||
// Note: cyclicAMIPolyPatch clears AMI so do first
|
||||
cyclicAMIPolyPatch::initMovePoints(pBufs, p);
|
||||
|
||||
// Initialise the AMI so that base geometry (e.g. cell volumes) are
|
||||
// correctly evaluated before e.g. any of the processor patches gets
|
||||
// hit (since uses cell volumes in its initGeometry)
|
||||
resetAMI();
|
||||
}
|
||||
|
||||
|
||||
@ -249,16 +265,8 @@ Foam::cyclicACMIPolyPatch::cyclicACMIPolyPatch
|
||||
|
||||
if (nonOverlapPatchName_ == name)
|
||||
{
|
||||
FatalIOErrorIn
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
"cyclicACMIPolyPatch::cyclicACMIPolyPatch"
|
||||
"("
|
||||
"const word&, "
|
||||
"const dictionary&, "
|
||||
"const label, "
|
||||
"const polyBoundaryMesh&, "
|
||||
"const word&"
|
||||
")",
|
||||
dict
|
||||
) << "Non-overlapping patch name " << nonOverlapPatchName_
|
||||
<< " cannot be the same as this patch " << name
|
||||
@ -314,16 +322,8 @@ Foam::cyclicACMIPolyPatch::cyclicACMIPolyPatch
|
||||
|
||||
if (nonOverlapPatchName_ == name())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"const cyclicACMIPolyPatch& "
|
||||
"const polyBoundaryMesh&, "
|
||||
"const label, "
|
||||
"const label, "
|
||||
"const label, "
|
||||
"const word&, "
|
||||
"const word&"
|
||||
) << "Non-overlapping patch name " << nonOverlapPatchName_
|
||||
FatalErrorInFunction
|
||||
<< "Non-overlapping patch name " << nonOverlapPatchName_
|
||||
<< " cannot be the same as this patch " << name()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
@ -378,7 +378,7 @@ Foam::label Foam::cyclicACMIPolyPatch::nonOverlapPatchID() const
|
||||
|
||||
if (nonOverlapPatchID_ == -1)
|
||||
{
|
||||
FatalErrorIn("cyclicPolyAMIPatch::neighbPatchID() const")
|
||||
FatalErrorInFunction
|
||||
<< "Illegal non-overlapping patch name " << nonOverlapPatchName_
|
||||
<< nl << "Valid patch names are "
|
||||
<< this->boundaryMesh().names()
|
||||
@ -387,7 +387,7 @@ Foam::label Foam::cyclicACMIPolyPatch::nonOverlapPatchID() const
|
||||
|
||||
if (nonOverlapPatchID_ < index())
|
||||
{
|
||||
FatalErrorIn("cyclicPolyAMIPatch::neighbPatchID() const")
|
||||
FatalErrorInFunction
|
||||
<< "Boundary ordering error: " << type()
|
||||
<< " patch must be defined prior to its non-overlapping patch"
|
||||
<< nl
|
||||
@ -424,11 +424,8 @@ Foam::label Foam::cyclicACMIPolyPatch::nonOverlapPatchID() const
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::label "
|
||||
"Foam::cyclicACMIPolyPatch::nonOverlapPatchID() const"
|
||||
) << "Inconsistent ACMI patches " << name() << " and "
|
||||
FatalErrorInFunction
|
||||
<< "Inconsistent ACMI patches " << name() << " and "
|
||||
<< noPp.name() << ". Patches should have identical topology"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -32,12 +32,12 @@ Foam::tmp<Foam::Field<Type> > Foam::cyclicACMIPolyPatch::interpolate
|
||||
const Field<Type>& fldNonOverlap
|
||||
) const
|
||||
{
|
||||
// note: do not scale AMI field as face areas have already been taken
|
||||
// Note: do not scale AMI field as face areas have already been taken
|
||||
// into account
|
||||
|
||||
if (owner())
|
||||
{
|
||||
const scalarField& w = srcMask_;
|
||||
const scalarField& w = AMI().srcWeightsSum();
|
||||
|
||||
tmp<Field<Type> > interpField(AMI().interpolateToSource(fldCouple));
|
||||
|
||||
@ -45,7 +45,7 @@ Foam::tmp<Foam::Field<Type> > Foam::cyclicACMIPolyPatch::interpolate
|
||||
}
|
||||
else
|
||||
{
|
||||
const scalarField& w = neighbPatch().tgtMask();
|
||||
const scalarField& w = neighbPatch().AMI().tgtWeightsSum();
|
||||
|
||||
tmp<Field<Type> > interpField
|
||||
(
|
||||
@ -77,21 +77,23 @@ void Foam::cyclicACMIPolyPatch::interpolate
|
||||
List<Type>& result
|
||||
) const
|
||||
{
|
||||
// note: do not scale AMI field as face areas have already been taken
|
||||
// Note: do not scale AMI field as face areas have already been taken
|
||||
// into account
|
||||
|
||||
if (owner())
|
||||
{
|
||||
const scalarField& w = srcMask_;
|
||||
const scalarField& w = AMI().srcWeightsSum();
|
||||
|
||||
AMI().interpolateToSource(fldCouple, cop, result);
|
||||
|
||||
result = result + (1.0 - w)*fldNonOverlap;
|
||||
}
|
||||
else
|
||||
{
|
||||
const scalarField& w = neighbPatch().tgtMask();
|
||||
const scalarField& w = neighbPatch().AMI().tgtWeightsSum();
|
||||
|
||||
neighbPatch().AMI().interpolateToTarget(fldCouple, cop, result);
|
||||
|
||||
result = result + (1.0 - w)*fldNonOverlap;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -59,14 +59,8 @@ Foam::cyclicAMIPointPatchField<Type>::cyclicAMIPointPatchField
|
||||
{
|
||||
if (!isType<cyclicAMIPointPatch>(p))
|
||||
{
|
||||
FatalIOErrorIn
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
"cyclicAMIPointPatchField<Type>::cyclicAMIPointPatchField\n"
|
||||
"(\n"
|
||||
" const pointPatch&,\n"
|
||||
" const DimensionedField<Type, pointMesh>&,\n"
|
||||
" const dictionary&\n"
|
||||
")\n",
|
||||
dict
|
||||
) << "patch " << this->patch().index() << " not cyclicAMI type. "
|
||||
<< "Patch type = " << p.type()
|
||||
@ -91,16 +85,8 @@ Foam::cyclicAMIPointPatchField<Type>::cyclicAMIPointPatchField
|
||||
{
|
||||
if (!isType<cyclicAMIPointPatch>(this->patch()))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"cyclicAMIPointPatchField<Type>::cyclicAMIPointPatchField\n"
|
||||
"(\n"
|
||||
" const cyclicAMIPointPatchField<Type>&,\n"
|
||||
" const pointPatch&,\n"
|
||||
" const DimensionedField<Type, pointMesh>&,\n"
|
||||
" const pointPatchFieldMapper&\n"
|
||||
")\n"
|
||||
) << "Field type does not correspond to patch type for patch "
|
||||
FatalErrorInFunction
|
||||
<< "Field type does not correspond to patch type for patch "
|
||||
<< this->patch().index() << "." << endl
|
||||
<< "Field type: " << typeName << endl
|
||||
<< "Patch type: " << this->patch().type()
|
||||
|
||||
@ -24,9 +24,13 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "cyclicAMIPolyPatch.H"
|
||||
#include "transformField.H"
|
||||
#include "SubField.H"
|
||||
#include "polyMesh.H"
|
||||
#include "Time.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "faceAreaIntersect.H"
|
||||
#include "ops.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -71,7 +75,6 @@ Foam::vector Foam::cyclicAMIPolyPatch::findFaceNormalMaxRadius
|
||||
|
||||
void Foam::cyclicAMIPolyPatch::calcTransforms()
|
||||
{
|
||||
// Half0
|
||||
const cyclicAMIPolyPatch& half0 = *this;
|
||||
vectorField half0Areas(half0.size());
|
||||
forAll(half0, facei)
|
||||
@ -79,7 +82,6 @@ void Foam::cyclicAMIPolyPatch::calcTransforms()
|
||||
half0Areas[facei] = half0[facei].normal(half0.points());
|
||||
}
|
||||
|
||||
// Half1
|
||||
const cyclicAMIPolyPatch& half1 = neighbPatch();
|
||||
vectorField half1Areas(half1.size());
|
||||
forAll(half1, facei)
|
||||
@ -118,7 +120,7 @@ void Foam::cyclicAMIPolyPatch::calcTransforms
|
||||
{
|
||||
if (transform() != neighbPatch().transform())
|
||||
{
|
||||
FatalErrorIn("cyclicAMIPolyPatch::calcTransforms()")
|
||||
FatalErrorInFunction
|
||||
<< "Patch " << name()
|
||||
<< " has transform type " << transformTypeNames[transform()]
|
||||
<< ", neighbour patch " << neighbPatchName()
|
||||
@ -138,23 +140,23 @@ void Foam::cyclicAMIPolyPatch::calcTransforms
|
||||
|
||||
if (rotationAngleDefined_)
|
||||
{
|
||||
tensor T(rotationAxis_*rotationAxis_);
|
||||
const tensor T(rotationAxis_*rotationAxis_);
|
||||
|
||||
tensor S
|
||||
const tensor S
|
||||
(
|
||||
0, -rotationAxis_.z(), rotationAxis_.y(),
|
||||
rotationAxis_.z(), 0, -rotationAxis_.x(),
|
||||
-rotationAxis_.y(), rotationAxis_.x(), 0
|
||||
);
|
||||
|
||||
tensor revTPos
|
||||
const tensor revTPos
|
||||
(
|
||||
T
|
||||
+ cos(rotationAngle_)*(tensor::I - T)
|
||||
+ sin(rotationAngle_)*S
|
||||
);
|
||||
|
||||
tensor revTNeg
|
||||
const tensor revTNeg
|
||||
(
|
||||
T
|
||||
+ cos(-rotationAngle_)*(tensor::I - T)
|
||||
@ -163,41 +165,34 @@ void Foam::cyclicAMIPolyPatch::calcTransforms
|
||||
|
||||
// Check - assume correct angle when difference in face areas
|
||||
// is the smallest
|
||||
vector transformedAreaPos = gSum(half1Areas & revTPos);
|
||||
vector transformedAreaNeg = gSum(half1Areas & revTNeg);
|
||||
vector area0 = gSum(half0Areas);
|
||||
const vector transformedAreaPos = gSum(half1Areas & revTPos);
|
||||
const vector transformedAreaNeg = gSum(half1Areas & revTNeg);
|
||||
const vector area0 = gSum(half0Areas);
|
||||
const scalar magArea0 = mag(area0) + ROOTVSMALL;
|
||||
|
||||
// Areas have opposite sign, so sum should be zero when
|
||||
// correct rotation applied
|
||||
scalar errorPos = mag(transformedAreaPos + area0);
|
||||
scalar errorNeg = mag(transformedAreaNeg + area0);
|
||||
// Areas have opposite sign, so sum should be zero when correct
|
||||
// rotation applied
|
||||
const scalar errorPos = mag(transformedAreaPos + area0);
|
||||
const scalar errorNeg = mag(transformedAreaNeg + area0);
|
||||
|
||||
if (errorPos < errorNeg)
|
||||
{
|
||||
revT = revTPos;
|
||||
}
|
||||
else
|
||||
const scalar normErrorPos = errorPos/magArea0;
|
||||
const scalar normErrorNeg = errorNeg/magArea0;
|
||||
|
||||
if (errorPos > errorNeg && normErrorNeg < matchTolerance())
|
||||
{
|
||||
revT = revTNeg;
|
||||
rotationAngle_ *= -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
revT = revTPos;
|
||||
}
|
||||
|
||||
scalar areaError =
|
||||
min(errorPos, errorNeg)/(mag(area0) + ROOTVSMALL);
|
||||
const scalar areaError = min(normErrorPos, normErrorNeg);
|
||||
|
||||
if (areaError > matchTolerance())
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"void Foam::cyclicAMIPolyPatch::calcTransforms"
|
||||
"("
|
||||
"const primitivePatch&, "
|
||||
"const pointField&, "
|
||||
"const vectorField&, "
|
||||
"const pointField&, "
|
||||
"const vectorField&"
|
||||
")"
|
||||
)
|
||||
WarningInFunction
|
||||
<< "Patch areas are not consistent within "
|
||||
<< 100*matchTolerance()
|
||||
<< " % indicating a possible error in the specified "
|
||||
@ -406,6 +401,9 @@ void Foam::cyclicAMIPolyPatch::resetAMI
|
||||
|
||||
void Foam::cyclicAMIPolyPatch::initGeometry(PstreamBuffers& pBufs)
|
||||
{
|
||||
// The AMI is no longer valid. Leave it up to demand-driven calculation
|
||||
AMIPtr_.clear();
|
||||
|
||||
polyPatch::initGeometry(pBufs);
|
||||
}
|
||||
|
||||
@ -431,6 +429,9 @@ void Foam::cyclicAMIPolyPatch::initMovePoints
|
||||
const pointField& p
|
||||
)
|
||||
{
|
||||
// The AMI is no longer valid. Leave it up to demand-driven calculation
|
||||
AMIPtr_.clear();
|
||||
|
||||
polyPatch::initMovePoints(pBufs, p);
|
||||
|
||||
// See below. Clear out any local geometry
|
||||
@ -447,19 +448,15 @@ void Foam::cyclicAMIPolyPatch::movePoints
|
||||
polyPatch::movePoints(pBufs, p);
|
||||
|
||||
calcTransforms();
|
||||
|
||||
// Note: resetAMI is called whilst in geometry update. So the slave
|
||||
// side might not have reached 'movePoints'. Is explicitly handled by
|
||||
// - clearing geometry of neighbour inside initMovePoints
|
||||
// - not using localPoints() inside resetAMI
|
||||
resetAMI();
|
||||
}
|
||||
|
||||
|
||||
void Foam::cyclicAMIPolyPatch::initUpdateMesh(PstreamBuffers& pBufs)
|
||||
{
|
||||
polyPatch::initUpdateMesh(pBufs);
|
||||
// The AMI is no longer valid. Leave it up to demand-driven calculation
|
||||
AMIPtr_.clear();
|
||||
|
||||
polyPatch::initUpdateMesh(pBufs);
|
||||
}
|
||||
|
||||
|
||||
@ -536,15 +533,8 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
||||
{
|
||||
if (nbrPatchName_ == word::null && !coupleGroup_.valid())
|
||||
{
|
||||
FatalIOErrorIn
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
"cyclicAMIPolyPatch::cyclicAMIPolyPatch"
|
||||
"("
|
||||
"const word&, "
|
||||
"const dictionary&, "
|
||||
"const label, "
|
||||
"const polyBoundaryMesh&"
|
||||
")",
|
||||
dict
|
||||
) << "No \"neighbourPatch\" or \"coupleGroup\" provided."
|
||||
<< exit(FatalIOError);
|
||||
@ -552,15 +542,8 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
||||
|
||||
if (nbrPatchName_ == name)
|
||||
{
|
||||
FatalIOErrorIn
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
"cyclicAMIPolyPatch::cyclicAMIPolyPatch"
|
||||
"("
|
||||
"const word&, "
|
||||
"const dictionary&, "
|
||||
"const label, "
|
||||
"const polyBoundaryMesh&"
|
||||
")",
|
||||
dict
|
||||
) << "Neighbour patch name " << nbrPatchName_
|
||||
<< " cannot be the same as this patch " << name
|
||||
@ -588,15 +571,8 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
||||
scalar magRot = mag(rotationAxis_);
|
||||
if (magRot < SMALL)
|
||||
{
|
||||
FatalIOErrorIn
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
"cyclicAMIPolyPatch::cyclicAMIPolyPatch"
|
||||
"("
|
||||
"const word&, "
|
||||
"const dictionary&, "
|
||||
"const label, "
|
||||
"const polyBoundaryMesh&"
|
||||
")",
|
||||
dict
|
||||
) << "Illegal rotationAxis " << rotationAxis_ << endl
|
||||
<< "Please supply a non-zero vector."
|
||||
@ -677,15 +653,8 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
||||
{
|
||||
if (nbrPatchName_ == name())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"const cyclicAMIPolyPatch& "
|
||||
"const polyBoundaryMesh&, "
|
||||
"const label, "
|
||||
"const label, "
|
||||
"const label, "
|
||||
"const word&"
|
||||
) << "Neighbour patch name " << nbrPatchName_
|
||||
FatalErrorInFunction
|
||||
<< "Neighbour patch name " << nbrPatchName_
|
||||
<< " cannot be the same as this patch " << name()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
@ -738,7 +707,7 @@ Foam::label Foam::cyclicAMIPolyPatch::neighbPatchID() const
|
||||
|
||||
if (nbrPatchID_ == -1)
|
||||
{
|
||||
FatalErrorIn("cyclicPolyAMIPatch::neighbPatchID() const")
|
||||
FatalErrorInFunction
|
||||
<< "Illegal neighbourPatch name " << neighbPatchName()
|
||||
<< nl << "Valid patch names are "
|
||||
<< this->boundaryMesh().names()
|
||||
@ -754,7 +723,7 @@ Foam::label Foam::cyclicAMIPolyPatch::neighbPatchID() const
|
||||
|
||||
if (nbrPatch.neighbPatchName() != name())
|
||||
{
|
||||
WarningIn("cyclicAMIPolyPatch::neighbPatchID() const")
|
||||
WarningInFunction
|
||||
<< "Patch " << name()
|
||||
<< " specifies neighbour patch " << neighbPatchName()
|
||||
<< nl << " but that in return specifies "
|
||||
@ -815,10 +784,7 @@ const Foam::AMIPatchToPatchInterpolation& Foam::cyclicAMIPolyPatch::AMI() const
|
||||
{
|
||||
if (!owner())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"const AMIPatchToPatchInterpolation& cyclicAMIPolyPatch::AMI()"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "AMI interpolator only available to owner patch"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -86,12 +86,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::syncTransforms() const
|
||||
{
|
||||
if (periodicPatch.separation().size() > 1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"cyclicPeriodicAMIPolyPatch::resetAMI"
|
||||
"(const AMIPatchToPatchInterpolation::interpolationMethod&"
|
||||
") const"
|
||||
) << "Periodic patch " << periodicPatchName_
|
||||
FatalErrorInFunction
|
||||
<< "Periodic patch " << periodicPatchName_
|
||||
<< " has non-uniform separation vector "
|
||||
<< periodicPatch.separation()
|
||||
<< "This is not allowed inside " << type()
|
||||
@ -101,12 +97,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::syncTransforms() const
|
||||
|
||||
if (periodicPatch.forwardT().size() > 1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"cyclicPeriodicAMIPolyPatch::resetAMI"
|
||||
"(const AMIPatchToPatchInterpolation::interpolationMethod&"
|
||||
") const"
|
||||
) << "Periodic patch " << periodicPatchName_
|
||||
FatalErrorInFunction
|
||||
<< "Periodic patch " << periodicPatchName_
|
||||
<< " has non-uniform transformation tensor "
|
||||
<< periodicPatch.forwardT()
|
||||
<< "This is not allowed inside " << type()
|
||||
@ -362,7 +354,7 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
||||
scalar srcSum(gAverage(AMIPtr_->srcWeightsSum()));
|
||||
scalar tgtSum(gAverage(AMIPtr_->tgtWeightsSum()));
|
||||
|
||||
// Direction (or rather side of AMI : this or nbr patch) of
|
||||
// Direction (or rather side of AMI : this or nbr patch) of
|
||||
// geometry replication
|
||||
bool direction = nTransforms_ >= 0;
|
||||
|
||||
@ -501,13 +493,7 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
||||
// so for now this situation is flagged as a SeriousError instead of
|
||||
// a FatalError since the default matchTolerance is quite strict
|
||||
// (0.001) and can get triggered far into the simulation.
|
||||
SeriousErrorIn
|
||||
(
|
||||
"void Foam::cyclicPeriodicAMIPolyPatch::resetPeriodicAMI"
|
||||
"("
|
||||
"const AMIPatchToPatchInterpolation::interpolationMethod&"
|
||||
") const"
|
||||
)
|
||||
SeriousErrorInFunction
|
||||
<< "Patches " << name() << " and " << neighbPatch().name()
|
||||
<< " do not couple to within a tolerance of "
|
||||
<< matchTolerance()
|
||||
@ -534,13 +520,7 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
||||
// This check means that e.g. different numbers of stator and
|
||||
// rotor partitions are not allowed.
|
||||
// Again see the section above about tolerances.
|
||||
SeriousErrorIn
|
||||
(
|
||||
"void Foam::cyclicPeriodicAMIPolyPatch::resetPeriodicAMI"
|
||||
"("
|
||||
"const AMIPatchToPatchInterpolation::interpolationMethod&"
|
||||
") const"
|
||||
)
|
||||
SeriousErrorInFunction
|
||||
<< "Patches " << name() << " and " << neighbPatch().name()
|
||||
<< " do not overlap an integer number of times when transformed"
|
||||
<< " according to the periodic patch "
|
||||
@ -555,8 +535,36 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
||||
<< endl;
|
||||
}
|
||||
|
||||
// Normalise the weights
|
||||
// Normalise the weights. Disable printing since weights are
|
||||
// still areas.
|
||||
AMIPtr_->normaliseWeights(true, false);
|
||||
|
||||
// Print some statistics
|
||||
const label nFace = returnReduce(size(), sumOp<label>());
|
||||
|
||||
if (nFace)
|
||||
{
|
||||
scalarField srcWghtSum(size(), 0);
|
||||
scalarField tgtWghtSum(size(), 0);
|
||||
forAll(*this, faceI)
|
||||
{
|
||||
srcWghtSum[faceI] = sum(AMIPtr_->srcWeights()[faceI]);
|
||||
tgtWghtSum[faceI] = sum(AMIPtr_->tgtWeights()[faceI]);
|
||||
}
|
||||
|
||||
Info<< indent
|
||||
<< "AMI: Patch " << name()
|
||||
<< " sum(weights) min/max/average = "
|
||||
<< gMin(srcWghtSum) << ", "
|
||||
<< gMax(srcWghtSum) << ", "
|
||||
<< gAverage(srcWghtSum) << endl;
|
||||
Info<< indent
|
||||
<< "AMI: Patch " << neighbPatch().name()
|
||||
<< " sum(weights) min/max/average = "
|
||||
<< gMin(tgtWghtSum) << ", "
|
||||
<< gMax(tgtWghtSum) << ", "
|
||||
<< gAverage(tgtWghtSum) << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -676,7 +684,7 @@ Foam::label Foam::cyclicPeriodicAMIPolyPatch::periodicPatchID() const
|
||||
|
||||
if (periodicPatchID_ == -1)
|
||||
{
|
||||
FatalErrorIn("cyclicPolyAMIPatch::periodicPatchID() const")
|
||||
FatalErrorInFunction
|
||||
<< "Illegal periodicPatch name " << periodicPatchName_
|
||||
<< nl << "Valid patch names are "
|
||||
<< this->boundaryMesh().names()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -274,11 +274,7 @@ void Foam::FaceCellWave<Type, TrackingData>::checkCyclic
|
||||
)
|
||||
)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"FaceCellWave<Type, TrackingData>"
|
||||
"::checkCyclic(const polyPatch&)"
|
||||
) << "problem: i:" << i1 << " otheri:" << i2
|
||||
FatalErrorInFunction
|
||||
<< " faceInfo:" << allFaceInfo_[i1]
|
||||
<< " otherfaceInfo:" << allFaceInfo_[i2]
|
||||
<< abort(FatalError);
|
||||
@ -286,11 +282,7 @@ void Foam::FaceCellWave<Type, TrackingData>::checkCyclic
|
||||
|
||||
if (changedFace_[i1] != changedFace_[i2])
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"FaceCellWave<Type, TrackingData>"
|
||||
"::checkCyclic(const polyPatch&)"
|
||||
) << " problem: i:" << i1 << " otheri:" << i2
|
||||
FatalErrorInFunction
|
||||
<< " faceInfo:" << allFaceInfo_[i1]
|
||||
<< " otherfaceInfo:" << allFaceInfo_[i2]
|
||||
<< " changedFace:" << changedFace_[i1]
|
||||
@ -921,12 +913,8 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
|
||||
|| allCellInfo.size() != mesh_.nCells()
|
||||
)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"FaceCellWave<Type, TrackingData>::FaceCellWave"
|
||||
"(const polyMesh&, const labelList&, const List<Type>,"
|
||||
" UList<Type>&, UList<Type>&, const label maxIter)"
|
||||
) << "face and cell storage not the size of mesh faces, cells:"
|
||||
FatalErrorInFunction
|
||||
<< "face and cell storage not the size of mesh faces, cells:"
|
||||
<< endl
|
||||
<< " allFaceInfo :" << allFaceInfo.size() << endl
|
||||
<< " mesh_.nFaces():" << mesh_.nFaces() << endl
|
||||
@ -977,12 +965,8 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
|
||||
|| allCellInfo.size() != mesh_.nCells()
|
||||
)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"FaceCellWave<Type, TrackingData>::FaceCellWave"
|
||||
"(const polyMesh&, const labelList&, const List<Type>,"
|
||||
" UList<Type>&, UList<Type>&, const label maxIter)"
|
||||
) << "face and cell storage not the size of mesh faces, cells:"
|
||||
FatalErrorInFunction
|
||||
<< "face and cell storage not the size of mesh faces, cells:"
|
||||
<< endl
|
||||
<< " allFaceInfo :" << allFaceInfo.size() << endl
|
||||
<< " mesh_.nFaces():" << mesh_.nFaces() << endl
|
||||
@ -999,12 +983,7 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
|
||||
|
||||
if ((maxIter > 0) && (iter >= maxIter))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"FaceCellWave<Type, TrackingData>::FaceCellWave"
|
||||
"(const polyMesh&, const labelList&, const List<Type>,"
|
||||
" UList<Type>&, UList<Type>&, const label maxIter)"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Maximum number of iterations reached. Increase maxIter." << endl
|
||||
<< " maxIter:" << maxIter << endl
|
||||
<< " nChangedCells:" << nChangedCells_ << endl
|
||||
@ -1057,13 +1036,8 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
|
||||
|| allCellInfo.size() != mesh_.nCells()
|
||||
)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"FaceCellWave<Type, TrackingData>::FaceCellWave"
|
||||
"(const polyMesh&, const List<labelPair>&, const labelList&"
|
||||
", const List<Type>,"
|
||||
" UList<Type>&, UList<Type>&, const label maxIter)"
|
||||
) << "face and cell storage not the size of mesh faces, cells:"
|
||||
FatalErrorInFunction
|
||||
<< "face and cell storage not the size of mesh faces, cells:"
|
||||
<< endl
|
||||
<< " allFaceInfo :" << allFaceInfo.size() << endl
|
||||
<< " mesh_.nFaces():" << mesh_.nFaces() << endl
|
||||
@ -1080,13 +1054,8 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
|
||||
|
||||
if ((maxIter > 0) && (iter >= maxIter))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"FaceCellWave<Type, TrackingData>::FaceCellWave"
|
||||
"(const polyMesh&, const List<labelPair>&, const labelList&"
|
||||
", const List<Type>, UList<Type>&, UList<Type>&"
|
||||
", const label maxIter)"
|
||||
) << "Maximum number of iterations reached. Increase maxIter." << endl
|
||||
FatalErrorInFunction
|
||||
<< "Maximum number of iterations reached. Increase maxIter." << endl
|
||||
<< " maxIter:" << maxIter << endl
|
||||
<< " nChangedCells:" << nChangedCells_ << endl
|
||||
<< " nChangedFaces:" << nChangedFaces_ << endl
|
||||
@ -1131,7 +1100,7 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::faceToCell()
|
||||
label faceI = changedFaces_[changedFaceI];
|
||||
if (!changedFace_[faceI])
|
||||
{
|
||||
FatalErrorIn("FaceCellWave<Type, TrackingData>::faceToCell()")
|
||||
FatalErrorInFunction
|
||||
<< "Face " << faceI
|
||||
<< " not marked as having been changed"
|
||||
<< abort(FatalError);
|
||||
@ -1214,7 +1183,7 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::cellToFace()
|
||||
label cellI = changedCells_[changedCellI];
|
||||
if (!changedCell_[cellI])
|
||||
{
|
||||
FatalErrorIn("FaceCellWave<Type, TrackingData>::cellToFace()")
|
||||
FatalErrorInFunction
|
||||
<< "Cell " << cellI << " not marked as having been changed"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -328,12 +328,8 @@ PatchEdgeFaceWave
|
||||
|
||||
if (allEdgeInfo_.size() != patch_.nEdges())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"PatchEdgeFaceWave<Type, TrackingData>::PatchEdgeFaceWave"
|
||||
"(const polyMesh&, const labelList&, const List<Type>,"
|
||||
" List<Type>&, List<Type>&, const label maxIter)"
|
||||
) << "size of edgeInfo work array is not equal to the number"
|
||||
FatalErrorInFunction
|
||||
<< "size of edgeInfo work array is not equal to the number"
|
||||
<< " of edges in the patch" << endl
|
||||
<< " edgeInfo :" << allEdgeInfo_.size() << endl
|
||||
<< " patch.nEdges:" << patch_.nEdges()
|
||||
@ -341,12 +337,8 @@ PatchEdgeFaceWave
|
||||
}
|
||||
if (allFaceInfo_.size() != patch_.size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"PatchEdgeFaceWave<Type, TrackingData>::PatchEdgeFaceWave"
|
||||
"(const polyMesh&, const labelList&, const List<Type>,"
|
||||
" List<Type>&, List<Type>&, const label maxIter)"
|
||||
) << "size of edgeInfo work array is not equal to the number"
|
||||
FatalErrorInFunction
|
||||
<< "size of edgeInfo work array is not equal to the number"
|
||||
<< " of faces in the patch" << endl
|
||||
<< " faceInfo :" << allFaceInfo_.size() << endl
|
||||
<< " patch.size:" << patch_.size()
|
||||
@ -367,12 +359,8 @@ PatchEdgeFaceWave
|
||||
|
||||
if ((maxIter > 0) && (iter >= maxIter))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"PatchEdgeFaceWave<Type, TrackingData>::PatchEdgeFaceWave"
|
||||
"(const polyMesh&, const labelList&, const List<Type>,"
|
||||
" List<Type>&, List<Type>&, const label maxIter)"
|
||||
) << "Maximum number of iterations reached. Increase maxIter." << endl
|
||||
FatalErrorInFunction
|
||||
<< "Maximum number of iterations reached. Increase maxIter." << endl
|
||||
<< " maxIter:" << maxIter << endl
|
||||
<< " changedEdges:" << changedEdges_.size() << endl
|
||||
<< " changedFaces:" << changedFaces_.size() << endl
|
||||
@ -511,7 +499,7 @@ faceToEdge()
|
||||
|
||||
if (!changedFace_[faceI])
|
||||
{
|
||||
FatalErrorIn("PatchEdgeFaceWave<Type, TrackingData>::faceToEdge()")
|
||||
FatalErrorInFunction
|
||||
<< "face " << faceI
|
||||
<< " not marked as having been changed" << nl
|
||||
<< "This might be caused by multiple occurences of the same"
|
||||
@ -576,7 +564,7 @@ edgeToFace()
|
||||
|
||||
if (!changedEdge_[edgeI])
|
||||
{
|
||||
FatalErrorIn("PatchEdgeFaceWave<Type, TrackingData>::edgeToFace()")
|
||||
FatalErrorInFunction
|
||||
<< "edge " << edgeI
|
||||
<< " not marked as having been changed" << nl
|
||||
<< "This might be caused by multiple occurences of the same"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -39,7 +39,7 @@ inline bool Foam::patchEdgeFaceRegion::update
|
||||
{
|
||||
if (!w2.valid(td))
|
||||
{
|
||||
FatalErrorIn("patchEdgeFaceRegion::update(..)")
|
||||
FatalErrorInFunction
|
||||
<< "problem." << abort(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -110,7 +110,7 @@ inline bool Foam::patchEdgeFaceRegions::updateEdge
|
||||
|
||||
if (!faceInfo.valid(td))
|
||||
{
|
||||
FatalErrorIn("patchEdgeFaceRegions::updateEdge(..)")
|
||||
FatalErrorInFunction
|
||||
<< "problem." << abort(FatalError);
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ inline bool Foam::patchEdgeFaceRegions::updateEdge
|
||||
|
||||
if (!edgeInfo.valid(td))
|
||||
{
|
||||
FatalErrorIn("patchEdgeFaceRegions::updateEdge(..)")
|
||||
FatalErrorInFunction
|
||||
<< "problem." << abort(FatalError);
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ inline bool Foam::patchEdgeFaceRegions::updateFace
|
||||
|
||||
if (!edgeInfo.valid(td))
|
||||
{
|
||||
FatalErrorIn("patchEdgeFaceRegions::updateFace(..)")
|
||||
FatalErrorInFunction
|
||||
<< "problem." << abort(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -134,11 +134,8 @@ void Foam::PointEdgeWave<Type, TrackingData>::transform
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"PointEdgeWave<Type, TrackingData>::transform"
|
||||
"(const tensorField&, List<Type>&)"
|
||||
) << "Non-uniform transformation on patch " << patch.name()
|
||||
FatalErrorInFunction
|
||||
<< "Non-uniform transformation on patch " << patch.name()
|
||||
<< " of type " << patch.type()
|
||||
<< " not supported for point fields"
|
||||
<< abort(FatalError);
|
||||
@ -638,12 +635,8 @@ Foam::PointEdgeWave<Type, TrackingData>::PointEdgeWave
|
||||
{
|
||||
if (allPointInfo_.size() != mesh_.nPoints())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"PointEdgeWave<Type, TrackingData>::PointEdgeWave"
|
||||
"(const polyMesh&, const labelList&, const List<Type>,"
|
||||
" List<Type>&, List<Type>&, const label maxIter)"
|
||||
) << "size of pointInfo work array is not equal to the number"
|
||||
FatalErrorInFunction
|
||||
<< "size of pointInfo work array is not equal to the number"
|
||||
<< " of points in the mesh" << endl
|
||||
<< " pointInfo :" << allPointInfo_.size() << endl
|
||||
<< " mesh.nPoints:" << mesh_.nPoints()
|
||||
@ -651,12 +644,8 @@ Foam::PointEdgeWave<Type, TrackingData>::PointEdgeWave
|
||||
}
|
||||
if (allEdgeInfo_.size() != mesh_.nEdges())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"PointEdgeWave<Type, TrackingData>::PointEdgeWave"
|
||||
"(const polyMesh&, const labelList&, const List<Type>,"
|
||||
" List<Type>&, List<Type>&, const label maxIter)"
|
||||
) << "size of edgeInfo work array is not equal to the number"
|
||||
FatalErrorInFunction
|
||||
<< "size of edgeInfo work array is not equal to the number"
|
||||
<< " of edges in the mesh" << endl
|
||||
<< " edgeInfo :" << allEdgeInfo_.size() << endl
|
||||
<< " mesh.nEdges:" << mesh_.nEdges()
|
||||
@ -678,12 +667,8 @@ Foam::PointEdgeWave<Type, TrackingData>::PointEdgeWave
|
||||
|
||||
if ((maxIter > 0) && (iter >= maxIter))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"PointEdgeWave<Type, TrackingData>::PointEdgeWave"
|
||||
"(const polyMesh&, const labelList&, const List<Type>,"
|
||||
" List<Type>&, List<Type>&, const label maxIter)"
|
||||
) << "Maximum number of iterations reached. Increase maxIter." << endl
|
||||
FatalErrorInFunction
|
||||
<< "Maximum number of iterations reached. Increase maxIter." << endl
|
||||
<< " maxIter:" << maxIter << endl
|
||||
<< " nChangedPoints:" << nChangedPoints_ << endl
|
||||
<< " nChangedEdges:" << nChangedEdges_ << endl
|
||||
@ -794,7 +779,7 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::edgeToPoint()
|
||||
|
||||
if (!changedEdge_[edgeI])
|
||||
{
|
||||
FatalErrorIn("PointEdgeWave<Type, TrackingData>::edgeToPoint()")
|
||||
FatalErrorInFunction
|
||||
<< "edge " << edgeI
|
||||
<< " not marked as having been changed" << nl
|
||||
<< "This might be caused by multiple occurences of the same"
|
||||
@ -872,7 +857,7 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::pointToEdge()
|
||||
|
||||
if (!changedPoint_[pointI])
|
||||
{
|
||||
FatalErrorIn("PointEdgeWave<Type, TrackingData>::pointToEdge()")
|
||||
FatalErrorInFunction
|
||||
<< "Point " << pointI
|
||||
<< " not marked as having been changed" << nl
|
||||
<< "This might be caused by multiple occurences of the same"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -287,11 +287,8 @@ void Foam::cellClassification::markCells
|
||||
|
||||
if (returnReduce(cellI, maxOp<label>()) == -1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"List<cellClassification::cType> markCells"
|
||||
"(const meshSearch&, const boolList&, const pointField&)"
|
||||
) << "outsidePoint " << outsidePts[outsidePtI]
|
||||
FatalErrorInFunction
|
||||
<< "outsidePoint " << outsidePts[outsidePtI]
|
||||
<< " is not inside any cell"
|
||||
<< nl << "It might be on a face or outside the geometry"
|
||||
<< exit(FatalError);
|
||||
@ -513,11 +510,8 @@ Foam::cellClassification::cellClassification
|
||||
{
|
||||
if (mesh_.nCells() != size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"cellClassification::cellClassification"
|
||||
"(const polyMesh&, const labelList&)"
|
||||
) << "Number of elements of cellType argument is not equal to the"
|
||||
FatalErrorInFunction
|
||||
<< "Number of elements of cellType argument is not equal to the"
|
||||
<< " number of cells" << abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -46,7 +46,7 @@ inline bool Foam::cellInfo::update
|
||||
|| (w2.type() == cellClassification::CUT)
|
||||
)
|
||||
{
|
||||
FatalErrorIn("cellInfo::update(const cellInfo&)")
|
||||
FatalErrorInFunction
|
||||
<< "Problem: trying to propagate NOTSET or CUT type:" << w2.type()
|
||||
<< " into cell/face with type:" << type() << endl
|
||||
<< "thisFaceI:" << thisFaceI
|
||||
@ -77,7 +77,7 @@ inline bool Foam::cellInfo::update
|
||||
}
|
||||
|
||||
// Two conflicting types
|
||||
FatalErrorIn("cellInfo::update(const cellInfo&)")
|
||||
FatalErrorInFunction
|
||||
<< "Problem: trying to propagate conflicting types:" << w2.type()
|
||||
<< " into cell/face with type:" << type() << endl
|
||||
<< "thisFaceI:" << thisFaceI
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -186,25 +186,25 @@ Foam::label Foam::cellDistFuncs::getPointNeighbours
|
||||
|
||||
if (!nbs.found(nb))
|
||||
{
|
||||
SeriousErrorIn("Foam::cellDistFuncs::getPointNeighbours")
|
||||
SeriousErrorInFunction
|
||||
<< "getPointNeighbours : patchFaceI:" << patchFaceI
|
||||
<< " verts:" << f << endl;
|
||||
|
||||
forAll(f, fp)
|
||||
{
|
||||
SeriousErrorIn("Foam::cellDistFuncs::getPointNeighbours")
|
||||
SeriousErrorInFunction
|
||||
<< "point:" << f[fp] << " pointFaces:"
|
||||
<< patch.pointFaces()[f[fp]] << endl;
|
||||
}
|
||||
|
||||
for (label i = 0; i < nNeighbours; i++)
|
||||
{
|
||||
SeriousErrorIn("Foam::cellDistFuncs::getPointNeighbours")
|
||||
SeriousErrorInFunction
|
||||
<< "fast nbr:" << neighbours[i]
|
||||
<< endl;
|
||||
}
|
||||
|
||||
FatalErrorIn("getPointNeighbours")
|
||||
FatalErrorInFunction
|
||||
<< "Problem: fast pointNeighbours routine included " << nb
|
||||
<< " which is not in proper neigbour list " << nbs.toc()
|
||||
<< abort(FatalError);
|
||||
@ -214,7 +214,7 @@ Foam::label Foam::cellDistFuncs::getPointNeighbours
|
||||
|
||||
if (nbs.size())
|
||||
{
|
||||
FatalErrorIn("getPointNeighbours")
|
||||
FatalErrorInFunction
|
||||
<< "Problem: fast pointNeighbours routine did not find "
|
||||
<< nbs.toc() << abort(FatalError);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -53,10 +53,8 @@ bool Foam::cellFeatures::faceAlignedEdge(const label faceI, const label edgeI)
|
||||
}
|
||||
}
|
||||
|
||||
FatalErrorIn
|
||||
(
|
||||
"cellFeatures::faceAlignedEdge(const label, const label)"
|
||||
) << "Can not find edge " << mesh_.edges()[edgeI]
|
||||
FatalErrorInFunction
|
||||
<< "Can not find edge " << mesh_.edges()[edgeI]
|
||||
<< " on face " << faceI << abort(FatalError);
|
||||
|
||||
return false;
|
||||
@ -101,11 +99,8 @@ Foam::label Foam::cellFeatures::nextEdge
|
||||
}
|
||||
}
|
||||
|
||||
FatalErrorIn
|
||||
(
|
||||
"cellFeatures::nextEdge(const label, const Map<label>"
|
||||
", const labelHashSet&, const label, const label, const label)"
|
||||
) << "Can not find edge in " << featureEdge_ << " connected to edge "
|
||||
FatalErrorInFunction
|
||||
<< "Can not find edge in " << featureEdge_ << " connected to edge "
|
||||
<< thisEdgeI << " at vertex " << thisVertI << endl
|
||||
<< "This might mean that the externalEdges do not form a closed loop"
|
||||
<< abort(FatalError);
|
||||
@ -359,7 +354,7 @@ void Foam::cellFeatures::calcSuperFaces() const
|
||||
|
||||
if (superFace.size() <= 2)
|
||||
{
|
||||
WarningIn("cellFeatures::calcSuperFaces")
|
||||
WarningInFunction
|
||||
<< " Can not collapse faces " << faceMap_[superFaceI]
|
||||
<< " into one big face on cell " << cellI_ << endl
|
||||
<< "Try decreasing minCos:" << minCos_ << endl;
|
||||
@ -427,10 +422,8 @@ bool Foam::cellFeatures::isFeaturePoint(const label edge0, const label edge1)
|
||||
|| (edge1 >= mesh_.nEdges())
|
||||
)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"cellFeatures::isFeatureVertex(const label, const label)"
|
||||
) << "Illegal edge labels : edge0:" << edge0 << " edge1:" << edge1
|
||||
FatalErrorInFunction
|
||||
<< "Illegal edge labels : edge0:" << edge0 << " edge1:" << edge1
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -468,11 +461,8 @@ bool Foam::cellFeatures::isFeaturePoint(const label edge0, const label edge1)
|
||||
{
|
||||
cosAngle = GREAT; // satisfy compiler
|
||||
|
||||
FatalErrorIn
|
||||
(
|
||||
"cellFeatures::isFeaturePoint(const label, const label"
|
||||
", const label)"
|
||||
) << "Edges do not share common vertex. e0:" << e0
|
||||
FatalErrorInFunction
|
||||
<< "Edges do not share common vertex. e0:" << e0
|
||||
<< " e1:" << e1 << abort(FatalError);
|
||||
}
|
||||
|
||||
@ -499,10 +489,8 @@ bool Foam::cellFeatures::isFeatureVertex(const label faceI, const label vertI)
|
||||
|| (vertI >= mesh_.nPoints())
|
||||
)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"cellFeatures::isFeatureVertex(const label, const label)"
|
||||
) << "Illegal face " << faceI << " or vertex " << vertI
|
||||
FatalErrorInFunction
|
||||
<< "Illegal face " << faceI << " or vertex " << vertI
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -533,10 +521,8 @@ bool Foam::cellFeatures::isFeatureVertex(const label faceI, const label vertI)
|
||||
|
||||
if (edge1 == -1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"cellFeatures::isFeatureVertex(const label, const label)"
|
||||
) << "Did not find two edges sharing vertex " << vertI
|
||||
FatalErrorInFunction
|
||||
<< "Did not find two edges sharing vertex " << vertI
|
||||
<< " on face " << faceI << " vertices:" << mesh_.faces()[faceI]
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -69,11 +69,7 @@ Foam::tmp<Foam::vectorField> Foam::EulerCoordinateRotation::transform
|
||||
const vectorField& st
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"tmp<vectorField> Foam::EulerCoordinateRotation:: "
|
||||
"transform(const vectorField& st) const"
|
||||
);
|
||||
NotImplemented;
|
||||
return tmp<vectorField>(NULL);
|
||||
}
|
||||
|
||||
@ -83,21 +79,14 @@ Foam::tmp<Foam::vectorField> Foam::EulerCoordinateRotation::invTransform
|
||||
const vectorField& st
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"tmp<vectorField> Foam::EulerCoordinateRotation::"
|
||||
"invTransform(const vectorField& st) const"
|
||||
);
|
||||
NotImplemented;
|
||||
return tmp<vectorField>(NULL);
|
||||
}
|
||||
|
||||
|
||||
const Foam::tensorField& Foam::EulerCoordinateRotation::Tr() const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"const tensorField& EulerCoordinateRotation::Tr() const"
|
||||
);
|
||||
NotImplemented;
|
||||
return NullObjectRef<tensorField>();
|
||||
}
|
||||
|
||||
@ -107,10 +96,7 @@ Foam::tmp<Foam::tensorField> Foam::EulerCoordinateRotation::transformTensor
|
||||
const tensorField& st
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"const tensorField& EulerCoordinateRotation::transformTensor() const"
|
||||
);
|
||||
NotImplemented;
|
||||
return tmp<tensorField>(NULL);
|
||||
}
|
||||
|
||||
@ -130,13 +116,7 @@ Foam::tmp<Foam::tensorField> Foam::EulerCoordinateRotation::transformTensor
|
||||
const labelList& cellMap
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"tmp<Foam::tensorField> EulerCoordinateRotation::transformTensor "
|
||||
" const tensorField& st,"
|
||||
" const labelList& cellMap "
|
||||
") const"
|
||||
);
|
||||
NotImplemented;
|
||||
return tmp<tensorField>(NULL);
|
||||
}
|
||||
|
||||
@ -294,6 +274,16 @@ Foam::EulerCoordinateRotation::EulerCoordinateRotation
|
||||
}
|
||||
|
||||
|
||||
Foam::EulerCoordinateRotation::EulerCoordinateRotation
|
||||
(
|
||||
const EulerCoordinateRotation& r
|
||||
)
|
||||
:
|
||||
R_(r.R_),
|
||||
Rtr_(r.Rtr_)
|
||||
{}
|
||||
|
||||
|
||||
void Foam::EulerCoordinateRotation::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("e1") << e1() << token::END_STATEMENT << nl;
|
||||
|
||||
@ -120,6 +120,21 @@ public:
|
||||
//- Construct from dictionary and mesh
|
||||
EulerCoordinateRotation(const dictionary&, const objectRegistry&);
|
||||
|
||||
//- Construct as copy
|
||||
EulerCoordinateRotation(const EulerCoordinateRotation&);
|
||||
|
||||
//- Return clone
|
||||
autoPtr<coordinateRotation> clone() const
|
||||
{
|
||||
return autoPtr<coordinateRotation>
|
||||
(
|
||||
new EulerCoordinateRotation
|
||||
(
|
||||
*this
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -70,11 +70,7 @@ Foam::tmp<Foam::vectorField> Foam::STARCDCoordinateRotation::transform
|
||||
const vectorField& st
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"tmp<vectorField> Foam::STARCDCoordinateRotation:: "
|
||||
"transform(const vectorField& st) const"
|
||||
);
|
||||
NotImplemented;
|
||||
return tmp<vectorField>(NULL);
|
||||
}
|
||||
|
||||
@ -84,21 +80,14 @@ Foam::tmp<Foam::vectorField> Foam::STARCDCoordinateRotation::invTransform
|
||||
const vectorField& st
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"tmp<vectorField> Foam::STARCDCoordinateRotation::"
|
||||
"invTransform(const vectorField& st) const"
|
||||
);
|
||||
NotImplemented;
|
||||
return tmp<vectorField>(NULL);
|
||||
}
|
||||
|
||||
|
||||
const Foam::tensorField& Foam::STARCDCoordinateRotation::Tr() const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"const tensorField& STARCDCoordinateRotatio::Tr() const"
|
||||
);
|
||||
NotImplemented;
|
||||
return NullObjectRef<tensorField>();
|
||||
}
|
||||
|
||||
@ -108,10 +97,7 @@ Foam::tmp<Foam::tensorField> Foam::STARCDCoordinateRotation::transformTensor
|
||||
const tensorField& st
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"tmp<Foam::tensorField> STARCDCoordinateRotation::transformTensor()"
|
||||
);
|
||||
NotImplemented;
|
||||
return tmp<tensorField>(NULL);
|
||||
}
|
||||
|
||||
@ -131,13 +117,7 @@ Foam::tmp<Foam::tensorField> Foam::STARCDCoordinateRotation::transformTensor
|
||||
const labelList& cellMap
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"tmp<Foam::tensorField> STARCDCoordinateRotation::transformTensor "
|
||||
" const tensorField& st,"
|
||||
" const labelList& cellMap "
|
||||
") const"
|
||||
);
|
||||
NotImplemented;
|
||||
return tmp<tensorField>(NULL);
|
||||
}
|
||||
|
||||
@ -291,6 +271,16 @@ Foam::STARCDCoordinateRotation::STARCDCoordinateRotation
|
||||
}
|
||||
|
||||
|
||||
Foam::STARCDCoordinateRotation::STARCDCoordinateRotation
|
||||
(
|
||||
const STARCDCoordinateRotation& r
|
||||
)
|
||||
:
|
||||
R_(r.R_),
|
||||
Rtr_(r.Rtr_)
|
||||
{}
|
||||
|
||||
|
||||
void Foam::STARCDCoordinateRotation::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("e1") << e1() << token::END_STATEMENT << nl;
|
||||
|
||||
@ -117,7 +117,23 @@ public:
|
||||
//- Construct from dictionary and mesh
|
||||
STARCDCoordinateRotation(const dictionary&, const objectRegistry&);
|
||||
|
||||
// Member Functions
|
||||
//- Construct as copy
|
||||
STARCDCoordinateRotation(const STARCDCoordinateRotation&);
|
||||
|
||||
//- Return clone
|
||||
autoPtr<coordinateRotation> clone() const
|
||||
{
|
||||
return autoPtr<coordinateRotation>
|
||||
(
|
||||
new STARCDCoordinateRotation
|
||||
(
|
||||
*this
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Reset rotation to an identity rotation
|
||||
virtual void clear()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -57,7 +57,7 @@ void Foam::axesRotation::calcTransform
|
||||
|
||||
if (mag(b) < SMALL)
|
||||
{
|
||||
FatalErrorIn("axesRotation::calcTransform()")
|
||||
FatalErrorInFunction
|
||||
<< "axis1, axis2 appear co-linear: "
|
||||
<< axis1 << ", " << axis2 << endl
|
||||
<< abort(FatalError);
|
||||
@ -86,15 +86,7 @@ void Foam::axesRotation::calcTransform
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"axesRotation::calcTransform"
|
||||
"("
|
||||
"const vector&,"
|
||||
"const vector&,"
|
||||
"const axisOrder&"
|
||||
")"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "Unhandled axes specifictation" << endl
|
||||
<< abort(FatalError);
|
||||
|
||||
@ -165,14 +157,19 @@ Foam::axesRotation::axesRotation(const tensor& R)
|
||||
{}
|
||||
|
||||
|
||||
Foam::axesRotation::axesRotation(const axesRotation& r)
|
||||
:
|
||||
R_(r.R_),
|
||||
Rtr_(r.Rtr_)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::tensorField& Foam::axesRotation::Tr() const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"const Foam::tensorField& axesRotation::Tr() const"
|
||||
);
|
||||
NotImplemented;
|
||||
return NullObjectRef<tensorField>();
|
||||
}
|
||||
|
||||
@ -212,10 +209,7 @@ Foam::tmp<Foam::tensorField> Foam::axesRotation::transformTensor
|
||||
const tensorField& st
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"const tensorField& axesRotation::transformTensor() const"
|
||||
);
|
||||
NotImplemented;
|
||||
return tmp<tensorField>(NULL);
|
||||
}
|
||||
|
||||
@ -235,14 +229,7 @@ Foam::tmp<Foam::tensorField> Foam::axesRotation::transformTensor
|
||||
const labelList& cellMap
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"tmp<Foam::tensorField> axesRotation::transformTensor "
|
||||
"("
|
||||
"const tensorField&,"
|
||||
"const labelList&"
|
||||
") const"
|
||||
);
|
||||
NotImplemented;
|
||||
return tmp<tensorField>(NULL);
|
||||
}
|
||||
|
||||
@ -307,10 +294,8 @@ void Foam::axesRotation::operator=(const dictionary& dict)
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"axesRotation::operator=(const dictionary&) "
|
||||
) << "not entry of the type (e1, e2) or (e2, e3) or (e3, e1) "
|
||||
FatalErrorInFunction
|
||||
<< "not entry of the type (e1, e2) or (e2, e3) or (e3, e1) "
|
||||
<< "found "
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -111,10 +111,13 @@ public:
|
||||
//- Construct from dictionary and mesh
|
||||
axesRotation(const dictionary&, const objectRegistry&);
|
||||
|
||||
//- Construct as copy
|
||||
axesRotation(const axesRotation&);
|
||||
|
||||
//- Return clone
|
||||
autoPtr<axesRotation> clone() const
|
||||
autoPtr<coordinateRotation> clone() const
|
||||
{
|
||||
return autoPtr<axesRotation>(new axesRotation(*this));
|
||||
return autoPtr<coordinateRotation>(new axesRotation(*this));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -110,6 +110,11 @@ public:
|
||||
(dict)
|
||||
);
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<coordinateRotation> clone() const = 0;
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,13 +47,8 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalIOErrorIn
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
"coordinateRotation::New"
|
||||
"("
|
||||
" const dictionary&, "
|
||||
" const objectRegistry& "
|
||||
")",
|
||||
dict
|
||||
) << "Unknown coordinateRotation type "
|
||||
<< rotType << nl << nl
|
||||
@ -86,12 +81,8 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalIOErrorIn
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
"coordinateRotation::New"
|
||||
"("
|
||||
" const dictionary&, "
|
||||
")",
|
||||
dict
|
||||
) << "Unknown coordinateRotation type "
|
||||
<< rotType << nl << nl
|
||||
|
||||
@ -152,7 +152,7 @@ Foam::cylindrical::cylindrical(const dictionary& dict)
|
||||
origin_(),
|
||||
e3_()
|
||||
{
|
||||
FatalErrorIn("cylindrical(const dictionary&)")
|
||||
FatalErrorInFunction
|
||||
<< " cylindrical can not be constructed from dictionary "
|
||||
<< " use the construtctor : "
|
||||
"("
|
||||
@ -172,6 +172,15 @@ Foam::cylindrical::cylindrical(const tensorField& R)
|
||||
}
|
||||
|
||||
|
||||
Foam::cylindrical::cylindrical(const cylindrical& r)
|
||||
:
|
||||
Rptr_(r.Rptr_, false), // clone
|
||||
origin_(r.origin_),
|
||||
e3_(r.e3_)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::cylindrical::clear()
|
||||
@ -210,10 +219,7 @@ Foam::tmp<Foam::vectorField> Foam::cylindrical::transform
|
||||
{
|
||||
if (Rptr_->size() != vf.size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"tmp<vectorField> cylindrical::transform(const vectorField&)"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "vectorField st has different size to tensorField "
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -224,10 +230,7 @@ Foam::tmp<Foam::vectorField> Foam::cylindrical::transform
|
||||
|
||||
Foam::vector Foam::cylindrical::transform(const vector& v) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"vector cylindrical::transform(const vector&) const"
|
||||
);
|
||||
NotImplemented;
|
||||
return vector::zero;
|
||||
}
|
||||
|
||||
@ -253,10 +256,7 @@ Foam::tmp<Foam::vectorField> Foam::cylindrical::invTransform
|
||||
|
||||
Foam::vector Foam::cylindrical::invTransform(const vector& v) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"vector cylindrical::invTransform(const vector&) const"
|
||||
);
|
||||
NotImplemented;
|
||||
return vector::zero;
|
||||
}
|
||||
|
||||
@ -278,13 +278,7 @@ Foam::tmp<Foam::tensorField> Foam::cylindrical::transformTensor
|
||||
{
|
||||
if (Rptr_->size() != tf.size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"tmp<tensorField> cylindrical::transformTensor"
|
||||
"("
|
||||
"const tensorField&"
|
||||
")"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "tensorField st has different size to tensorField Tr"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -297,10 +291,7 @@ Foam::tensor Foam::cylindrical::transformTensor
|
||||
const tensor& t
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"tensor cylindrical::transformTensor(const tensor&) const"
|
||||
);
|
||||
NotImplemented;
|
||||
|
||||
return tensor::zero;
|
||||
}
|
||||
@ -314,14 +305,7 @@ Foam::tmp<Foam::tensorField> Foam::cylindrical::transformTensor
|
||||
{
|
||||
if (cellMap.size() != tf.size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"tmp<tensorField> cylindrical::transformTensor"
|
||||
"("
|
||||
"const tensorField&, "
|
||||
"const labelList&"
|
||||
")"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "tensorField tf has different size to tensorField Tr"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -347,7 +331,7 @@ Foam::tmp<Foam::symmTensorField> Foam::cylindrical::transformVector
|
||||
{
|
||||
if (Rptr_->size() != vf.size())
|
||||
{
|
||||
FatalErrorIn("cylindrical::transformVector(const vectorField&)")
|
||||
FatalErrorInFunction
|
||||
<< "tensorField vf has different size to tensorField Tr"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -369,10 +353,7 @@ Foam::symmTensor Foam::cylindrical::transformVector
|
||||
const vector& v
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"tensor cylindrical::transformVector(const vector&) const"
|
||||
);
|
||||
NotImplemented;
|
||||
return symmTensor::zero;
|
||||
}
|
||||
|
||||
|
||||
@ -120,10 +120,13 @@ public:
|
||||
//- Construct from tensor Field
|
||||
cylindrical(const tensorField&);
|
||||
|
||||
//- Construct as copy
|
||||
cylindrical(const cylindrical&);
|
||||
|
||||
//- Return clone
|
||||
autoPtr<cylindrical> clone() const
|
||||
autoPtr<coordinateRotation> clone() const
|
||||
{
|
||||
return autoPtr<cylindrical>(new cylindrical(*this));
|
||||
return autoPtr<coordinateRotation>(new cylindrical(*this));
|
||||
}
|
||||
|
||||
|
||||
@ -143,28 +146,28 @@ public:
|
||||
//- Return local-to-global transformation tensor
|
||||
virtual const tensor& R() const
|
||||
{
|
||||
notImplemented("const tensor& cylindrical::R() const");
|
||||
NotImplemented;
|
||||
return tensor::zero;
|
||||
}
|
||||
|
||||
//- Return global-to-local transformation tensor
|
||||
virtual const tensor& Rtr() const
|
||||
{
|
||||
notImplemented("const tensor& cylindrical::Rtr() const");
|
||||
NotImplemented;
|
||||
return tensor::zero;
|
||||
}
|
||||
|
||||
//- Return local Cartesian x-axis
|
||||
virtual const vector e1() const
|
||||
{
|
||||
notImplemented("const tensor& cylindrical::e1() const");
|
||||
NotImplemented;
|
||||
return vector::zero;
|
||||
}
|
||||
|
||||
//- Return local Cartesian y-axis
|
||||
virtual const vector e2() const
|
||||
{
|
||||
notImplemented("const tensor& cylindrical::e2() const");
|
||||
NotImplemented;
|
||||
return vector::zero;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -57,7 +57,7 @@ Foam::coordinateSystem::coordinateSystem
|
||||
name_(name),
|
||||
note_(),
|
||||
origin_(cs.origin_),
|
||||
R_(const_cast<coordinateRotation*>(&cs.R()))
|
||||
R_(cs.R().clone())
|
||||
{}
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ Foam::coordinateSystem::coordinateSystem
|
||||
name_(name),
|
||||
note_(),
|
||||
origin_(origin),
|
||||
R_(const_cast<coordinateRotation*>(&cr))
|
||||
R_(cr.clone())
|
||||
{}
|
||||
|
||||
|
||||
@ -147,11 +147,8 @@ Foam::coordinateSystem::coordinateSystem
|
||||
|
||||
if (index < 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"coordinateSystem::coordinateSystem"
|
||||
"(const objectRegistry&, const dictionary&):"
|
||||
) << "could not find coordinate system: " << key << nl
|
||||
FatalErrorInFunction
|
||||
<< "could not find coordinate system: " << key << nl
|
||||
<< "available coordinate systems: " << lst.toc() << nl << nl
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -42,9 +42,8 @@ Foam::autoPtr<Foam::coordinateSystem> Foam::coordinateSystem::New
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalIOErrorIn
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
"coordinateSystem::New(const objectRegistry&, const dictionary&)",
|
||||
dict
|
||||
) << "Unknown coordinateSystem type "
|
||||
<< coordType << nl << nl
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -44,10 +44,8 @@ void Foam::edgeFaceCirculator::setFace
|
||||
|
||||
if (!isBoundaryEdge_ && !mesh_.isInternalFace(faceI))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"edgeFaceCirculator::setFace(const label, const label)"
|
||||
) << "Edge is not defined as boundary edge but still walked to"
|
||||
FatalErrorInFunction
|
||||
<< "Edge is not defined as boundary edge but still walked to"
|
||||
<< " boundary face:" << faceI << " on cell:" << cellI
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -79,7 +77,7 @@ void Foam::edgeFaceCirculator::otherFace(const label cellI)
|
||||
}
|
||||
}
|
||||
|
||||
FatalErrorIn("edgeFaceCirculator::otherFace(const label)")
|
||||
FatalErrorInFunction
|
||||
<< "Could not find next face stepping"
|
||||
<< " through cell along edge." << endl
|
||||
<< "face:" << faceLabel_ << " index in face:" << index_
|
||||
@ -197,10 +195,8 @@ bool Foam::edgeFaceCirculator::sameOrder(const label v0, const label v1) const
|
||||
|
||||
if (fp != index_)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"edgeFaceCirculator::sameOrder(const label, const label) const"
|
||||
) << "v0:" << v1 << " and v1:" << v1
|
||||
FatalErrorInFunction
|
||||
<< "v0:" << v1 << " and v1:" << v1
|
||||
<< " not on position:" << index_ << " on face:" << faceLabel_
|
||||
<< " verts:" << f << " or not consecutive." << abort(FatalError);
|
||||
}
|
||||
@ -255,7 +251,7 @@ void Foam::edgeFaceCirculator::setCanonical()
|
||||
{
|
||||
const face& f = mesh_.faces()[faceLabel_];
|
||||
|
||||
FatalErrorIn("Foam::edgeFaceCirculator::setCanonical()")
|
||||
FatalErrorInFunction
|
||||
<< "Walked " << i << " cells around edge "
|
||||
<< mesh_.points()[f[index_]]
|
||||
<< mesh_.points()[f.nextLabel(index_)]
|
||||
@ -289,7 +285,7 @@ void Foam::edgeFaceCirculator::setCanonical()
|
||||
{
|
||||
const face& f = mesh_.faces()[faceLabel_];
|
||||
|
||||
FatalErrorIn("Foam::edgeFaceCirculator::setCanonical()")
|
||||
FatalErrorInFunction
|
||||
<< "Reached boundary face " << faceLabel_
|
||||
<< " when walking around internal edge "
|
||||
<< mesh_.points()[f[index_]]
|
||||
@ -357,7 +353,7 @@ Foam::edgeFaceCirculator::operator++()
|
||||
{
|
||||
if (faceLabel_ == -1)
|
||||
{
|
||||
FatalErrorIn("edgeFaceCirculator::operator++()")
|
||||
FatalErrorInFunction
|
||||
<< "Already reached end(). Cannot walk any further."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -276,11 +276,7 @@ bool Foam::treeDataEdge::findIntersectOp::operator()
|
||||
point& result
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"treeDataEdge::intersects(const label, const point&,"
|
||||
"const point&, point&)"
|
||||
);
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -202,11 +202,8 @@ Foam::volumeType Foam::treeDataFace::getVolumeType
|
||||
|
||||
if (info.index() == -1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"treeDataFace::getSampleType"
|
||||
"(indexedOctree<treeDataFace>&, const point&)"
|
||||
) << "Could not find " << sample << " in octree."
|
||||
FatalErrorInFunction
|
||||
<< "Could not find " << sample << " in octree."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -537,18 +534,7 @@ void Foam::treeDataFace::findNearestOp::operator()
|
||||
point& nearestPoint
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"treeDataFace::findNearestOp::operator()"
|
||||
"("
|
||||
" const labelUList&,"
|
||||
" const linePointRef&,"
|
||||
" treeBoundBox&,"
|
||||
" label&,"
|
||||
" point&,"
|
||||
" point&"
|
||||
") const"
|
||||
);
|
||||
NotImplemented;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -240,11 +240,7 @@ bool Foam::treeDataPoint::findIntersectOp::operator()
|
||||
point& result
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"treeDataPoint::intersects(const label, const point&,"
|
||||
"const point&, point&)"
|
||||
);
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -171,11 +171,8 @@ Foam::volumeType Foam::treeDataPrimitivePatch<PatchType>::getVolumeType
|
||||
|
||||
if (info.index() == -1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"treeDataPrimitivePatch::getSampleType"
|
||||
"(indexedOctree<treeDataPrimitivePatch>&, const point&)"
|
||||
) << "Could not find " << sample << " in octree."
|
||||
FatalErrorInFunction
|
||||
<< "Could not find " << sample << " in octree."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -541,18 +538,7 @@ void Foam::treeDataPrimitivePatch<PatchType>::findNearestOp::operator()
|
||||
point& nearestPoint
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"treeDataPrimitivePatch<PatchType>::findNearestOp::operator()"
|
||||
"("
|
||||
" const labelUList&,"
|
||||
" const linePointRef&,"
|
||||
" treeBoundBox&,"
|
||||
" label&,"
|
||||
" point&,"
|
||||
" point&"
|
||||
") const"
|
||||
);
|
||||
NotImplemented;
|
||||
}
|
||||
|
||||
|
||||
@ -598,16 +584,8 @@ bool Foam::treeDataPrimitivePatch<PatchType>::findSelfIntersectOp::operator()
|
||||
{
|
||||
if (edgeID_ == -1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"findSelfIntersectOp::operator()\n"
|
||||
"(\n"
|
||||
" const label index,\n"
|
||||
" const point& start,\n"
|
||||
" const point& end,\n"
|
||||
" point& intersectionPoint\n"
|
||||
") const"
|
||||
) << "EdgeID not set. Please set edgeID to the index of"
|
||||
FatalErrorInFunction
|
||||
<< "EdgeID not set. Please set edgeID to the index of"
|
||||
<< " the edge you are testing"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -40,11 +40,8 @@ Foam::volumeType Foam::treeDataPrimitivePatch<Foam::triSurface>::getVolumeType
|
||||
|
||||
if (info.index() == -1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"treeDataPrimitivePatch::getSampleType"
|
||||
"(indexedOctree<treeDataPrimitivePatch>&, const point&)"
|
||||
) << "Could not find " << sample << " in octree."
|
||||
FatalErrorInFunction
|
||||
<< "Could not find " << sample << " in octree."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -72,7 +69,7 @@ Foam::volumeType Foam::treeDataPrimitivePatch<Foam::triSurface>::getVolumeType
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn("treeDataPrimitivePatch<PatchType>::getVolumeType(..)")
|
||||
FatalErrorInFunction
|
||||
<< "problem" << abort(FatalError);
|
||||
return volumeType::UNKNOWN;
|
||||
}
|
||||
|
||||
@ -208,11 +208,8 @@ void Foam::mappedPatchBase::findSamples
|
||||
{
|
||||
if (samplePatch_.size() && samplePatch_ != "none")
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"mappedPatchBase::findSamples(const pointField&,"
|
||||
" labelList&, labelList&, pointField&) const"
|
||||
) << "No need to supply a patch name when in "
|
||||
FatalErrorInFunction
|
||||
<< "No need to supply a patch name when in "
|
||||
<< sampleModeNames_[mode] << " mode." << exit(FatalError);
|
||||
}
|
||||
|
||||
@ -251,11 +248,8 @@ void Foam::mappedPatchBase::findSamples
|
||||
{
|
||||
if (samplePatch_.size() && samplePatch_ != "none")
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"mappedPatchBase::findSamples(const pointField&,"
|
||||
" labelList&, labelList&, pointField&) const"
|
||||
) << "No need to supply a patch name when in "
|
||||
FatalErrorInFunction
|
||||
<< "No need to supply a patch name when in "
|
||||
<< sampleModeNames_[mode] << " mode." << exit(FatalError);
|
||||
}
|
||||
|
||||
@ -426,11 +420,8 @@ void Foam::mappedPatchBase::findSamples
|
||||
{
|
||||
if (samplePatch().size() && samplePatch() != "none")
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"mappedPatchBase::findSamples(const pointField&,"
|
||||
" labelList&, labelList&, pointField&) const"
|
||||
) << "No need to supply a patch name when in "
|
||||
FatalErrorInFunction
|
||||
<< "No need to supply a patch name when in "
|
||||
<< sampleModeNames_[mode] << " mode." << exit(FatalError);
|
||||
}
|
||||
|
||||
@ -474,7 +465,7 @@ void Foam::mappedPatchBase::findSamples
|
||||
|
||||
default:
|
||||
{
|
||||
FatalErrorIn("mappedPatchBase::findSamples(..)")
|
||||
FatalErrorInFunction
|
||||
<< "problem." << abort(FatalError);
|
||||
}
|
||||
}
|
||||
@ -530,7 +521,7 @@ void Foam::mappedPatchBase::calcMapping() const
|
||||
static bool hasWarned = false;
|
||||
if (mapPtr_.valid())
|
||||
{
|
||||
FatalErrorIn("mappedPatchBase::calcMapping() const")
|
||||
FatalErrorInFunction
|
||||
<< "Mapping already calculated" << exit(FatalError);
|
||||
}
|
||||
|
||||
@ -556,17 +547,8 @@ void Foam::mappedPatchBase::calcMapping() const
|
||||
|
||||
if (sampleMyself && coincident)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"mappedPatchBase::mappedPatchBase\n"
|
||||
"(\n"
|
||||
" const polyPatch& pp,\n"
|
||||
" const word& sampleRegion,\n"
|
||||
" const sampleMode mode,\n"
|
||||
" const word& samplePatch,\n"
|
||||
" const vector& offset\n"
|
||||
")\n"
|
||||
) << "Invalid offset " << d << endl
|
||||
WarningInFunction
|
||||
<< "Invalid offset " << d << endl
|
||||
<< "Offset is the vector added to the patch face centres to"
|
||||
<< " find the patch face supplying the data." << endl
|
||||
<< "Setting it to " << d
|
||||
@ -618,17 +600,8 @@ void Foam::mappedPatchBase::calcMapping() const
|
||||
{
|
||||
if (!hasWarned)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"mappedPatchBase::mappedPatchBase\n"
|
||||
"(\n"
|
||||
" const polyPatch& pp,\n"
|
||||
" const word& sampleRegion,\n"
|
||||
" const sampleMode mode,\n"
|
||||
" const word& samplePatch,\n"
|
||||
" const vector& offset\n"
|
||||
")\n"
|
||||
) << "Did not find " << nNotFound
|
||||
WarningInFunction
|
||||
<< "Did not find " << nNotFound
|
||||
<< " out of " << sampleProcs.size() << " total samples."
|
||||
<< " Sampling these on owner cell centre instead." << endl
|
||||
<< "On patch " << patch_.name()
|
||||
@ -772,7 +745,7 @@ void Foam::mappedPatchBase::calcMapping() const
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn("mappedPatchBase::calcMapping() const")
|
||||
FatalErrorInFunction
|
||||
<< "On patch " << patch_.name()
|
||||
<< " patchface " << faceI
|
||||
<< " is assigned to more than once."
|
||||
@ -784,7 +757,7 @@ void Foam::mappedPatchBase::calcMapping() const
|
||||
{
|
||||
if (used[faceI] == 0)
|
||||
{
|
||||
FatalErrorIn("mappedPatchBase::calcMapping() const")
|
||||
FatalErrorInFunction
|
||||
<< "On patch " << patch_.name()
|
||||
<< " patchface " << faceI
|
||||
<< " is never assigned to."
|
||||
@ -831,7 +804,7 @@ void Foam::mappedPatchBase::calcAMI() const
|
||||
{
|
||||
if (AMIPtr_.valid())
|
||||
{
|
||||
FatalErrorIn("mappedPatchBase::calcAMI() const")
|
||||
FatalErrorInFunction
|
||||
<< "AMI already calculated" << exit(FatalError);
|
||||
}
|
||||
|
||||
@ -916,10 +889,8 @@ Foam::tmp<Foam::pointField> Foam::mappedPatchBase::readListOrField
|
||||
is >> static_cast<List<vector>&>(fld);
|
||||
if (fld.size() != size)
|
||||
{
|
||||
FatalIOErrorIn
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
"mappedPatchBase::readListOrField"
|
||||
"(const word& keyword, const dictionary&, const label)",
|
||||
dict
|
||||
) << "size " << fld.size()
|
||||
<< " is not equal to the given value of " << size
|
||||
@ -928,10 +899,8 @@ Foam::tmp<Foam::pointField> Foam::mappedPatchBase::readListOrField
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalIOErrorIn
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
"mappedPatchBase::readListOrField"
|
||||
"(const word& keyword, const dictionary&, const label)",
|
||||
dict
|
||||
) << "expected keyword 'uniform' or 'nonuniform', found "
|
||||
<< firstToken.wordToken()
|
||||
@ -942,10 +911,8 @@ Foam::tmp<Foam::pointField> Foam::mappedPatchBase::readListOrField
|
||||
{
|
||||
if (is.version() == 2.0)
|
||||
{
|
||||
IOWarningIn
|
||||
IOWarningInFunction
|
||||
(
|
||||
"mappedPatchBase::readListOrField"
|
||||
"(const word& keyword, const dictionary&, const label)",
|
||||
dict
|
||||
) << "expected keyword 'uniform' or 'nonuniform', "
|
||||
"assuming List format for backwards compatibility."
|
||||
@ -1137,13 +1104,8 @@ Foam::mappedPatchBase::mappedPatchBase
|
||||
}
|
||||
else if (mode_ != NEARESTPATCHFACE && mode_ != NEARESTPATCHFACEAMI)
|
||||
{
|
||||
FatalIOErrorIn
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
"mappedPatchBase::mappedPatchBase\n"
|
||||
"(\n"
|
||||
" const polyPatch&,\n"
|
||||
" const dictionary&\n"
|
||||
")\n",
|
||||
dict
|
||||
) << "Please supply the offsetMode as one of "
|
||||
<< NamedEnum<offsetMode, 3>::words()
|
||||
@ -1177,14 +1139,8 @@ Foam::mappedPatchBase::mappedPatchBase
|
||||
{
|
||||
if (mode != NEARESTPATCHFACE && mode != NEARESTPATCHFACEAMI)
|
||||
{
|
||||
FatalIOErrorIn
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
"mappedPatchBase::mappedPatchBase\n"
|
||||
"(\n"
|
||||
" const polyPatch&,\n"
|
||||
" const sampleMode,\n"
|
||||
" const dictionary&\n"
|
||||
")\n",
|
||||
dict
|
||||
) << "Construct from sampleMode and dictionary only applicable for "
|
||||
<< " collocated patches in modes "
|
||||
@ -1295,7 +1251,7 @@ const Foam::polyPatch& Foam::mappedPatchBase::samplePolyPatch() const
|
||||
|
||||
if (patchI == -1)
|
||||
{
|
||||
FatalErrorIn("mappedPatchBase::samplePolyPatch()")
|
||||
FatalErrorInFunction
|
||||
<< "Cannot find patch " << samplePatch()
|
||||
<< " in region " << sampleRegion_ << endl
|
||||
<< "Valid patches are " << nbrMesh.boundaryMesh().names()
|
||||
@ -1420,7 +1376,7 @@ Foam::pointIndexHit Foam::mappedPatchBase::facePoint
|
||||
|
||||
default:
|
||||
{
|
||||
FatalErrorIn("mappedPatchBase::facePoint()")
|
||||
FatalErrorInFunction
|
||||
<< "problem" << abort(FatalError);
|
||||
return pointIndexHit();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -36,7 +36,7 @@ inline const Foam::word& Foam::mappedPatchBase::sampleRegion() const
|
||||
{
|
||||
if (!coupleGroup_.valid())
|
||||
{
|
||||
FatalErrorIn("mappedPatchBase::sampleRegion()")
|
||||
FatalErrorInFunction
|
||||
<< "Supply either a regionName or a coupleGroup"
|
||||
<< " for patch " << patch_.name()
|
||||
<< " in region " << patch_.boundaryMesh().mesh().name()
|
||||
@ -62,7 +62,7 @@ inline const Foam::word& Foam::mappedPatchBase::samplePatch() const
|
||||
{
|
||||
if (!coupleGroup_.valid())
|
||||
{
|
||||
FatalErrorIn("mappedPatchBase::samplePolyPatch()")
|
||||
FatalErrorInFunction
|
||||
<< "Supply either a patchName or a coupleGroup"
|
||||
<< " for patch " << patch_.name()
|
||||
<< " in region " << patch_.boundaryMesh().mesh().name()
|
||||
@ -115,7 +115,7 @@ inline Foam::label Foam::mappedPatchBase::sampleSize() const
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorIn("mappedPatchBase::sampleSize()")
|
||||
FatalErrorInFunction
|
||||
<< "problem." << abort(FatalError);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -146,10 +146,8 @@ Foam::label Foam::meshSearch::findNearestCellWalk
|
||||
{
|
||||
if (seedCellI < 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"meshSearch::findNearestCellWalk(const point&, const label)"
|
||||
) << "illegal seedCell:" << seedCellI << exit(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "illegal seedCell:" << seedCellI << exit(FatalError);
|
||||
}
|
||||
|
||||
// Walk in direction of face that decreases distance
|
||||
@ -245,10 +243,8 @@ Foam::label Foam::meshSearch::findNearestFaceWalk
|
||||
{
|
||||
if (seedFaceI < 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"meshSearch::findNearestFaceWalk(const point&, const label)"
|
||||
) << "illegal seedFace:" << seedFaceI << exit(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "illegal seedFace:" << seedFaceI << exit(FatalError);
|
||||
}
|
||||
|
||||
const vectorField& centres = mesh_.faceCentres();
|
||||
@ -335,10 +331,8 @@ Foam::label Foam::meshSearch::findCellWalk
|
||||
{
|
||||
if (seedCellI < 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"meshSearch::findCellWalk(const point&, const label)"
|
||||
) << "illegal seedCell:" << seedCellI << exit(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "illegal seedCell:" << seedCellI << exit(FatalError);
|
||||
}
|
||||
|
||||
if (mesh_.pointInCell(location, seedCellI, cellDecompMode_))
|
||||
@ -408,11 +402,8 @@ Foam::label Foam::meshSearch::findNearestBoundaryFaceWalk
|
||||
{
|
||||
if (seedFaceI < 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"meshSearch::findNearestBoundaryFaceWalk"
|
||||
"(const point&, const label)"
|
||||
) << "illegal seedFace:" << seedFaceI << exit(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "illegal seedFace:" << seedFaceI << exit(FatalError);
|
||||
}
|
||||
|
||||
// Start off from seedFaceI
|
||||
@ -511,7 +502,11 @@ Foam::meshSearch::meshSearch
|
||||
mesh_(mesh),
|
||||
cellDecompMode_(cellDecompMode)
|
||||
{
|
||||
if (cellDecompMode_ == polyMesh::FACE_DIAG_TRIS)
|
||||
if
|
||||
(
|
||||
cellDecompMode_ == polyMesh::FACE_DIAG_TRIS
|
||||
|| cellDecompMode_ == polyMesh::CELL_TETS
|
||||
)
|
||||
{
|
||||
// Force construction of face diagonals
|
||||
(void)mesh.tetBasePtIs();
|
||||
@ -532,7 +527,11 @@ Foam::meshSearch::meshSearch
|
||||
{
|
||||
overallBbPtr_.reset(new treeBoundBox(bb));
|
||||
|
||||
if (cellDecompMode_ == polyMesh::FACE_DIAG_TRIS)
|
||||
if
|
||||
(
|
||||
cellDecompMode_ == polyMesh::FACE_DIAG_TRIS
|
||||
|| cellDecompMode_ == polyMesh::CELL_TETS
|
||||
)
|
||||
{
|
||||
// Force construction of face diagonals
|
||||
(void)mesh.tetBasePtIs();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -81,10 +81,8 @@ Foam::vectorField Foam::meshTools::calcBoxPointNormals(const primitivePatch& pp)
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"Foam::meshTools::calcBoxPointNormals(const primitivePatch& pp)"
|
||||
) << "Average point normal not visible for point:"
|
||||
WarningInFunction
|
||||
<< "Average point normal not visible for point:"
|
||||
<< pp.meshPoints()[pointI] << endl;
|
||||
|
||||
label visOctant =
|
||||
@ -175,11 +173,8 @@ Foam::vectorField Foam::meshTools::calcBoxPointNormals(const primitivePatch& pp)
|
||||
{
|
||||
pn[pointI] = vector::zero;
|
||||
|
||||
WarningIn
|
||||
(
|
||||
"Foam::meshTools::calcBoxPointNormals"
|
||||
"(const primitivePatch& pp)"
|
||||
) << "No visible octant for point:" << pp.meshPoints()[pointI]
|
||||
WarningInFunction
|
||||
<< "No visible octant for point:" << pp.meshPoints()[pointI]
|
||||
<< " cooord:" << pp.points()[pp.meshPoints()[pointI]] << nl
|
||||
<< "Normal set to " << pn[pointI] << endl;
|
||||
}
|
||||
@ -410,11 +405,8 @@ Foam::label Foam::meshTools::getSharedEdge
|
||||
}
|
||||
}
|
||||
}
|
||||
FatalErrorIn
|
||||
(
|
||||
"meshTools::getSharedEdge(const primitiveMesh&, const label"
|
||||
", const label)"
|
||||
) << "Faces " << f0 << " and " << f1 << " do not share an edge"
|
||||
FatalErrorInFunction
|
||||
<< "Faces " << f0 << " and " << f1 << " do not share an edge"
|
||||
<< abort(FatalError);
|
||||
|
||||
return -1;
|
||||
@ -449,11 +441,8 @@ Foam::label Foam::meshTools::getSharedFace
|
||||
}
|
||||
|
||||
|
||||
FatalErrorIn
|
||||
(
|
||||
"meshTools::getSharedFace(const primitiveMesh&, const label"
|
||||
", const label)"
|
||||
) << "No common face for"
|
||||
FatalErrorInFunction
|
||||
<< "No common face for"
|
||||
<< " cell0I:" << cell0I << " faces:" << cFaces
|
||||
<< " cell1I:" << cell1I << " faces:"
|
||||
<< mesh.cells()[cell1I]
|
||||
@ -498,11 +487,8 @@ void Foam::meshTools::getEdgeFaces
|
||||
|
||||
if ((face0 == -1) || (face1 == -1))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"meshTools::getEdgeFaces(const primitiveMesh&, const label"
|
||||
", const label, label&, label&"
|
||||
) << "Can not find faces using edge " << mesh.edges()[edgeI]
|
||||
FatalErrorInFunction
|
||||
<< "Can not find faces using edge " << mesh.edges()[edgeI]
|
||||
<< " on cell " << cellI << abort(FatalError);
|
||||
}
|
||||
}
|
||||
@ -531,11 +517,8 @@ Foam::label Foam::meshTools::otherEdge
|
||||
}
|
||||
}
|
||||
|
||||
FatalErrorIn
|
||||
(
|
||||
"meshTools::otherEdge(const primitiveMesh&, const labelList&"
|
||||
", const label, const label)"
|
||||
) << "Can not find edge in "
|
||||
FatalErrorInFunction
|
||||
<< "Can not find edge in "
|
||||
<< UIndirectList<edge>(mesh.edges(), edgeLabels)()
|
||||
<< " connected to edge "
|
||||
<< thisEdgeI << " with vertices " << mesh.edges()[thisEdgeI]
|
||||
@ -578,11 +561,8 @@ Foam::label Foam::meshTools::otherCell
|
||||
{
|
||||
if (!mesh.isInternalFace(faceI))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"meshTools::otherCell(const primitiveMesh&, const label"
|
||||
", const label)"
|
||||
) << "Face " << faceI << " is not internal"
|
||||
FatalErrorInFunction
|
||||
<< "Face " << faceI << " is not internal"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -765,10 +745,8 @@ Foam::vector Foam::meshTools::edgeToCutDir
|
||||
{
|
||||
if (!hexMatcher().isA(mesh, cellI))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::meshTools::getCutDir(const label, const label)"
|
||||
) << "Not a hex : cell:" << cellI << abort(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Not a hex : cell:" << cellI << abort(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -814,10 +792,8 @@ Foam::label Foam::meshTools::cutDirToEdge
|
||||
{
|
||||
if (!hexMatcher().isA(mesh, cellI))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::meshTools::getCutDir(const label, const vector&)"
|
||||
) << "Not a hex : cell:" << cellI << abort(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Not a hex : cell:" << cellI << abort(FatalError);
|
||||
}
|
||||
|
||||
const labelList& cEdges = mesh.cellEdges()[cellI];
|
||||
@ -861,10 +837,8 @@ Foam::label Foam::meshTools::cutDirToEdge
|
||||
{
|
||||
if (!doneEdges.found(cEdges[cEdgeI]))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"meshTools::cutDirToEdge(const label, const vector&)"
|
||||
) << "Cell:" << cellI << " edges:" << cEdges << endl
|
||||
FatalErrorInFunction
|
||||
<< "Cell:" << cellI << " edges:" << cEdges << endl
|
||||
<< "Edge:" << cEdges[cEdgeI] << " not yet handled"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -872,10 +846,8 @@ Foam::label Foam::meshTools::cutDirToEdge
|
||||
|
||||
if (maxEdgeI == -1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"meshTools::cutDirToEdge(const label, const vector&)"
|
||||
) << "Problem : did not find edge aligned with " << cutDir
|
||||
FatalErrorInFunction
|
||||
<< "Problem : did not find edge aligned with " << cutDir
|
||||
<< " on cell " << cellI << abort(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -117,7 +117,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
|
||||
}
|
||||
else if (edgeUsage[edgeI] != 2)
|
||||
{
|
||||
WarningIn("void polyMeshZipUpCells(polyMesh& mesh)")
|
||||
WarningInFunction
|
||||
<< "edge " << cellEdges[edgeI] << " in cell " << cellI
|
||||
<< " used " << edgeUsage[edgeI] << " times. " << nl
|
||||
<< "Should be 1 or 2 - serious error "
|
||||
@ -494,7 +494,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
|
||||
{
|
||||
if (orderedEdge[checkI] == orderedEdge[checkJ])
|
||||
{
|
||||
WarningIn("void polyMeshZipUpCells(polyMesh& mesh)")
|
||||
WarningInFunction
|
||||
<< "Duplicate point found in edge to insert. "
|
||||
<< nl << "Point: " << orderedEdge[checkI]
|
||||
<< " edge: " << orderedEdge << endl;
|
||||
@ -688,13 +688,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
|
||||
{
|
||||
if (newFace[checkI] == newFace[checkJ])
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"void polyMeshZipUpCells"
|
||||
"("
|
||||
"polyMesh& mesh"
|
||||
")"
|
||||
)
|
||||
WarningInFunction
|
||||
<< "Duplicate point found "
|
||||
<< "in the new face. " << nl
|
||||
<< "Point: "
|
||||
@ -729,7 +723,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
|
||||
labelList toc(problemCells.toc());
|
||||
sort(toc);
|
||||
|
||||
FatalErrorIn("void polyMeshZipUpCells(polyMesh& mesh)")
|
||||
FatalErrorInFunction
|
||||
<< "Found " << problemCells.size() << " problem cells." << nl
|
||||
<< "Cells: " << toc
|
||||
<< abort(FatalError);
|
||||
@ -781,8 +775,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
|
||||
|
||||
if (nChangedFacesInMesh > 0)
|
||||
{
|
||||
FatalErrorIn("void polyMeshZipUpCells(polyMesh& mesh)")
|
||||
<< "cell zip-up failed after 100 cycles. Probable problem "
|
||||
FatalErrorInFunction
|
||||
<< "with the original mesh"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -318,12 +318,8 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct
|
||||
// Non-orthogonality greater than 90 deg
|
||||
if (report)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"primitiveMeshGeometry::checkFaceDotProduct"
|
||||
"(const bool, const scalar, const labelList&"
|
||||
", labelHashSet*)"
|
||||
) << "Severe non-orthogonality detected for face "
|
||||
WarningInFunction
|
||||
<< "Severe non-orthogonality detected for face "
|
||||
<< faceI
|
||||
<< " between cells " << own[faceI] << " and "
|
||||
<< nei[faceI]
|
||||
@ -383,11 +379,8 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct
|
||||
{
|
||||
if (report)
|
||||
{
|
||||
SeriousErrorIn
|
||||
(
|
||||
"primitiveMeshGeometry::checkFaceDotProduct"
|
||||
"(const bool, const scalar, const labelList&, labelHashSet*)"
|
||||
) << "Error in non-orthogonality detected" << endl;
|
||||
SeriousErrorInFunction
|
||||
<< "Error in non-orthogonality detected" << endl;
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -497,12 +490,8 @@ bool Foam::primitiveMeshGeometry::checkFacePyramids
|
||||
{
|
||||
if (report)
|
||||
{
|
||||
SeriousErrorIn
|
||||
(
|
||||
"primitiveMeshGeometry::checkFacePyramids("
|
||||
"const bool, const scalar, const pointField&"
|
||||
", const labelList&, labelHashSet*)"
|
||||
) << "Error in face pyramids: faces pointing the wrong way!"
|
||||
SeriousErrorInFunction
|
||||
<< "Error in face pyramids: faces pointing the wrong way!"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
@ -638,11 +627,7 @@ bool Foam::primitiveMeshGeometry::checkFaceSkewness
|
||||
{
|
||||
if (report)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"primitiveMeshGeometry::checkFaceSkewness"
|
||||
"(const bool, const scalar, const labelList&, labelHashSet*)"
|
||||
) << "Large face skewness detected. Max skewness = "
|
||||
WarningInFunction
|
||||
<< 100*maxSkew
|
||||
<< " percent.\nThis may impair the quality of the result." << nl
|
||||
<< nWarnSkew << " highly skew faces detected."
|
||||
@ -725,11 +710,7 @@ bool Foam::primitiveMeshGeometry::checkFaceWeights
|
||||
{
|
||||
if (report)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"primitiveMeshGeometry::checkFaceWeights"
|
||||
"(const bool, const scalar, const labelList&, labelHashSet*)"
|
||||
) << "Small interpolation weight detected. Min weight = "
|
||||
WarningInFunction
|
||||
<< minWeight << '.' << nl
|
||||
<< nWarnWeight << " faces with small weights detected."
|
||||
<< endl;
|
||||
@ -767,12 +748,8 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles
|
||||
{
|
||||
if (maxDeg < -SMALL || maxDeg > 180+SMALL)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"primitiveMeshGeometry::checkFaceAngles"
|
||||
"(const bool, const scalar, const pointField&, const labelList&"
|
||||
", labelHashSet*)"
|
||||
) << "maxDeg should be [0..180] but is now " << maxDeg
|
||||
FatalErrorInFunction
|
||||
<< "maxDeg should be [0..180] but is now " << maxDeg
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -874,12 +851,8 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles
|
||||
{
|
||||
if (report)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"primitiveMeshGeometry::checkFaceAngles"
|
||||
"(const bool, const scalar, const pointField&"
|
||||
", const labelList&, labelHashSet*)"
|
||||
) << nConcave << " face points with severe concave angle (> "
|
||||
WarningInFunction
|
||||
<< nConcave << " face points with severe concave angle (> "
|
||||
<< maxDeg << " deg) found.\n"
|
||||
<< endl;
|
||||
}
|
||||
@ -910,12 +883,8 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles
|
||||
//{
|
||||
// if (warnFlatness < 0 || warnFlatness > 1)
|
||||
// {
|
||||
// FatalErrorIn
|
||||
// (
|
||||
// "primitiveMeshGeometry::checkFaceFlatness"
|
||||
// "(const bool, const scalar, const pointField&"
|
||||
// ", const labelList&, labelHashSet*)"
|
||||
// ) << "warnFlatness should be [0..1] but is now " << warnFlatness
|
||||
// FatalErrorInFunction
|
||||
// << "warnFlatness should be [0..1] but is now " << warnFlatness
|
||||
// << abort(FatalError);
|
||||
// }
|
||||
//
|
||||
@ -1011,12 +980,8 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles
|
||||
// {
|
||||
// if (report)
|
||||
// {
|
||||
// WarningIn
|
||||
// (
|
||||
// "primitiveMeshGeometry::checkFaceFlatness"
|
||||
// "(const bool, const scalar, const pointField&"
|
||||
// ", const labelList&, labelHashSet*)"
|
||||
// ) << nWarped << " faces with severe warpage (flatness < "
|
||||
// WarningInFunction
|
||||
// << nWarped << " faces with severe warpage (flatness < "
|
||||
// << warnFlatness << ") found.\n"
|
||||
// << endl;
|
||||
// }
|
||||
@ -1047,12 +1012,8 @@ bool Foam::primitiveMeshGeometry::checkFaceTwist
|
||||
{
|
||||
if (minTwist < -1-SMALL || minTwist > 1+SMALL)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"primitiveMeshGeometry::checkFaceTwist"
|
||||
"(const bool, const scalar, const primitiveMesh&, const pointField&"
|
||||
", const labelList&, labelHashSet*)"
|
||||
) << "minTwist should be [-1..1] but is now " << minTwist
|
||||
FatalErrorInFunction
|
||||
<< "minTwist should be [-1..1] but is now " << minTwist
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -1129,12 +1090,8 @@ bool Foam::primitiveMeshGeometry::checkFaceTwist
|
||||
{
|
||||
if (report)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"primitiveMeshGeometry::checkFaceTwist"
|
||||
"(const bool, const scalar, const primitiveMesh&"
|
||||
", const pointField&, const labelList&, labelHashSet*)"
|
||||
) << nWarped << " faces with severe warpage "
|
||||
WarningInFunction
|
||||
<< nWarped << " faces with severe warpage "
|
||||
<< "(cosine of the angle between triangle normal and "
|
||||
<< "face normal < " << minTwist << ") found.\n"
|
||||
<< endl;
|
||||
@ -1195,12 +1152,8 @@ bool Foam::primitiveMeshGeometry::checkFaceArea
|
||||
{
|
||||
if (report)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"primitiveMeshGeometry::checkFaceArea"
|
||||
"(const bool, const scalar, const primitiveMesh&"
|
||||
", const pointField&, const labelList&, labelHashSet*)"
|
||||
) << nZeroArea << " faces with area < " << minArea
|
||||
WarningInFunction
|
||||
<< nZeroArea << " faces with area < " << minArea
|
||||
<< " found.\n"
|
||||
<< endl;
|
||||
}
|
||||
@ -1300,13 +1253,8 @@ bool Foam::primitiveMeshGeometry::checkCellDeterminant
|
||||
{
|
||||
if (report)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"primitiveMeshGeometry::checkCellDeterminant"
|
||||
"(const bool, const scalar, const primitiveMesh&"
|
||||
", const pointField&, const labelList&, const labelList&"
|
||||
", labelHashSet*)"
|
||||
) << nWarnDet << " cells with determinant < " << warnDet
|
||||
WarningInFunction
|
||||
<< nWarnDet << " cells with determinant < " << warnDet
|
||||
<< " found.\n"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -191,19 +191,8 @@ Foam::regionCoupledBaseGAMGInterface::regionCoupledBaseGAMGInterface
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"regionCoupledBaseGAMGInterface::"
|
||||
"regionCoupledBaseGAMGInterface"
|
||||
"("
|
||||
"const label index,"
|
||||
"const lduInterfacePtrsList& coarseInterfaces,"
|
||||
"const lduInterface& fineInterface,"
|
||||
"const labelField& localRestrictAddressing,"
|
||||
"const labelField& neighbourRestrictAddressing,"
|
||||
"const label fineLevelIndex"
|
||||
")"
|
||||
) << " GAMGAgglomeration was not found in the nbr mesh. "
|
||||
FatalErrorInFunction
|
||||
<< " GAMGAgglomeration was not found in the nbr mesh. "
|
||||
<< " Check on the cacheAgglomeration flag in fvSolution"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
@ -228,13 +217,6 @@ internalFieldTransfer
|
||||
const labelUList& iF
|
||||
) const
|
||||
{
|
||||
// WarningIn
|
||||
// (
|
||||
// "regionCoupledBaseGAMGInterface::internalFieldTransfer"
|
||||
// "( const Pstream::commsTypes, const labelUList&)"
|
||||
// " the internal field can not be transfered "
|
||||
// " as the neighbFvPatch are in different meshes "
|
||||
// );
|
||||
/*
|
||||
//const labelUList& nbrFaceCells = neighbPatch().faceCells();
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -92,10 +92,7 @@ public:
|
||||
{
|
||||
//TBD. How to serialise the AMI such that we can stream
|
||||
// regionCoupledGAMGInterface.
|
||||
notImplemented
|
||||
(
|
||||
"regionCoupledGAMGInterface::write(Ostream&) const"
|
||||
);
|
||||
NotImplemented;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -94,10 +94,7 @@ public:
|
||||
{
|
||||
//TBD. How to serialise the AMI such that we can stream
|
||||
// regionCoupledWallGAMGInterface.
|
||||
notImplemented
|
||||
(
|
||||
"regionCoupledWallGAMGInterface::write(Ostream&) const"
|
||||
);
|
||||
NotImplemented;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@ -205,7 +205,7 @@ Foam::label Foam::regionCoupledBase::neighbPatchID() const
|
||||
|
||||
if (nbrPatchID_ == -1)
|
||||
{
|
||||
FatalErrorIn("cyclicPolyAMIPatch::neighbPatchID() const")
|
||||
FatalErrorInFunction
|
||||
<< "Illegal neighbourPatch name " << nbrPatchName_
|
||||
<< nl << "Valid patch names are "
|
||||
<< mesh.boundaryMesh().names()
|
||||
@ -221,7 +221,7 @@ Foam::label Foam::regionCoupledBase::neighbPatchID() const
|
||||
|
||||
if (nbrPatch.nbrPatchName() != patch_.name())
|
||||
{
|
||||
WarningIn("regionCoupledBase::neighbPatchID() const")
|
||||
WarningInFunction
|
||||
<< "Patch " << patch_.name()
|
||||
<< " specifies neighbour patch " << nbrPatchName()
|
||||
<< nl << " but that in return specifies "
|
||||
@ -283,10 +283,7 @@ const Foam::AMIPatchToPatchInterpolation& Foam::regionCoupledBase::AMI() const
|
||||
{
|
||||
if (!owner())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"const AMIPatchToPatchInterpolation& regionCoupledBase::AMI()"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "AMI interpolator only available to owner patch"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -70,6 +70,11 @@ bool Foam::localPointRegion::isDuplicate
|
||||
const bool forward
|
||||
)
|
||||
{
|
||||
if (f0.size() != f1.size())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
label fp1 = findIndex(f1, f0[0]);
|
||||
|
||||
if (fp1 == -1)
|
||||
@ -127,7 +132,7 @@ void Foam::localPointRegion::countPointRegions
|
||||
|
||||
if (minRegion[faceI].empty())
|
||||
{
|
||||
FatalErrorIn("localPointRegion::countPointRegions(..)")
|
||||
FatalErrorInFunction
|
||||
<< "Face from candidateFace without minRegion set." << endl
|
||||
<< "Face:" << faceI << " fc:" << mesh.faceCentres()[faceI]
|
||||
<< " verts:" << f << abort(FatalError);
|
||||
@ -567,11 +572,8 @@ Foam::labelList Foam::localPointRegion::findDuplicateFaces
|
||||
|
||||
if (isDuplicate(f, otherF, true))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"findDuplicateFaces(const primitiveMesh&"
|
||||
", const labelList&)"
|
||||
) << "Face:" << bFaceI + mesh.nInternalFaces()
|
||||
FatalErrorInFunction
|
||||
<< "Face:" << bFaceI + mesh.nInternalFaces()
|
||||
<< " has local points:" << f
|
||||
<< " which are in same order as face:"
|
||||
<< otherFaceI + mesh.nInternalFaces()
|
||||
@ -589,11 +591,8 @@ Foam::labelList Foam::localPointRegion::findDuplicateFaces
|
||||
|| duplicateFace[otherFaceI] != -1
|
||||
)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"findDuplicateFaces(const primitiveMesh&"
|
||||
", const labelList&)"
|
||||
) << "One of two duplicate faces already marked"
|
||||
FatalErrorInFunction
|
||||
<< "One of two duplicate faces already marked"
|
||||
<< " as duplicate." << nl
|
||||
<< "This means that three or more faces share"
|
||||
<< " the same points and this is illegal." << nl
|
||||
@ -655,10 +654,8 @@ Foam::List<Foam::labelPair> Foam::localPointRegion::findDuplicateFacePairs
|
||||
|| (patch1 != -1 && isA<processorPolyPatch>(patches[patch1]))
|
||||
)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"localPointRegion::findDuplicateFacePairs(const polyMesh&)"
|
||||
) << "One of two duplicate faces is on"
|
||||
FatalErrorInFunction
|
||||
<< "One of two duplicate faces is on"
|
||||
<< " processorPolyPatch."
|
||||
<< "This is not allowed." << nl
|
||||
<< "Face:" << meshFace0
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -177,8 +177,8 @@ public:
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
friend Ostream& operator<<(Ostream&, const minData&);
|
||||
friend Istream& operator>>(Istream&, minData&);
|
||||
friend inline Ostream& operator<<(Ostream&, const minData&);
|
||||
friend inline Istream& operator>>(Istream&, minData&);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -199,7 +199,7 @@ inline bool Foam::minData::operator!=
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Ostream& Foam::operator<<
|
||||
inline Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Foam::Ostream& os,
|
||||
const Foam::minData& wDist
|
||||
@ -209,7 +209,7 @@ Foam::Ostream& Foam::operator<<
|
||||
}
|
||||
|
||||
|
||||
Foam::Istream& Foam::operator>>
|
||||
inline Foam::Istream& Foam::operator>>
|
||||
(
|
||||
Foam::Istream& is,
|
||||
Foam::minData& wDist
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -28,6 +28,8 @@ License
|
||||
#include "processorPolyPatch.H"
|
||||
#include "globalIndex.H"
|
||||
#include "syncTools.H"
|
||||
#include "FaceCellWave.H"
|
||||
#include "minData.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -40,340 +42,93 @@ defineTypeNameAndDebug(regionSplit, 0);
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
// Handle (non-processor) coupled faces.
|
||||
void Foam::regionSplit::transferCoupledFaceRegion
|
||||
(
|
||||
const label faceI,
|
||||
const label otherFaceI,
|
||||
|
||||
labelList& faceRegion,
|
||||
DynamicList<label>& newChangedFaces
|
||||
) const
|
||||
{
|
||||
if (faceRegion[faceI] >= 0)
|
||||
{
|
||||
if (faceRegion[otherFaceI] == -1)
|
||||
{
|
||||
faceRegion[otherFaceI] = faceRegion[faceI];
|
||||
newChangedFaces.append(otherFaceI);
|
||||
}
|
||||
else if (faceRegion[otherFaceI] == -2)
|
||||
{
|
||||
// otherFaceI blocked but faceI is not. Is illegal for coupled
|
||||
// faces, not for explicit connections.
|
||||
}
|
||||
else if (faceRegion[otherFaceI] != faceRegion[faceI])
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"regionSplit::transferCoupledFaceRegion"
|
||||
"(const label, const label, labelList&, labelList&) const"
|
||||
) << "Problem : coupled face " << faceI
|
||||
<< " on patch " << mesh().boundaryMesh().whichPatch(faceI)
|
||||
<< " has region " << faceRegion[faceI]
|
||||
<< " but coupled face " << otherFaceI
|
||||
<< " has region " << faceRegion[otherFaceI]
|
||||
<< endl
|
||||
<< "Is your blocked faces specification"
|
||||
<< " synchronized across coupled boundaries?"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
else if (faceRegion[faceI] == -1)
|
||||
{
|
||||
if (faceRegion[otherFaceI] >= 0)
|
||||
{
|
||||
faceRegion[faceI] = faceRegion[otherFaceI];
|
||||
newChangedFaces.append(faceI);
|
||||
}
|
||||
else if (faceRegion[otherFaceI] == -2)
|
||||
{
|
||||
// otherFaceI blocked but faceI is not. Is illegal for coupled
|
||||
// faces, not for explicit connections.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::regionSplit::fillSeedMask
|
||||
(
|
||||
const List<labelPair>& explicitConnections,
|
||||
labelList& cellRegion,
|
||||
labelList& faceRegion,
|
||||
const label seedCellID,
|
||||
const label markValue
|
||||
) const
|
||||
{
|
||||
// Do seed cell
|
||||
cellRegion[seedCellID] = markValue;
|
||||
|
||||
|
||||
// Collect faces on seed cell
|
||||
const cell& cFaces = mesh().cells()[seedCellID];
|
||||
|
||||
label nFaces = 0;
|
||||
|
||||
labelList changedFaces(cFaces.size());
|
||||
|
||||
forAll(cFaces, i)
|
||||
{
|
||||
label faceI = cFaces[i];
|
||||
|
||||
if (faceRegion[faceI] == -1)
|
||||
{
|
||||
faceRegion[faceI] = markValue;
|
||||
changedFaces[nFaces++] = faceI;
|
||||
}
|
||||
}
|
||||
changedFaces.setSize(nFaces);
|
||||
|
||||
|
||||
// Loop over changed faces. FaceCellWave in small.
|
||||
|
||||
while (changedFaces.size())
|
||||
{
|
||||
//if (debug)
|
||||
//{
|
||||
// Pout<< "regionSplit::fillSeedMask : changedFaces:"
|
||||
// << changedFaces.size() << endl;
|
||||
//}
|
||||
|
||||
DynamicList<label> changedCells(changedFaces.size());
|
||||
|
||||
forAll(changedFaces, i)
|
||||
{
|
||||
label faceI = changedFaces[i];
|
||||
|
||||
label own = mesh().faceOwner()[faceI];
|
||||
|
||||
if (cellRegion[own] == -1)
|
||||
{
|
||||
cellRegion[own] = markValue;
|
||||
changedCells.append(own);
|
||||
}
|
||||
|
||||
if (mesh().isInternalFace(faceI))
|
||||
{
|
||||
label nei = mesh().faceNeighbour()[faceI];
|
||||
|
||||
if (cellRegion[nei] == -1)
|
||||
{
|
||||
cellRegion[nei] = markValue;
|
||||
changedCells.append(nei);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//if (debug)
|
||||
//{
|
||||
// Pout<< "regionSplit::fillSeedMask : changedCells:"
|
||||
// << changedCells.size() << endl;
|
||||
//}
|
||||
|
||||
// Loop over changedCells and collect faces
|
||||
DynamicList<label> newChangedFaces(changedCells.size());
|
||||
|
||||
forAll(changedCells, i)
|
||||
{
|
||||
label cellI = changedCells[i];
|
||||
|
||||
const cell& cFaces = mesh().cells()[cellI];
|
||||
|
||||
forAll(cFaces, cFaceI)
|
||||
{
|
||||
label faceI = cFaces[cFaceI];
|
||||
|
||||
if (faceRegion[faceI] == -1)
|
||||
{
|
||||
faceRegion[faceI] = markValue;
|
||||
newChangedFaces.append(faceI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//if (debug)
|
||||
//{
|
||||
// Pout<< "regionSplit::fillSeedMask : changedFaces before sync:"
|
||||
// << changedFaces.size() << endl;
|
||||
//}
|
||||
|
||||
|
||||
// Check for changes to any locally coupled face.
|
||||
// Global connections are done later.
|
||||
|
||||
const polyBoundaryMesh& patches = mesh().boundaryMesh();
|
||||
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
|
||||
if
|
||||
(
|
||||
isA<cyclicPolyPatch>(pp)
|
||||
&& refCast<const cyclicPolyPatch>(pp).owner()
|
||||
)
|
||||
{
|
||||
// Transfer from neighbourPatch to here or vice versa.
|
||||
|
||||
const cyclicPolyPatch& cycPatch =
|
||||
refCast<const cyclicPolyPatch>(pp);
|
||||
|
||||
label faceI = cycPatch.start();
|
||||
|
||||
forAll(cycPatch, i)
|
||||
{
|
||||
label otherFaceI = cycPatch.transformGlobalFace(faceI);
|
||||
|
||||
transferCoupledFaceRegion
|
||||
(
|
||||
faceI,
|
||||
otherFaceI,
|
||||
faceRegion,
|
||||
newChangedFaces
|
||||
);
|
||||
|
||||
faceI++;
|
||||
}
|
||||
}
|
||||
}
|
||||
forAll(explicitConnections, i)
|
||||
{
|
||||
transferCoupledFaceRegion
|
||||
(
|
||||
explicitConnections[i][0],
|
||||
explicitConnections[i][1],
|
||||
faceRegion,
|
||||
newChangedFaces
|
||||
);
|
||||
}
|
||||
|
||||
//if (debug)
|
||||
//{
|
||||
// Pout<< "regionSplit::fillSeedMask : changedFaces after sync:"
|
||||
// << newChangedFaces.size() << endl;
|
||||
//}
|
||||
|
||||
changedFaces.transfer(newChangedFaces);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::label Foam::regionSplit::calcLocalRegionSplit
|
||||
void Foam::regionSplit::calcNonCompactRegionSplit
|
||||
(
|
||||
const globalIndex& globalFaces,
|
||||
const boolList& blockedFace,
|
||||
const List<labelPair>& explicitConnections,
|
||||
|
||||
labelList& cellRegion
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
if (blockedFace.size())
|
||||
{
|
||||
// Check that blockedFace is synced.
|
||||
boolList syncBlockedFace(blockedFace);
|
||||
syncTools::swapFaceList(mesh(), syncBlockedFace);
|
||||
// Field on cells and faces.
|
||||
List<minData> cellData(mesh().nCells());
|
||||
List<minData> faceData(mesh().nFaces());
|
||||
|
||||
forAll(syncBlockedFace, faceI)
|
||||
{
|
||||
if (syncBlockedFace[faceI] != blockedFace[faceI])
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"regionSplit::calcLocalRegionSplit(..)"
|
||||
) << "Face " << faceI << " not synchronised. My value:"
|
||||
<< blockedFace[faceI] << " coupled value:"
|
||||
<< syncBlockedFace[faceI]
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
// Take over blockedFaces by seeding a negative number
|
||||
// (so is always less than the decomposition)
|
||||
label nUnblocked = 0;
|
||||
forAll(faceData, faceI)
|
||||
{
|
||||
if (blockedFace.size() && blockedFace[faceI])
|
||||
{
|
||||
faceData[faceI] = minData(-2);
|
||||
}
|
||||
else
|
||||
{
|
||||
nUnblocked++;
|
||||
}
|
||||
}
|
||||
|
||||
// Region per face.
|
||||
// -1 unassigned
|
||||
// -2 blocked
|
||||
labelList faceRegion(mesh().nFaces(), -1);
|
||||
// Seed unblocked faces
|
||||
labelList seedFaces(nUnblocked);
|
||||
List<minData> seedData(nUnblocked);
|
||||
nUnblocked = 0;
|
||||
|
||||
if (blockedFace.size())
|
||||
|
||||
forAll(faceData, faceI)
|
||||
{
|
||||
forAll(blockedFace, faceI)
|
||||
if (blockedFace.empty() || !blockedFace[faceI])
|
||||
{
|
||||
if (blockedFace[faceI])
|
||||
{
|
||||
faceRegion[faceI] = -2;
|
||||
}
|
||||
seedFaces[nUnblocked] = faceI;
|
||||
// Seed face with globally unique number
|
||||
seedData[nUnblocked] = minData(globalFaces.toGlobal(faceI));
|
||||
nUnblocked++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Assign local regions
|
||||
// ~~~~~~~~~~~~~~~~~~~~
|
||||
// Propagate information inwards
|
||||
FaceCellWave<minData> deltaCalc
|
||||
(
|
||||
mesh(),
|
||||
explicitConnections,
|
||||
false, // disable walking through cyclicAMI for backwards compatibility
|
||||
seedFaces,
|
||||
seedData,
|
||||
faceData,
|
||||
cellData,
|
||||
mesh().globalData().nTotalCells()+1
|
||||
);
|
||||
|
||||
// Start with region 0
|
||||
label nLocalRegions = 0;
|
||||
|
||||
label unsetCellI = 0;
|
||||
|
||||
do
|
||||
// And extract
|
||||
cellRegion.setSize(mesh().nCells());
|
||||
forAll(cellRegion, cellI)
|
||||
{
|
||||
// Find first unset cell
|
||||
|
||||
for (; unsetCellI < mesh().nCells(); unsetCellI++)
|
||||
if (cellData[cellI].valid(deltaCalc.data()))
|
||||
{
|
||||
if (cellRegion[unsetCellI] == -1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
cellRegion[cellI] = cellData[cellI].data();
|
||||
}
|
||||
|
||||
if (unsetCellI >= mesh().nCells())
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
// Unvisited cell -> only possible if surrounded by blocked faces.
|
||||
// If so make up region from any of the faces
|
||||
const cell& cFaces = mesh().cells()[cellI];
|
||||
label faceI = cFaces[0];
|
||||
|
||||
fillSeedMask
|
||||
(
|
||||
explicitConnections,
|
||||
cellRegion,
|
||||
faceRegion,
|
||||
unsetCellI,
|
||||
nLocalRegions
|
||||
);
|
||||
|
||||
// Current unsetCell has now been handled. Go to next region.
|
||||
nLocalRegions++;
|
||||
unsetCellI++;
|
||||
}
|
||||
while (true);
|
||||
|
||||
|
||||
if (debug)
|
||||
{
|
||||
forAll(cellRegion, cellI)
|
||||
{
|
||||
if (cellRegion[cellI] < 0)
|
||||
if (blockedFace.size() && !blockedFace[faceI])
|
||||
{
|
||||
FatalErrorIn("regionSplit::calcLocalRegionSplit(..)")
|
||||
<< "cell:" << cellI << " region:" << cellRegion[cellI]
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
forAll(faceRegion, faceI)
|
||||
{
|
||||
if (faceRegion[faceI] == -1)
|
||||
{
|
||||
FatalErrorIn("regionSplit::calcLocalRegionSplit(..)")
|
||||
<< "face:" << faceI << " region:" << faceRegion[faceI]
|
||||
<< abort(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Problem: unblocked face " << faceI
|
||||
<< " at " << mesh().faceCentres()[faceI]
|
||||
<< " on unassigned cell " << cellI
|
||||
<< mesh().cellCentres()[faceI]
|
||||
<< exit(FatalError);
|
||||
}
|
||||
cellRegion[cellI] = globalFaces.toGlobal(faceI);
|
||||
}
|
||||
}
|
||||
|
||||
return nLocalRegions;
|
||||
}
|
||||
|
||||
|
||||
@ -388,176 +143,142 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
|
||||
{
|
||||
// See header in regionSplit.H
|
||||
|
||||
// 1. Do local analysis
|
||||
label nLocalRegions = calcLocalRegionSplit
|
||||
|
||||
if (!doGlobalRegions)
|
||||
{
|
||||
// Block all parallel faces to avoid comms across
|
||||
boolList coupledOrBlockedFace(blockedFace);
|
||||
const polyBoundaryMesh& pbm = mesh().boundaryMesh();
|
||||
|
||||
if (coupledOrBlockedFace.size())
|
||||
{
|
||||
forAll(pbm, patchI)
|
||||
{
|
||||
const polyPatch& pp = pbm[patchI];
|
||||
if (isA<processorPolyPatch>(pp))
|
||||
{
|
||||
label faceI = pp.start();
|
||||
forAll(pp, i)
|
||||
{
|
||||
coupledOrBlockedFace[faceI++] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create dummy (local only) globalIndex
|
||||
labelList offsets(Pstream::nProcs()+1, 0);
|
||||
for (label i = Pstream::myProcNo()+1; i < offsets.size(); i++)
|
||||
{
|
||||
offsets[i] = mesh().nFaces();
|
||||
}
|
||||
const globalIndex globalRegions(offsets.xfer());
|
||||
|
||||
// Minimise regions across connected cells
|
||||
// Note: still uses global decisions so all processors are running
|
||||
// in lock-step, i.e. slowest determines overall time.
|
||||
// To avoid this we could switch off Pstream::parRun.
|
||||
calcNonCompactRegionSplit
|
||||
(
|
||||
globalRegions,
|
||||
coupledOrBlockedFace,
|
||||
explicitConnections,
|
||||
cellRegion
|
||||
);
|
||||
|
||||
// Compact
|
||||
Map<label> globalToCompact(mesh().nCells()/8);
|
||||
forAll(cellRegion, cellI)
|
||||
{
|
||||
label region = cellRegion[cellI];
|
||||
|
||||
label globalRegion;
|
||||
|
||||
Map<label>::const_iterator fnd = globalToCompact.find(region);
|
||||
if (fnd == globalToCompact.end())
|
||||
{
|
||||
globalRegion = globalRegions.toGlobal(globalToCompact.size());
|
||||
globalToCompact.insert(region, globalRegion);
|
||||
}
|
||||
else
|
||||
{
|
||||
globalRegion = fnd();
|
||||
}
|
||||
cellRegion[cellI] = globalRegion;
|
||||
}
|
||||
|
||||
|
||||
// Return globalIndex with size = localSize and all regions local
|
||||
labelList compactOffsets(Pstream::nProcs()+1, 0);
|
||||
for (label i = Pstream::myProcNo()+1; i < compactOffsets.size(); i++)
|
||||
{
|
||||
compactOffsets[i] = globalToCompact.size();
|
||||
}
|
||||
|
||||
return autoPtr<globalIndex>(new globalIndex(compactOffsets.xfer()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Initial global region numbers
|
||||
const globalIndex globalRegions(mesh().nFaces());
|
||||
|
||||
// Minimise regions across connected cells (including parallel)
|
||||
calcNonCompactRegionSplit
|
||||
(
|
||||
globalRegions,
|
||||
blockedFace,
|
||||
explicitConnections,
|
||||
cellRegion
|
||||
);
|
||||
|
||||
if (!doGlobalRegions)
|
||||
|
||||
// Now our cellRegion will have
|
||||
// - non-local regions (i.e. originating from other processors)
|
||||
// - non-compact locally originating regions
|
||||
// so we'll need to compact
|
||||
|
||||
// 4a: count per originating processor the number of regions
|
||||
labelList nOriginating(Pstream::nProcs(), 0);
|
||||
{
|
||||
return autoPtr<globalIndex>(new globalIndex(nLocalRegions));
|
||||
}
|
||||
labelHashSet haveRegion(mesh().nCells()/8);
|
||||
|
||||
|
||||
// 2. Assign global regions
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Offset local regions to create unique global regions.
|
||||
|
||||
globalIndex globalRegions(nLocalRegions);
|
||||
|
||||
|
||||
// Convert regions to global ones
|
||||
forAll(cellRegion, cellI)
|
||||
{
|
||||
cellRegion[cellI] = globalRegions.toGlobal(cellRegion[cellI]);
|
||||
}
|
||||
|
||||
|
||||
// 3. Merge global regions
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Regions across non-blocked proc patches get merged.
|
||||
// This will set merged global regions to be the min of both.
|
||||
// (this will create gaps in the global region list so they will get
|
||||
// merged later on)
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Pout<< nl << "-- Starting Iteration --" << endl;
|
||||
}
|
||||
|
||||
|
||||
const polyBoundaryMesh& patches = mesh().boundaryMesh();
|
||||
|
||||
labelList nbrRegion(mesh().nFaces()-mesh().nInternalFaces(), -1);
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
|
||||
if (pp.coupled())
|
||||
{
|
||||
const labelList& patchCells = pp.faceCells();
|
||||
SubList<label> patchNbrRegion
|
||||
(
|
||||
nbrRegion,
|
||||
pp.size(),
|
||||
pp.start()-mesh().nInternalFaces()
|
||||
);
|
||||
|
||||
forAll(patchCells, i)
|
||||
{
|
||||
label faceI = pp.start()+i;
|
||||
if (!blockedFace.size() || !blockedFace[faceI])
|
||||
{
|
||||
patchNbrRegion[i] = cellRegion[patchCells[i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
syncTools::swapBoundaryFaceList(mesh(), nbrRegion);
|
||||
|
||||
Map<label> globalToMerged(mesh().nFaces()-mesh().nInternalFaces());
|
||||
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
|
||||
if (pp.coupled())
|
||||
{
|
||||
const labelList& patchCells = pp.faceCells();
|
||||
SubList<label> patchNbrRegion
|
||||
(
|
||||
nbrRegion,
|
||||
pp.size(),
|
||||
pp.start()-mesh().nInternalFaces()
|
||||
);
|
||||
|
||||
forAll(patchCells, i)
|
||||
{
|
||||
label faceI = pp.start()+i;
|
||||
|
||||
if (!blockedFace.size() || !blockedFace[faceI])
|
||||
{
|
||||
if (patchNbrRegion[i] < cellRegion[patchCells[i]])
|
||||
{
|
||||
//Pout<< "on patch:" << pp.name()
|
||||
// << " cell:" << patchCells[i]
|
||||
// << " at:"
|
||||
// << mesh().cellCentres()[patchCells[i]]
|
||||
// << " was:" << cellRegion[patchCells[i]]
|
||||
// << " nbr:" << patchNbrRegion[i]
|
||||
// << endl;
|
||||
|
||||
globalToMerged.insert
|
||||
(
|
||||
cellRegion[patchCells[i]],
|
||||
patchNbrRegion[i]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
label nMerged = returnReduce(globalToMerged.size(), sumOp<label>());
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "nMerged:" << nMerged << endl;
|
||||
}
|
||||
|
||||
if (nMerged == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// Renumber the regions according to the globalToMerged
|
||||
forAll(cellRegion, cellI)
|
||||
{
|
||||
label regionI = cellRegion[cellI];
|
||||
Map<label>::const_iterator iter = globalToMerged.find(regionI);
|
||||
if (iter != globalToMerged.end())
|
||||
label region = cellRegion[cellI];
|
||||
|
||||
// Count originating processor. Use isLocal as efficiency since
|
||||
// most cells are locally originating.
|
||||
if (globalRegions.isLocal(region))
|
||||
{
|
||||
cellRegion[cellI] = iter();
|
||||
if (haveRegion.insert(region))
|
||||
{
|
||||
nOriginating[Pstream::myProcNo()]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Now our cellRegion will have non-local elements in it. So compact
|
||||
// it.
|
||||
|
||||
// 4a: count. Use a labelHashSet to count regions only once.
|
||||
label nCompact = 0;
|
||||
{
|
||||
labelHashSet localRegion(mesh().nFaces()-mesh().nInternalFaces());
|
||||
forAll(cellRegion, cellI)
|
||||
{
|
||||
if
|
||||
(
|
||||
globalRegions.isLocal(cellRegion[cellI])
|
||||
&& localRegion.insert(cellRegion[cellI])
|
||||
)
|
||||
else
|
||||
{
|
||||
nCompact++;
|
||||
label procI = globalRegions.whichProcID(region);
|
||||
if (haveRegion.insert(region))
|
||||
{
|
||||
nOriginating[procI]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "Compacted from " << nLocalRegions
|
||||
<< " down to " << nCompact << " local regions." << endl;
|
||||
Pout<< "Counted " << nOriginating[Pstream::myProcNo()]
|
||||
<< " local regions." << endl;
|
||||
}
|
||||
|
||||
|
||||
// Global numbering for compacted local regions
|
||||
autoPtr<globalIndex> globalCompactPtr(new globalIndex(nCompact));
|
||||
autoPtr<globalIndex> globalCompactPtr
|
||||
(
|
||||
new globalIndex(nOriginating[Pstream::myProcNo()])
|
||||
);
|
||||
const globalIndex& globalCompact = globalCompactPtr();
|
||||
|
||||
|
||||
@ -568,12 +289,15 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
|
||||
// labelList.
|
||||
|
||||
// Local compaction map
|
||||
Map<label> globalToCompact(2*nCompact);
|
||||
Map<label> globalToCompact(2*nOriginating[Pstream::myProcNo()]);
|
||||
// Remote regions we want the compact number for
|
||||
List<labelHashSet> nonLocal(Pstream::nProcs());
|
||||
forAll(nonLocal, procI)
|
||||
{
|
||||
nonLocal[procI].resize((nLocalRegions-nCompact)/Pstream::nProcs());
|
||||
if (procI != Pstream::myProcNo())
|
||||
{
|
||||
nonLocal[procI].resize(2*nOriginating[procI]);
|
||||
}
|
||||
}
|
||||
|
||||
forAll(cellRegion, cellI)
|
||||
@ -581,15 +305,12 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
|
||||
label region = cellRegion[cellI];
|
||||
if (globalRegions.isLocal(region))
|
||||
{
|
||||
Map<label>::const_iterator iter = globalToCompact.find(region);
|
||||
if (iter == globalToCompact.end())
|
||||
{
|
||||
label compactRegion = globalCompact.toGlobal
|
||||
(
|
||||
globalToCompact.size()
|
||||
);
|
||||
globalToCompact.insert(region, compactRegion);
|
||||
}
|
||||
// Insert new compact region (if not yet present)
|
||||
globalToCompact.insert
|
||||
(
|
||||
region,
|
||||
globalCompact.toGlobal(globalToCompact.size())
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -603,22 +324,17 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
|
||||
// Convert the nonLocal (labelHashSets) to labelLists.
|
||||
|
||||
labelListList sendNonLocal(Pstream::nProcs());
|
||||
labelList nNonLocal(Pstream::nProcs(), 0);
|
||||
forAll(sendNonLocal, procI)
|
||||
{
|
||||
sendNonLocal[procI].setSize(nonLocal[procI].size());
|
||||
forAllConstIter(labelHashSet, nonLocal[procI], iter)
|
||||
{
|
||||
sendNonLocal[procI][nNonLocal[procI]++] = iter.key();
|
||||
}
|
||||
sendNonLocal[procI] = nonLocal[procI].toc();
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
forAll(nNonLocal, procI)
|
||||
forAll(sendNonLocal, procI)
|
||||
{
|
||||
Pout<< " from processor " << procI
|
||||
<< " want " << nNonLocal[procI]
|
||||
<< " want " << sendNonLocal[procI].size()
|
||||
<< " region numbers."
|
||||
<< endl;
|
||||
}
|
||||
@ -627,7 +343,7 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
|
||||
|
||||
|
||||
// Get the wanted region labels into recvNonLocal
|
||||
labelListList recvNonLocal;
|
||||
labelListList recvNonLocal(Pstream::nProcs());
|
||||
labelListList sizes;
|
||||
Pstream::exchange<labelList, label>
|
||||
(
|
||||
@ -655,6 +371,7 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
|
||||
|
||||
// Send back (into recvNonLocal)
|
||||
recvNonLocal.clear();
|
||||
recvNonLocal.setSize(sendWantedLocal.size());
|
||||
sizes.clear();
|
||||
Pstream::exchange<labelList, label>
|
||||
(
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -89,6 +89,9 @@ Description
|
||||
|
||||
Can optionally keep all regions local to the processor.
|
||||
|
||||
Note: does not walk across cyclicAMI/cyclicACMI - since not 'coupled()'
|
||||
at the patch level.
|
||||
|
||||
|
||||
SourceFiles
|
||||
regionSplit.C
|
||||
@ -126,30 +129,10 @@ class regionSplit
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Transfer faceRegion data from one face to the other (or vice versa)
|
||||
void transferCoupledFaceRegion
|
||||
(
|
||||
const label faceI,
|
||||
const label otherFaceI,
|
||||
|
||||
labelList& faceRegion,
|
||||
DynamicList<label>& newChangedFaces
|
||||
) const;
|
||||
|
||||
//- Given a seed cell label, fill cellRegion/faceRegion with markValue
|
||||
// for contiguous region around it
|
||||
void fillSeedMask
|
||||
(
|
||||
const List<labelPair>& explicitConnections,
|
||||
labelList& cellRegion,
|
||||
labelList& faceRegion,
|
||||
const label seedCellID,
|
||||
const label markValue
|
||||
) const;
|
||||
|
||||
//- Calculate local region split. Return number of regions.
|
||||
label calcLocalRegionSplit
|
||||
//- Calculate region split in non-compact (global) numbering.
|
||||
void calcNonCompactRegionSplit
|
||||
(
|
||||
const globalIndex& globalFaces,
|
||||
const boolList& blockedFace,
|
||||
const List<labelPair>& explicitConnections,
|
||||
labelList& cellRegion
|
||||
|
||||
@ -58,7 +58,7 @@ void Foam::searchableBox::projectOntoCoordPlane
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn("searchableBox::projectOntoCoordPlane(..)")
|
||||
FatalErrorInFunction
|
||||
<< "Point on plane " << planePt
|
||||
<< " is not on coordinate " << min()[dir]
|
||||
<< " nor " << max()[dir] << abort(FatalError);
|
||||
@ -172,14 +172,8 @@ Foam::searchableBox::searchableBox
|
||||
{
|
||||
if (!contains(midpoint()))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::searchableBox::searchableBox\n"
|
||||
"(\n"
|
||||
" const IOobject& io,\n"
|
||||
" const treeBoundBox& bb\n"
|
||||
")\n"
|
||||
) << "Illegal bounding box specification : "
|
||||
FatalErrorInFunction
|
||||
<< "Illegal bounding box specification : "
|
||||
<< static_cast<const treeBoundBox>(*this) << exit(FatalError);
|
||||
}
|
||||
|
||||
@ -198,14 +192,8 @@ Foam::searchableBox::searchableBox
|
||||
{
|
||||
if (!contains(midpoint()))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::searchableBox::searchableBox\n"
|
||||
"(\n"
|
||||
" const IOobject& io,\n"
|
||||
" const treeBoundBox& bb\n"
|
||||
")\n"
|
||||
) << "Illegal bounding box specification : "
|
||||
FatalErrorInFunction
|
||||
<< "Illegal bounding box specification : "
|
||||
<< static_cast<const treeBoundBox>(*this) << exit(FatalError);
|
||||
}
|
||||
|
||||
@ -377,11 +365,7 @@ Foam::pointIndexHit Foam::searchableBox::findNearest
|
||||
point& linePoint
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"searchableBox::findNearest"
|
||||
"(const linePointRef&, treeBoundBox&, point&)"
|
||||
);
|
||||
NotImplemented;
|
||||
return pointIndexHit();
|
||||
}
|
||||
|
||||
@ -437,7 +421,7 @@ Foam::pointIndexHit Foam::searchableBox::findLine
|
||||
|
||||
if (info.index() == -1)
|
||||
{
|
||||
FatalErrorIn("searchableBox::findLine(const point&, const point&)")
|
||||
FatalErrorInFunction
|
||||
<< "point " << info.rawPoint()
|
||||
<< " on segment " << start << end
|
||||
<< " should be on face of " << *this
|
||||
|
||||
@ -261,7 +261,7 @@ public:
|
||||
|
||||
bool writeData(Ostream&) const
|
||||
{
|
||||
notImplemented("searchableBox::writeData(Ostream&) const");
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@ -1075,21 +1075,6 @@ void Foam::searchableCone::getVolumeType
|
||||
volType.setSize(points.size());
|
||||
volType = volumeType::INSIDE;
|
||||
|
||||
scalar magDir = magDir_;
|
||||
|
||||
bool swap = false;
|
||||
bool swapInner = false;
|
||||
|
||||
if (radius1_ > radius2_)
|
||||
{
|
||||
swap = true;
|
||||
}
|
||||
|
||||
if (innerRadius1_ > innerRadius2_)
|
||||
{
|
||||
swapInner = true;
|
||||
}
|
||||
|
||||
forAll(points, pointI)
|
||||
{
|
||||
const point& pt = points[pointI];
|
||||
@ -1100,15 +1085,7 @@ void Foam::searchableCone::getVolumeType
|
||||
scalar parallel = v & unitDir_;
|
||||
scalar comp = parallel;
|
||||
scalar compInner = parallel;
|
||||
if (swap)
|
||||
{
|
||||
comp = -(magDir-parallel);
|
||||
}
|
||||
|
||||
if (swapInner)
|
||||
{
|
||||
compInner = -(magDir-parallel);
|
||||
}
|
||||
|
||||
scalar radius_sec = radius1_+comp*(radius2_-radius1_)/magDir_;
|
||||
|
||||
|
||||
@ -209,11 +209,7 @@ public:
|
||||
//- Does any part of the surface overlap the supplied bound box?
|
||||
virtual bool overlaps(const boundBox& bb) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"searchableCone::overlaps(const boundBox&) const"
|
||||
);
|
||||
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -279,7 +275,7 @@ public:
|
||||
|
||||
virtual bool writeData(Ostream&) const
|
||||
{
|
||||
notImplemented("searchableCone::writeData(Ostream&) const");
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@ -169,10 +169,7 @@ public:
|
||||
//- Does any part of the surface overlap the supplied bound box?
|
||||
virtual bool overlaps(const boundBox& bb) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"searchableCylinder::overlaps(const boundBox&) const"
|
||||
);
|
||||
NotImplemented;
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -236,7 +233,7 @@ public:
|
||||
|
||||
bool writeData(Ostream&) const
|
||||
{
|
||||
notImplemented("searchableCylinder::writeData(Ostream&) const");
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -317,11 +317,8 @@ void Foam::searchableDisk::getVolumeType
|
||||
List<volumeType>& volType
|
||||
) const
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"searchableDisk::getVolumeType(const pointField&"
|
||||
", List<volumeType>&) const"
|
||||
) << "Volume type not supported for disk."
|
||||
FatalErrorInFunction
|
||||
<< "Volume type not supported for disk."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -164,10 +164,7 @@ public:
|
||||
//- Does any part of the surface overlap the supplied bound box?
|
||||
virtual bool overlaps(const boundBox& bb) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"searchableDisk::overlaps(const boundBox&) const"
|
||||
);
|
||||
NotImplemented;
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -231,7 +228,7 @@ public:
|
||||
|
||||
bool writeData(Ostream&) const
|
||||
{
|
||||
notImplemented("searchableDisk::writeData(Ostream&) const");
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -256,11 +256,8 @@ void Foam::searchablePlane::getVolumeType
|
||||
List<volumeType>& volType
|
||||
) const
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"searchableCollection::getVolumeType(const pointField&"
|
||||
", List<volumeType>&) const"
|
||||
) << "Volume type not supported for plane."
|
||||
FatalErrorInFunction
|
||||
<< "Volume type not supported for plane."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -148,10 +148,7 @@ public:
|
||||
//- Does any part of the surface overlap the supplied bound box?
|
||||
virtual bool overlaps(const boundBox& bb) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"searchablePlane::overlaps(const boundBox&) const"
|
||||
);
|
||||
NotImplemented;
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -215,7 +212,7 @@ public:
|
||||
|
||||
bool writeData(Ostream&) const
|
||||
{
|
||||
notImplemented("searchablePlane::writeData(Ostream&) const");
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -48,7 +48,7 @@ Foam::direction Foam::searchablePlate::calcNormal(const point& span)
|
||||
{
|
||||
if (span[dir] < 0)
|
||||
{
|
||||
FatalErrorIn("searchablePlate::calcNormal()")
|
||||
FatalErrorInFunction
|
||||
<< "Span should have two positive and one zero entry. Now:"
|
||||
<< span << exit(FatalError);
|
||||
}
|
||||
@ -69,7 +69,7 @@ Foam::direction Foam::searchablePlate::calcNormal(const point& span)
|
||||
|
||||
if (normalDir == 3)
|
||||
{
|
||||
FatalErrorIn("searchablePlate::calcNormal()")
|
||||
FatalErrorInFunction
|
||||
<< "Span should have two positive and one zero entry. Now:"
|
||||
<< span << exit(FatalError);
|
||||
}
|
||||
@ -190,7 +190,7 @@ Foam::pointIndexHit Foam::searchablePlate::findLine
|
||||
|
||||
if (!bb.contains(info.hitPoint()))
|
||||
{
|
||||
FatalErrorIn("searchablePlate::findLine(..)")
|
||||
FatalErrorInFunction
|
||||
<< "bb:" << bb << endl
|
||||
<< "origin_:" << origin_ << endl
|
||||
<< "span_:" << span_ << endl
|
||||
@ -440,11 +440,8 @@ void Foam::searchablePlate::getVolumeType
|
||||
List<volumeType>& volType
|
||||
) const
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"searchableCollection::getVolumeType(const pointField&"
|
||||
", List<volumeType>&) const"
|
||||
) << "Volume type not supported for plate."
|
||||
FatalErrorInFunction
|
||||
<< "Volume type not supported for plate."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -223,7 +223,7 @@ public:
|
||||
|
||||
bool writeData(Ostream&) const
|
||||
{
|
||||
notImplemented("searchablePlate::writeData(Ostream&) const");
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@ -207,11 +207,7 @@ Foam::pointIndexHit Foam::searchableRotatedBox::findNearest
|
||||
point& linePoint
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"searchableRotatedBox::findNearest"
|
||||
"(const linePointRef&, treeBoundBox&, point&)"
|
||||
);
|
||||
NotImplemented;
|
||||
return pointIndexHit();
|
||||
}
|
||||
|
||||
|
||||
@ -245,10 +245,7 @@ public:
|
||||
|
||||
bool writeData(Ostream&) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"searchableRotatedBox::writeData(Ostream&) const"
|
||||
);
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@ -218,7 +218,7 @@ public:
|
||||
|
||||
bool writeData(Ostream&) const
|
||||
{
|
||||
notImplemented("searchableSphere::writeData(Ostream&) const");
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -48,11 +48,8 @@ Foam::autoPtr<Foam::searchableSurface> Foam::searchableSurface::New
|
||||
|
||||
if (cstrIter == dictConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"searchableSurface::New(const word&,"
|
||||
" const IOobject&, const dictionary&)"
|
||||
) << "Unknown searchableSurface type " << searchableSurfaceType
|
||||
FatalErrorInFunction
|
||||
<< "Unknown searchableSurface type " << searchableSurfaceType
|
||||
<< endl << endl
|
||||
<< "Valid searchableSurface types : " << endl
|
||||
<< dictConstructorTablePtr_->sortedToc()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -137,7 +137,7 @@ public:
|
||||
//- Clone
|
||||
virtual autoPtr<searchableSurface> clone() const
|
||||
{
|
||||
notImplemented("autoPtr<searchableSurface> clone() const");
|
||||
NotImplemented;
|
||||
return autoPtr<searchableSurface>(NULL);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -218,11 +218,8 @@ Foam::searchableSurfaceCollection::searchableSurfaceCollection
|
||||
// if all indices offset by globalSize() of the local region...
|
||||
if (s.size() != s.globalSize())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"searchableSurfaceCollection::searchableSurfaceCollection"
|
||||
"(const IOobject&, const dictionary&)"
|
||||
) << "Cannot use a distributed surface in a collection."
|
||||
FatalErrorInFunction
|
||||
<< "Cannot use a distributed surface in a collection."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -532,10 +529,8 @@ void Foam::searchableSurfaceCollection::findLine
|
||||
|
||||
if (s < 0 || s > 1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"searchableSurfaceCollection::findLine(..)"
|
||||
) << "point:" << info[pointI]
|
||||
FatalErrorInFunction
|
||||
<< "point:" << info[pointI]
|
||||
<< " s:" << s
|
||||
<< " outside vector "
|
||||
<< " start:" << start[pointI]
|
||||
@ -702,11 +697,8 @@ void Foam::searchableSurfaceCollection::getVolumeType
|
||||
List<volumeType>& volType
|
||||
) const
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"searchableSurfaceCollection::getVolumeType(const pointField&"
|
||||
", List<volumeType>&) const"
|
||||
) << "Volume type not supported for collection."
|
||||
FatalErrorInFunction
|
||||
<< "Volume type not supported for collection."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -721,7 +713,7 @@ void Foam::searchableSurfaceCollection::distribute
|
||||
{
|
||||
forAll(subGeom_, surfI)
|
||||
{
|
||||
// Note:Tranform the bounding boxes? Something like
|
||||
// Note:Transform the bounding boxes? Something like
|
||||
// pointField bbPoints =
|
||||
// cmptDivide
|
||||
// (
|
||||
|
||||
@ -191,10 +191,7 @@ public:
|
||||
//- Does any part of the surface overlap the supplied bound box?
|
||||
virtual bool overlaps(const boundBox& bb) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"searchableSurfaceCollection::overlaps(const boundBox&) const"
|
||||
);
|
||||
NotImplemented;
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -279,10 +276,7 @@ public:
|
||||
|
||||
bool writeData(Ostream&) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"searchableSurfaceCollection::writeData(Ostream&) const"
|
||||
);
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -134,11 +134,8 @@ Foam::searchableSurfaces::searchableSurfaces(const label size)
|
||||
//
|
||||
// if (index == -1)
|
||||
// {
|
||||
// FatalErrorIn
|
||||
// (
|
||||
// "searchableSurfaces::searchableSurfaces"
|
||||
// "( const IOobject&, const dictionary&)"
|
||||
// ) << "Unknown region name " << key
|
||||
// FatalErrorInFunction
|
||||
// << "Unknown region name " << key
|
||||
// << " for surface " << s.name() << endl
|
||||
// << "Valid region names are " << localNames
|
||||
// << exit(FatalError);
|
||||
@ -189,11 +186,8 @@ Foam::searchableSurfaces::searchableSurfaces
|
||||
|
||||
if (!topDict.isDict(key))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"searchableSurfaces::searchableSurfaces"
|
||||
"( const IOobject&, const dictionary&)"
|
||||
) << "Found non-dictionary entry " << iter()
|
||||
FatalErrorInFunction
|
||||
<< "Found non-dictionary entry " << iter()
|
||||
<< " in top-level dictionary " << topDict
|
||||
<< exit(FatalError);
|
||||
}
|
||||
@ -262,11 +256,8 @@ Foam::searchableSurfaces::searchableSurfaces
|
||||
|
||||
if (index == -1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"searchableSurfaces::searchableSurfaces"
|
||||
"( const IOobject&, const dictionary&)"
|
||||
) << "Unknown region name " << key
|
||||
FatalErrorInFunction
|
||||
<< "Unknown region name " << key
|
||||
<< " for surface " << s.name() << endl
|
||||
<< "Valid region names are " << localNames
|
||||
<< exit(FatalError);
|
||||
@ -926,10 +917,8 @@ const Foam::searchableSurface& Foam::searchableSurfaces::operator[]
|
||||
|
||||
if (surfI < 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"searchableSurfaces::operator[](const word&) const"
|
||||
) << "Surface named " << surfName << " not found." << nl
|
||||
FatalErrorInFunction
|
||||
<< "Surface named " << surfName << " not found." << nl
|
||||
<< "Available surface names: " << names_ << endl
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -947,10 +936,8 @@ Foam::searchableSurface& Foam::searchableSurfaces::operator[]
|
||||
|
||||
if (surfI < 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"searchableSurfaces::operator[](const word&)"
|
||||
) << "Surface named " << surfName << " not found." << nl
|
||||
FatalErrorInFunction
|
||||
<< "Surface named " << surfName << " not found." << nl
|
||||
<< "Available surface names: " << names_ << endl
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -812,7 +812,7 @@ void Foam::searchableSurfacesQueries::signedDistance
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorIn("signedDistance()")
|
||||
FatalErrorInFunction
|
||||
<< "getVolumeType failure,"
|
||||
<< " neither INSIDE or OUTSIDE."
|
||||
<< " point:" << surfPoints[i]
|
||||
@ -881,11 +881,8 @@ Foam::pointIndexHit Foam::searchableSurfacesQueries::facesIntersection
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"searchableSurfacesQueries::facesIntersection"
|
||||
"(const labelList&, const scalar, const scalar, const point&)"
|
||||
) << "Did not find point within distance "
|
||||
FatalErrorInFunction
|
||||
<< "Did not find point within distance "
|
||||
<< initDistSqr << " of starting point " << start
|
||||
<< " on surface "
|
||||
<< allSurfaces[surfacesToTest[i]].IOobject::name()
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -98,15 +98,8 @@ Foam::triSurface Foam::subTriSurfaceMesh::subset
|
||||
|
||||
if (regionMap.size() == 0)
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"subTriSurfaceMesh::subset"
|
||||
"(\n"
|
||||
" const IOobject&,\n"
|
||||
" const dictionary&\n"
|
||||
")",
|
||||
dict
|
||||
) << "Found no regions in triSurface matching " << regionNames
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Found no regions in triSurface matching " << regionNames
|
||||
<< ". Valid regions are " << patchNames(s)
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
@ -91,11 +91,8 @@ word triSurfaceMesh::meshSubDir = "triSurface";
|
||||
// return runTime.constant();
|
||||
// }
|
||||
//
|
||||
// FatalErrorIn
|
||||
// (
|
||||
// "searchableSurfaces::findRawInstance"
|
||||
// "(const Time&, const fileName&, const word&)"
|
||||
// ) << "Cannot find file \"" << name << "\" in directory "
|
||||
// FatalErrorInFunction
|
||||
// << "Cannot find file \"" << name << "\" in directory "
|
||||
// << runTime.constant()/dir
|
||||
// << exit(FatalError);
|
||||
//
|
||||
@ -112,10 +109,8 @@ const Foam::fileName& Foam::triSurfaceMesh::checkFile
|
||||
{
|
||||
if (fName.empty())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"triSurfaceMesh::checkFile(const fileName&, const fileName&)"
|
||||
) << "Cannot find triSurfaceMesh starting from "
|
||||
FatalErrorInFunction
|
||||
<< "Cannot find triSurfaceMesh starting from "
|
||||
<< objectName << exit(FatalError);
|
||||
}
|
||||
return fName;
|
||||
@ -248,7 +243,7 @@ Foam::triSurfaceMesh::triSurfaceMesh(const IOobject& io, const triSurface& s)
|
||||
{
|
||||
const pointField& pts = triSurface::points();
|
||||
|
||||
bounds() = boundBox(pts);
|
||||
bounds() = boundBox(pts, false);
|
||||
}
|
||||
|
||||
|
||||
@ -300,7 +295,7 @@ Foam::triSurfaceMesh::triSurfaceMesh(const IOobject& io)
|
||||
{
|
||||
const pointField& pts = triSurface::points();
|
||||
|
||||
bounds() = boundBox(pts);
|
||||
bounds() = boundBox(pts, false);
|
||||
}
|
||||
|
||||
|
||||
@ -366,7 +361,7 @@ Foam::triSurfaceMesh::triSurfaceMesh
|
||||
|
||||
const pointField& pts = triSurface::points();
|
||||
|
||||
bounds() = boundBox(pts);
|
||||
bounds() = boundBox(pts, false);
|
||||
|
||||
// Have optional minimum quality for normal calculation
|
||||
if (dict.readIfPresent("minQuality", minQuality_) && minQuality_ > 0)
|
||||
@ -474,7 +469,7 @@ void Foam::triSurfaceMesh::movePoints(const pointField& newPoints)
|
||||
edgeTree_.clear();
|
||||
triSurface::movePoints(newPoints);
|
||||
|
||||
bounds() = boundBox(triSurface::points());
|
||||
bounds() = boundBox(triSurface::points(), false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -282,7 +282,7 @@ public:
|
||||
|
||||
bool writeData(Ostream&) const
|
||||
{
|
||||
notImplemented("triSurfaceMesh::writeData(Ostream&) const");
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -100,7 +100,7 @@ void Foam::faceZoneToCell::combine(topoSet& set, const bool add) const
|
||||
|
||||
if (!hasMatched)
|
||||
{
|
||||
WarningIn("faceZoneToCell::combine(topoSet&, const bool)")
|
||||
WarningInFunction
|
||||
<< "Cannot find any faceZone named " << zoneName_ << endl
|
||||
<< "Valid names are " << mesh_.faceZones().names() << endl;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -198,11 +198,8 @@ void Foam::fieldToCell::applyToSet
|
||||
// on volMesh so just use another type with processor-local scope
|
||||
if (!fieldObject.typeHeaderOk<labelIOList>(false))
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"fieldToCell::applyToSet(const topoSetSource::setAction"
|
||||
", topoSet& set)"
|
||||
) << "Cannot read field " << fieldName_
|
||||
WarningInFunction
|
||||
<< "Cannot read field " << fieldName_
|
||||
<< " from time " << mesh().time().timeName() << endl;
|
||||
}
|
||||
else if (fieldObject.headerClassName() == "volScalarField")
|
||||
@ -229,11 +226,8 @@ void Foam::fieldToCell::applyToSet
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"fieldToCell::applyToSet(const topoSetSource::setAction"
|
||||
", topoSet& set)"
|
||||
) << "Cannot handle fields of type " << fieldObject.headerClassName()
|
||||
WarningInFunction
|
||||
<< "Cannot handle fields of type " << fieldObject.headerClassName()
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -131,11 +131,8 @@ Foam::boolList Foam::regionToCell::findRegions
|
||||
|
||||
if (keepProcI == -1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"outsideCellSelection::findRegions"
|
||||
"(const bool, const regionSplit&)"
|
||||
) << "Did not find " << insidePoints_[i]
|
||||
FatalErrorInFunction
|
||||
<< "Did not find " << insidePoints_[i]
|
||||
<< " in mesh." << " Mesh bounds are " << mesh_.bounds()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -105,10 +105,8 @@ Foam::shapeToCell::shapeToCell
|
||||
{
|
||||
if (!cellModeller::lookup(type_) && (type_ != "splitHex"))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"shapeToCell::shapeToCell(const polyMesh&, const word&)"
|
||||
) << "Illegal cell type " << type_ << exit(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Illegal cell type " << type_ << exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
@ -125,10 +123,8 @@ Foam::shapeToCell::shapeToCell
|
||||
{
|
||||
if (!cellModeller::lookup(type_) && (type_ != "splitHex"))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"shapeToCell::shapeToCell(const polyMesh&, const dictionary&)"
|
||||
) << "Illegal cell type " << type_ << exit(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Illegal cell type " << type_ << exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
@ -145,10 +141,8 @@ Foam::shapeToCell::shapeToCell
|
||||
{
|
||||
if (!cellModeller::lookup(type_) && (type_ != "splitHex"))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"shapeToCell::shapeToCell(const polyMesh&, Istream&)"
|
||||
) << "Illegal cell type " << type_ << exit(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Illegal cell type " << type_ << exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -194,7 +194,7 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const
|
||||
label cellI = queryMesh.findCell(outsidePoint, -1, false);
|
||||
if (returnReduce(cellI, maxOp<label>()) == -1)
|
||||
{
|
||||
FatalErrorIn("surfaceToCell::combine(topoSet&, const bool)")
|
||||
FatalErrorInFunction
|
||||
<< "outsidePoint " << outsidePoint
|
||||
<< " is not inside any cell"
|
||||
<< exit(FatalError);
|
||||
@ -332,10 +332,8 @@ void Foam::surfaceToCell::checkSettings() const
|
||||
)
|
||||
)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"surfaceToCell:checkSettings()"
|
||||
) << "Illegal include cell specification."
|
||||
FatalErrorInFunction
|
||||
<< "Illegal include cell specification."
|
||||
<< " Result would be either all or no cells." << endl
|
||||
<< "Please set one of includeCut, includeInside, includeOutside"
|
||||
<< " to true, set nearDistance to a value > 0"
|
||||
@ -345,10 +343,8 @@ void Foam::surfaceToCell::checkSettings() const
|
||||
|
||||
if (useSurfaceOrientation_ && includeCut_)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"surfaceToCell:checkSettings()"
|
||||
) << "Illegal include cell specification."
|
||||
FatalErrorInFunction
|
||||
<< "Illegal include cell specification."
|
||||
<< " You cannot specify both 'useSurfaceOrientation'"
|
||||
<< " and 'includeCut'"
|
||||
<< " since 'includeCut' specifies a topological split"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user