本文整理汇总了C++中polyPatch::type方法的典型用法代码示例。如果您正苦于以下问题:C++ polyPatch::type方法的具体用法?C++ polyPatch::type怎么用?C++ polyPatch::type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类polyPatch
的用法示例。
在下文中一共展示了polyPatch::type方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FatalErrorIn
Foam::autoPtr<Foam::fvPatch> Foam::fvPatch::New
(
const polyPatch& patch,
const fvBoundaryMesh& bm
)
{
if (debug)
{
Info<< "fvPatch::New(const polyPatch&, const fvBoundaryMesh&) : "
<< "constructing fvPatch"
<< endl;
}
polyPatchConstructorTable::iterator cstrIter =
polyPatchConstructorTablePtr_->find(patch.type());
if (cstrIter == polyPatchConstructorTablePtr_->end())
{
FatalErrorIn("fvPatch::New(const polyPatch&, const fvBoundaryMesh&)")
<< "Unknown fvPatch type " << patch.type() << ".\n"
<< "Valid fvPatch types are :"
<< polyPatchConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<fvPatch>(cstrIter()(patch, bm));
}
示例2: exit
autoPtr<faceTetPolyPatchCellDecomp> faceTetPolyPatchCellDecomp::New
(
const polyPatch& patch,
const tetPolyBoundaryMeshCellDecomp& bm
)
{
if (debug)
{
Info<< "faceTetPolyPatchCellDecomp::New(const polyPatch&, "
<< " const tetPolyBoundaryMeshCellDecomp&) : "
<< "constructing faceTetPolyPatchCellDecomp"
<< endl;
}
polyPatchConstructorTable::iterator cstrIter =
polyPatchConstructorTablePtr_->find(patch.type());
if (cstrIter == polyPatchConstructorTablePtr_->end())
{
FatalErrorIn
(
"faceTetPolyPatchCellDecomp::New(const polyPatch&, "
"const tetPolyBoundaryMeshCellDecomp&) : "
) << "Unknown faceTetPolyPatchCellDecomp type "
<< patch.type()
<< ". Valid faceTetPolyPatchCellDecomp types are :" << endl
<< polyPatchConstructorTablePtr_->toc()
<< exit(FatalError);
}
return autoPtr<faceTetPolyPatchCellDecomp>(cstrIter()(patch, bm));
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Core-OpenFOAM-1.5-dev,代码行数:32,代码来源:newFaceTetPolyPatchCellDecomp.C
示例3: exit
Foam::autoPtr<Foam::facePointPatch> Foam::facePointPatch::New
(
const polyPatch& patch,
const pointBoundaryMesh& bm
)
{
if (debug)
{
InfoInFunction << "Constructing facePointPatch" << endl;
}
polyPatchConstructorTable::iterator cstrIter =
polyPatchConstructorTablePtr_->find(patch.type());
if (cstrIter == polyPatchConstructorTablePtr_->end())
{
FatalErrorInFunction
<< "Unknown facePointPatch type "
<< patch.type()
<< nl << nl
<< "Valid facePointPatch types are :" << endl
<< polyPatchConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<facePointPatch>(cstrIter()(patch, bm));
}
示例4: forAll
Foam::label Foam::mergePolyMesh::patchIndex(const polyPatch& p)
{
// Find the patch name on the list. If the patch is already there
// and patch types match, return index
const word& pType = p.type();
const word& pName = p.name();
bool nameFound = false;
forAll (patchNames_, patchI)
{
if (patchNames_[patchI] == pName)
{
if (patchTypes_[patchI] == pType)
{
// Found name and types match
return patchI;
}
else
{
// Found the name, but type is different
nameFound = true;
}
}
}
// Patch not found. Append to the list
patchTypes_.append(pType);
if (nameFound)
{
// Duplicate name is not allowed. Create a composite name from the
// patch name and case name
const word& caseName = p.boundaryMesh().mesh().time().caseName();
patchNames_.append(pName + "_" + caseName);
Info<< "label patchIndex(const polyPatch& p) : "
<< "Patch " << p.index() << " named "
<< pName << " in mesh " << caseName
<< " already exists, but patch types "
<< " do not match.\nCreating a composite name as "
<< patchNames_[patchNames_.size() - 1] << endl;
}
else
{
patchNames_.append(pName);
}
return patchNames_.size() - 1;
}