42 typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
44 if (
io.isHeaderClass<VolFieldType>())
48 fvPatchField<Type>::dictionaryConstructorTablePtr_->
sortedToc()
53 Info<<
"Available boundary conditions for "
54 << pTraits<Type>::typeName <<
" field: " <<
io.name() <<
nl;
58 Info<<
" " << types[i] <<
nl;
77 typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
79 wordList types(fieldConditions<Type>(
io,
false));
86 const fvMesh&
mesh =
dynamic_cast<const fvMesh&
>(
io.db());
93 mesh.time().timeName(),
104 Info<<
"Fixed value boundary conditions for "
105 << pTraits<Type>::typeName <<
" field: " <<
io.name() <<
nl;
112 bool foundFixed =
false;
115 const word& patchType = types[i];
123 mesh.nInternalFaces(),
129 fvPatch fvp(
pp,
mesh.boundary());
131 tmp<fvPatchField<Type>> pf
141 if (pf().fixesValue())
143 Info<<
" " << patchType <<
nl;
writer write("magLe", fld)
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))
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
bool throwing() const noexcept
Return the current exception throwing state (on or off).
static tmp< fvPatchField< Type > > New(const word &patchFieldType, const fvPatch &, const DimensionedField< Type, volMesh > &)
Return a pointer to a new patchField created on freestore given.
wordList fieldConditions(const IOobject &io, const bool write) const
Return/output the available boundary conditions for fields of Type.
void fixedValueFieldConditions(const IOobject &io) const
Output the available fixed boundary conditions for fields of Type.
List< label > sortedToc(const UList< bool > &bools)
Return the (sorted) values corresponding to 'true' entries.
List< word > wordList
List of word.
const dimensionSet dimless
Dimensionless.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
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...
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.