41 if (nSamples >
fld.size())
44 <<
"Number of samples in sampling window is greater than the "
45 <<
"size of the input field" <<
nl
46 <<
" input field size = " <<
fld.size() <<
nl
48 <<
" requested window index = " << windowI
54 auto& result = tresult.ref();
60 <<
"Requested window " << windowI <<
" outside of range. "
61 <<
"Number of available windows is " <<
nWindow
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
constexpr Field() noexcept
SubField is a Field obtained as a section of another Field, without its own allocation....
A class for managing temporary objects.
label nWindow() const
Return the number of windows.
tmp< Field< Type > > apply(const Field< Type > &fld, const label windowI) const
Return the windowed data.
label nWindowsTotal(label nSamplesTotal) const
Return the total number of windows for a given number of samples.
static autoPtr< windowModel > New(const dictionary &dict, const label nSamples)
Return a reference to the selected window model.
label nSamples() const
Return the number of samples in the window.
label nOverlapSamples_
Number of overlap samples per window.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).