Go to the documentation of this file.
51 case topoSetSource::sourceType::CELLZONE_SOURCE:
52 case topoSetSource::sourceType::CELLSET_SOURCE:
54 selected = getTopoSetLabels(
name, setType);
61 <<
"Unexpected sourceType: " << int(setType) <<
nl
67 auto&
fld = tresult.ref().primitiveFieldRef();
91 case topoSetSource::sourceType::FACESET_SOURCE:
92 case topoSetSource::sourceType::FACEZONE_SOURCE:
94 selected = getTopoSetLabels(
name, setType);
101 <<
"Unexpected sourceType: " << int(setType) <<
nl
107 const auto& bmesh =
mesh().boundaryMesh();
109 auto& result = tresult.ref();
110 auto&
fld = result.primitiveFieldRef();
111 auto& bfld = result.boundaryFieldRef();
115 for (
const label facei : selected)
117 if (facei <
mesh().nInternalFaces())
119 fld[facei] = scalar(1);
123 const label patchi = bmesh.whichPatch(facei);
131 bfld[patchi][facei-bmesh[patchi].start()] = scalar(1);
139 <<
"The faceSet/faceZone " <<
name <<
" contained "
140 << nErrors <<
" faces outside of the addressing range" <<
nl
166 case topoSetSource::sourceType::POINTSET_SOURCE:
167 case topoSetSource::sourceType::POINTZONE_SOURCE:
169 selected = getTopoSetLabels(
name, setType);
176 <<
"Unexpected sourceType: " << int(setType) <<
nl
182 auto&
fld = tresult.ref().primitiveFieldRef();
275 auto&
fld = tresult.ref().primitiveFieldRef();
277 fill_random(
fld, seed, gaussian);
sourceType
Enumeration defining the types of sources.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
static const pointMesh & New(const polyMesh &mesh, Args &&... args)
Get existing or create a new MeshObject.
virtual const fvMesh & mesh() const
The mesh we are attached to.
tmp< volScalarField > field_rand(label seed=0, bool gaussian=false) const
A uniform random field.
tmp< volScalarField > field_cellVolume() const
The cell volumes - (swak = vol)
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &ds, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
Return tmp field from name, mesh, dimensions and patch type.
word name(const complex &c)
Return string representation of complex.
tmp< surfaceVectorField > field_faceCentre() const
The face centres - (swak = fpos)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
tmp< pointVectorField > field_pointField() const
The mesh point locations - (swak = pts)
errorManipArg< error, int > exit(error &err, const int errNo=1)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
tmp< surfaceScalarField > field_faceArea() const
The face area magnitudes [magSf] - (swak = area)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
tmp< surfaceVectorField > field_areaNormal() const
The face areas with their vector direction [Sf] - (swak = face)
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
tmp< volScalarField > field_cellSelection(const word &name, enum topoSetSource::sourceType setType) const
Cell selections (as logical)
tmp< volVectorField > field_cellCentre() const
The cell centres - (swak = pos)
A List with indirect addressing.
const dimensionSet dimVol(dimVolume)
Older spelling for dimVolume.
tmp< pointScalarField > field_pointSelection(const word &name, enum topoSetSource::sourceType setType) const
Point selections (as logical)
tmp< surfaceScalarField > field_faceSelection(const word &name, enum topoSetSource::sourceType setType) const
Face selections (as logical)
#define WarningInFunction
Report a warning using Foam::Warning.