mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
cuttingPlane constructor with plane/mesh instead of mesh/plane
This commit is contained in:
@ -341,11 +341,11 @@ Foam::cuttingPlane::cuttingPlane(const plane& pln)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// Construct from mesh reference and plane, restricted to a list of cells
|
// Construct from plane and mesh reference, restricted to a list of cells
|
||||||
Foam::cuttingPlane::cuttingPlane
|
Foam::cuttingPlane::cuttingPlane
|
||||||
(
|
(
|
||||||
const primitiveMesh& mesh,
|
|
||||||
const plane& pln,
|
const plane& pln,
|
||||||
|
const primitiveMesh& mesh,
|
||||||
const UList<label>& cellIdLabels
|
const UList<label>& cellIdLabels
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -61,11 +61,11 @@ class primitiveMesh;
|
|||||||
|
|
||||||
class cuttingPlane
|
class cuttingPlane
|
||||||
:
|
:
|
||||||
public PrimitiveMeshedSurface<face>,
|
public plane,
|
||||||
public plane
|
public BasicMeshedSurface<face>
|
||||||
{
|
{
|
||||||
//- Private typedefs for convenience
|
//- Private typedefs for convenience
|
||||||
typedef PrimitiveMeshedSurface<face> MeshStorage;
|
typedef BasicMeshedSurface<face> MeshStorage;
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -132,12 +132,12 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh reference and plane,
|
//- Construct from plane and mesh reference,
|
||||||
// possibly restricted to a list of cells
|
// possibly restricted to a list of cells
|
||||||
cuttingPlane
|
cuttingPlane
|
||||||
(
|
(
|
||||||
const primitiveMesh&,
|
|
||||||
const plane&,
|
const plane&,
|
||||||
|
const primitiveMesh&,
|
||||||
const UList<label>& cellIdLabels = UList<label>::null()
|
const UList<label>& cellIdLabels = UList<label>::null()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -36,22 +36,22 @@ Description
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type> > Foam::cuttingPlane::sample
|
Foam::tmp<Foam::Field<Type> > Foam::cuttingPlane::sample
|
||||||
(
|
(
|
||||||
const Field<Type>& sf
|
const Field<Type>& fld
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type> >(new Field<Type>(sf, cutCells()));
|
return tmp<Field<Type> >(new Field<Type>(fld, cutCells()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type> > Foam::cuttingPlane::sample
|
Foam::tmp<Foam::Field<Type> > Foam::cuttingPlane::sample
|
||||||
(
|
(
|
||||||
const tmp<Field<Type> >& tsf
|
const tmp<Field<Type> >& tfld
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
tmp<Field<Type> > tint = sample(tsf());
|
tmp<Field<Type> > tsf = sample(tfld());
|
||||||
tsf.clear();
|
tfld.clear();
|
||||||
return tint;
|
return tsf;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -17,7 +17,7 @@ Switch planeMapping
|
|||||||
);
|
);
|
||||||
|
|
||||||
Info << "Constructing planePatch" << endl;
|
Info << "Constructing planePatch" << endl;
|
||||||
cuttingPlane cut(mesh, plane(planeToPatchDict));
|
cuttingPlane cut(plane(planeToPatchDict), mesh);
|
||||||
|
|
||||||
primitiveFacePatch planePatch
|
primitiveFacePatch planePatch
|
||||||
(
|
(
|
||||||
@ -54,8 +54,7 @@ if(!targetPatchNamePresent)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Serr << "Target patch name: " << patches[targetPatchNumber].name()
|
Serr<< "Target patch name: " << patches[targetPatchNumber].name() << endl;
|
||||||
<< endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
patchToPatchInterpolation interPatch
|
patchToPatchInterpolation interPatch
|
||||||
@ -73,6 +72,7 @@ PrimitivePatchInterpolation
|
|||||||
planePatch
|
planePatch
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
PrimitivePatchInterpolation
|
PrimitivePatchInterpolation
|
||||||
<
|
<
|
||||||
PrimitivePatch<face, List, const pointField&>
|
PrimitivePatch<face, List, const pointField&>
|
||||||
|
|||||||
Reference in New Issue
Block a user