本文整理汇总了C++中polyMesh::nPoints方法的典型用法代码示例。如果您正苦于以下问题:C++ polyMesh::nPoints方法的具体用法?C++ polyMesh::nPoints怎么用?C++ polyMesh::nPoints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类polyMesh
的用法示例。
在下文中一共展示了polyMesh::nPoints方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: motionSolver
Foam::points0MotionSolver::points0MotionSolver
(
const polyMesh& mesh,
const IOdictionary& dict,
const word& type
)
:
motionSolver(mesh, dict, type),
points0_(pointIOField(points0IO(mesh)))
{
if (points0_.size() != mesh.nPoints())
{
FatalErrorInFunction
<< "Number of points in mesh " << mesh.nPoints()
<< " differs from number of points " << points0_.size()
<< " read from file "
<< typeFilePath<pointIOField>
(
IOobject
(
"points",
time().constant(),
polyMesh::meshSubDir,
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
)
)
<< exit(FatalError);
}
}
示例2: fvMotionSolver
Foam::displacementFvMotionSolver::displacementFvMotionSolver
(
const polyMesh& mesh,
Istream&
)
:
fvMotionSolver(mesh),
points0_
(
pointIOField
(
IOobject
(
"points",
mesh.time().constant(),
polyMesh::meshSubDir,
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
)
)
)
{
if (points0_.size() != mesh.nPoints())
{
FatalErrorIn
(
"displacementFvMotionSolver::displacementFvMotionSolver\n"
"(\n"
" const polyMesh&,\n"
" Istream&\n"
")"
) << "Number of points in mesh " << mesh.nPoints()
<< " differs from number of points " << points0_.size()
<< " read from file "
<<
IOobject
(
"points",
mesh.time().constant(),
polyMesh::meshSubDir,
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
).filePath()
<< exit(FatalError);
}
}
示例3: motionSolver
Foam::displacementMotionSolver::displacementMotionSolver
(
const polyMesh& mesh,
const IOdictionary& dict,
const word& type
)
:
motionSolver(mesh, dict, type),
pointDisplacement_
(
IOobject
(
"pointDisplacement",
time().timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
pointMesh::New(mesh)
),
points0_(pointIOField(points0IO(mesh)))
{
if (points0_.size() != mesh.nPoints())
{
FatalErrorIn
(
"displacementMotionSolver::"
"displacementMotionSolver\n"
"(\n"
" const polyMesh&,\n"
" const IOdictionary&,\n"
" const word&\n"
")"
) << "Number of points in mesh " << mesh.nPoints()
<< " differs from number of points " << points0_.size()
<< " read from file "
<<
IOobject
(
"points",
time().constant(),
polyMesh::meshSubDir,
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
).filePath()
<< exit(FatalError);
}
}
示例4: calcPatchSizes
//- (optionally destructively) construct from components
Foam::mapDistributePolyMesh::mapDistributePolyMesh
(
const polyMesh& mesh,
const label nOldPoints,
const label nOldFaces,
const label nOldCells,
labelList& oldPatchStarts,
labelList& oldPatchNMeshPoints,
labelListList& subPointMap,
labelListList& subFaceMap,
labelListList& subCellMap,
labelListList& subPatchMap,
labelListList& constructPointMap,
labelListList& constructFaceMap,
labelListList& constructCellMap,
labelListList& constructPatchMap,
const bool reUse // clone or reuse
)
:
mesh_(mesh),
nOldPoints_(nOldPoints),
nOldFaces_(nOldFaces),
nOldCells_(nOldCells),
oldPatchSizes_(oldPatchStarts.size()),
oldPatchStarts_(oldPatchStarts, reUse),
oldPatchNMeshPoints_(oldPatchNMeshPoints, reUse),
pointMap_(mesh.nPoints(), subPointMap, constructPointMap, reUse),
faceMap_(mesh.nFaces(), subFaceMap, constructFaceMap, reUse),
cellMap_(mesh.nCells(), subCellMap, constructCellMap, reUse),
patchMap_(mesh.boundaryMesh().size(), subPatchMap, constructPatchMap, reUse)
{
calcPatchSizes();
}
示例5:
// Construct from mesh. No morphing data: the mesh has not changed
// HJ, 27/Nov/2009
Foam::mapPolyMesh::mapPolyMesh(const polyMesh& mesh)
:
mesh_(mesh),
morphing_(false),
nOldPoints_(mesh.nPoints()),
nOldFaces_(mesh.nFaces()),
nOldCells_(mesh.nCells())
{}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Core-OpenFOAM-1.5-dev,代码行数:10,代码来源:mapPolyMesh.C
示例6: motionSolver
Foam::componentDisplacementMotionSolver::componentDisplacementMotionSolver
(
const polyMesh& mesh,
const dictionary& dict,
const word& type
)
:
motionSolver(mesh, dict, type),
cmptName_(coeffDict().lookup("component")),
cmpt_(cmpt(cmptName_)),
points0_
(
pointIOField
(
IOobject
(
"points",
mesh.time().constant(),
polyMesh::meshSubDir,
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
)
).component(cmpt_)
),
pointDisplacement_
(
IOobject
(
"pointDisplacement" + cmptName_,
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
pointMesh::New(mesh)
)
{
if (points0_.size() != mesh.nPoints())
{
FatalErrorInFunction
<< "Number of points in mesh " << mesh.nPoints()
<< " differs from number of points " << points0_.size()
<< " read from file "
<< typeFilePath<pointIOField>
(
IOobject
(
"points",
mesh.time().constant(),
polyMesh::meshSubDir,
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
)
)
<< exit(FatalError);
}
}