61 <<
"Unexpected sourceType: " << int(setType) <<
nl
66 const auto& selected = tselected();
68 auto&
fld = tresult.ref().primitiveFieldRef();
95 tselected = getTopoSetLabels(
name, setType);
102 <<
"Unexpected sourceType: " << int(setType) <<
nl
107 const auto& selected = tselected();
109 const auto& bmesh =
mesh().boundaryMesh();
111 auto& result = tresult.ref();
112 auto&
fld = result.primitiveFieldRef();
113 auto& bfld = result.boundaryFieldRef();
117 for (
const label facei : selected)
119 if (facei <
mesh().nInternalFaces())
121 fld[facei] = scalar(1);
125 const label patchi = bmesh.whichPatch(facei);
133 bfld[patchi][facei-bmesh[patchi].start()] = scalar(1);
141 <<
"The faceSet/faceZone " <<
name <<
" contained "
142 << nErrors <<
" faces outside of the addressing range" <<
nl
171 tselected = getTopoSetLabels(
name, setType);
178 <<
"Unexpected sourceType: " << int(setType) <<
nl
183 const auto& selected = tselected();
185 auto&
fld = tresult.ref().primitiveFieldRef();
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Graphite solid properties.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
A List with indirect addressing. Like IndirectList but does not store addressing.
void fill_random(scalarField &field, label seed=0, const bool gaussian=false) const
Fill a random field.
refPtr< labelList > getTopoSetLabels(const word &name, enum topoSetSource::sourceType setType) const
Get the labels associated with the topo set.
tmp< volScalarField > field_cellVolume() const
The cell volumes - (swak = vol)
tmp< surfaceScalarField > field_faceArea() const
The face area magnitudes [magSf] - (swak = area)
tmp< pointVectorField > field_pointField() const
The mesh point locations - (swak = pts)
tmp< surfaceScalarField > field_faceSelection(const word &name, enum topoSetSource::sourceType setType) const
Face selections (as logical)
tmp< surfaceVectorField > field_areaNormal() const
The face areas with their vector direction [Sf] - (swak = face)
tmp< surfaceVectorField > field_faceCentre() const
The face centres - (swak = fpos)
tmp< volScalarField > field_cellSelection(const word &name, enum topoSetSource::sourceType setType) const
Cell selections (as logical)
tmp< volScalarField > field_rand(label seed=0, bool gaussian=false) const
A uniform random field.
tmp< volVectorField > field_cellCentre() const
The cell centres - (swak = pos)
virtual const fvMesh & mesh() const
The mesh we are attached to.
tmp< pointScalarField > field_pointSelection(const word &name, enum topoSetSource::sourceType setType) const
Point selections (as logical)
A class for managing references or pointers (no reference counting)
A class for managing temporary objects.
sourceType
Enumeration defining the types of sources.
@ POINTSET_SOURCE
Points as set.
@ FACESET_SOURCE
Faces as set.
@ FACEZONE_SOURCE
Faces as zone.
@ POINTZONE_SOURCE
Points as zone.
@ CELLSET_SOURCE
Cells as set.
@ CELLZONE_SOURCE
Cells as zone.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimless
Dimensionless.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const dimensionSet dimVol(dimVolume)
Older spelling for dimVolume.
constexpr char nl
The newline '\n' character (0x0a)