本文整理汇总了C++中polyBoundaryMesh类的典型用法代码示例。如果您正苦于以下问题:C++ polyBoundaryMesh类的具体用法?C++ polyBoundaryMesh怎么用?C++ polyBoundaryMesh使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了polyBoundaryMesh类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: patchIdentifier
Foam::polyPatch::polyPatch
(
const word& name,
const label size,
const label start,
const label index,
const polyBoundaryMesh& bm,
const word& patchType
)
:
patchIdentifier(name, index),
primitivePatch
(
faceSubList(bm.mesh().faces(), size, start),
bm.mesh().points()
),
start_(start),
boundaryMesh_(bm),
faceCellsPtr_(NULL),
gpuFaceCells(),
mePtr_(NULL)
{
if
(
patchType != word::null
&& constraintType(patchType)
&& findIndex(inGroups(), patchType) == -1
)
{
inGroups().append(patchType);
}
}
开发者ID:Benjamin-git,项目名称:RapidCFD-dev,代码行数:32,代码来源:polyPatch.C
示例2: patchIdentifier
Foam::polyPatch::polyPatch
(
const word& name,
const dictionary& dict,
const label index,
const polyBoundaryMesh& bm,
const word& patchType
)
:
patchIdentifier(name, dict, index),
primitivePatch
(
faceSubList
(
bm.mesh().faces(),
readLabel(dict.lookup("nFaces")),
readLabel(dict.lookup("startFace"))
),
bm.mesh().points()
),
start_(readLabel(dict.lookup("startFace"))),
boundaryMesh_(bm),
faceCellsPtr_(NULL),
mePtr_(NULL)
{
if
(
patchType != word::null
&& constraintType(patchType)
&& findIndex(inGroups(), patchType) == -1
)
{
inGroups().append(patchType);
}
}
开发者ID:Al-th,项目名称:OpenFOAM-2.2.x,代码行数:35,代码来源:polyPatch.C
示例3: polyPatch
Foam::immersedBoundaryPolyPatch::immersedBoundaryPolyPatch
(
const word& name,
const label size,
const label start,
const label index,
const polyBoundaryMesh& bm
)
:
polyPatch(name, size, start, index, bm),
ibMesh_
(
IOobject
(
name + ".ftr",
bm.mesh().time().constant(), // instance
"triSurface", // local
bm.mesh(), // registry
IOobject::MUST_READ,
IOobject::NO_WRITE
)
),
internalFlow_(false),
triSurfSearchPtr_(NULL)
{}
开发者ID:TsukasaHori,项目名称:ImmersedBoundary,代码行数:25,代码来源:immersedBoundaryPolyPatch.C
示例4: findPatchID
label findPatchID(const polyBoundaryMesh& patches, const word& name)
{
const label patchID = patches.findPatchID(name);
if (patchID == -1)
{
FatalErrorInFunction
<< "Cannot find patch " << name
<< " in the source mesh.\n"
<< "Valid patch names are " << patches.names()
<< exit(FatalError);
}
return patchID;
}
开发者ID:iYohey,项目名称:OpenFOAM-dev,代码行数:14,代码来源:extrudeMesh.C
示例5: setSize
void Foam::fvBoundaryMesh::addPatches(const polyBoundaryMesh& basicBdry)
{
setSize(basicBdry.size());
// Set boundary patches
fvPatchList& Patches = *this;
forAll(Patches, patchi)
{
Patches.set(patchi, fvPatch::New(basicBdry[patchi], *this));
}
开发者ID:EricAlex,项目名称:OpenFOAM-dev,代码行数:11,代码来源:fvBoundaryMesh.C
示例6: checkPatch
// Checks whether patch present
void checkPatch(const polyBoundaryMesh& bMesh, const word& name)
{
label patchI = bMesh.findPatchID(name);
if (patchI == -1)
{
FatalErrorIn("checkPatch(const polyBoundaryMesh&, const word&)")
<< "Cannot find patch " << name << endl
<< "It should be present and of non-zero size" << endl
<< "Valid patches are " << bMesh.names()
<< exit(FatalError);
}
if (bMesh[patchI].empty())
{
FatalErrorIn("checkPatch(const polyBoundaryMesh&, const word&)")
<< "Patch " << name << " is present but zero size"
<< exit(FatalError);
}
}
开发者ID:Brzous,项目名称:WindFOAM,代码行数:21,代码来源:stitchMesh.C
示例7: patchIdentifier
Foam::polyPatch::polyPatch
(
const word& name,
const label size,
const label start,
const label index,
const polyBoundaryMesh& bm
)
:
patchIdentifier(name, index),
primitivePatch
(
faceSubList(bm.mesh().faces(), size, start),
bm.mesh().points()
),
start_(start),
boundaryMesh_(bm),
faceCellsPtr_(NULL),
mePtr_(NULL)
{}
开发者ID:Cescfangs,项目名称:OpenFOAM-1.7.x,代码行数:20,代码来源:polyPatch.C
示例8: pointPatchList
Foam::pointBoundaryMesh::pointBoundaryMesh
(
const pointMesh& m,
const polyBoundaryMesh& basicBdry
)
:
pointPatchList(basicBdry.size()),
mesh_(m)
{
// Set boundary patches
pointPatchList& Patches = *this;
forAll(Patches, patchI)
{
Patches.set
(
patchI,
facePointPatch::New(basicBdry[patchI], *this).ptr()
);
}
开发者ID:CFMS,项目名称:foam-extend-foam-extend-3.2,代码行数:20,代码来源:pointBoundaryMesh.C
示例9: triFaces
triSurface triangulate
(
const polyBoundaryMesh& bMesh,
const labelHashSet& includePatches,
const labelListIOList& finalAgglom,
labelList& triSurfaceToAgglom,
const globalIndex& globalNumbering,
const polyBoundaryMesh& coarsePatches
)
{
const polyMesh& mesh = bMesh.mesh();
// Storage for surfaceMesh. Size estimate.
DynamicList<labelledTri> triangles
(
mesh.nFaces() - mesh.nInternalFaces()
);
label newPatchI = 0;
label localTriFaceI = 0;
forAllConstIter(labelHashSet, includePatches, iter)
{
const label patchI = iter.key();
const polyPatch& patch = bMesh[patchI];
const pointField& points = patch.points();
label nTriTotal = 0;
forAll(patch, patchFaceI)
{
const face& f = patch[patchFaceI];
faceList triFaces(f.nTriangles(points));
label nTri = 0;
f.triangles(points, nTri, triFaces);
forAll(triFaces, triFaceI)
{
const face& f = triFaces[triFaceI];
triangles.append(labelledTri(f[0], f[1], f[2], newPatchI));
nTriTotal++;
triSurfaceToAgglom[localTriFaceI++] = globalNumbering.toGlobal
(
Pstream::myProcNo(),
finalAgglom[patchI][patchFaceI]
+ coarsePatches[patchI].start()
);
}
}
newPatchI++;
}
triSurfaceToAgglom.resize(localTriFaceI-1);
triangles.shrink();
// Create globally numbered tri surface
triSurface rawSurface(triangles, mesh.points());
// Create locally numbered tri surface
triSurface surface
(
rawSurface.localFaces(),
rawSurface.localPoints()
);
// Add patch names to surface
surface.patches().setSize(newPatchI);
newPatchI = 0;
forAllConstIter(labelHashSet, includePatches, iter)
{
const label patchI = iter.key();
const polyPatch& patch = bMesh[patchI];
surface.patches()[newPatchI].index() = patchI;
surface.patches()[newPatchI].name() = patch.name();
surface.patches()[newPatchI].geometricType() = patch.type();
newPatchI++;
}
return surface;
}
开发者ID:lento234,项目名称:OF-2.3.x,代码行数:92,代码来源:solarRayTracingGenCyclic.C
注:本文中的polyBoundaryMesh类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论