35 const word& fieldName,
41 Info<<
"Writing field " << fieldName;
48 if constexpr (std::is_integral_v<Type>)
78 Info<<
" [level " << refLevel <<
']';
84 tadjusted.
reset(tfield.ptr());
88 tadjusted.
ref() -= refLevel;
100 Info<<
" [scaling " << value <<
']';
106 tadjusted.
reset(tfield.ptr());
110 tadjusted.
ref() *= value;
122 tadjusted.
reset(tfield.ptr());
134 return (tadjusted ? tadjusted : tfield);
156 fieldPtrs.
set(i, &(fieldValues[i]));
167 const coordSet& coords,
168 const UList<Type>& values,
175 if (coords.hasVectorAxis())
177 const vector&
p = coords.vectorCoord(pointi);
178 os <<
p.x() << sep <<
p.y() << sep <<
p.z();
182 os << coords.scalarCoord(pointi);
186 const auto& val =
values[pointi];
187 for (
direction d=0; d < pTraits<Type>::nComponents; ++d)
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie,...
coordSystem::cartesian geometryTransform_
Local coordinate system transformation.
static UPtrList< const Field< Type > > repackageFields(const Field< Type > &field)
Repackage field into a UPtrList.
dictionary fieldLevel_
Field level to remove (on output).
static void writeTable(Ostream &os, const coordSet &coords, const UList< Type > &values, const char *sep)
Write coordinates and values.
bool verbose_
Additional output verbosity.
tmp< Field< Type > > adjustFieldTemplate(const word &fieldName, const tmp< Field< Type > > &tfield) const
dictionary fieldScale_
Field scaling (on output).
Holds list of sampling positions.
const vector & vectorCoord(const label index) const
Get point according to axis="xyz" specification.
bool hasVectorAxis() const noexcept
True if axis specification is a vector.
scalar scalarCoord(const label index) const
Get coordinate of point according to axis specification.
@ REGEX
Regular expression.
A class for managing temporary objects.
void reset(tmp< T > &&other) noexcept
Clear existing and transfer ownership.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
bool equal(const T &a, const T &b)
Compare two values for equality.
refinementData transform(const tensor &, const refinementData val)
No-op rotational transform for base types.
messageStream Info
Information stream (stdout output on master, null elsewhere).
constexpr bool is_vectorspace_v
The is_vectorspace value of Type.
constexpr bool is_rotational_vectorspace_v
The is_rotational_vectorspace value of Type.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.