67 template<
class Type>
class Field;
70 template<
class Type>
Ostream& operator<<(Ostream&, const Field<Type>&);
71 template<
class Type>
Ostream& operator<<(Ostream&, const tmp<Field<Type>>&);
129 return NullObjectRef<Field<Type>>();
141 inline explicit
Field(const label len);
144 inline
Field(const label len, const Type& val);
162 inline explicit
Field(const
UList<Type>& list);
175 template<
int SizeMin>
181 const
UList<Type>& mapF,
195 const
UList<Type>& mapF,
211 const
UList<Type>& mapF,
213 const
bool applyFlip = true
219 const
UList<Type>& mapF,
221 const Type& defaultValue,
222 const
bool applyFlip = true
228 const
UList<Type>& mapF,
230 const
UList<Type>& defaultValues,
231 const
bool applyFlip = true
239 const
bool applyFlip = true
248 const Type& defaultValue,
249 const
bool applyFlip = true
258 const
UList<Type>& defaultValues,
259 const
bool applyFlip = true
300 template<
class Type2>
318 void assign(
const entry&
e,
const label len);
331 const dictionary&
dict,
339 const UList<Type>& mapF,
346 const tmp<Field<Type>>& tmapF,
353 const UList<Type>& mapF,
361 const tmp<Field<Type>>& tmapF,
371 const bool applyFlip =
true 379 const bool applyFlip =
true 386 const bool applyFlip =
true 455 template<
class VSForm>
456 VSForm
block(
const label start)
const;
497 template<
int SizeMin>
506 template<
class Form,
class Cmpt, direction nCmpt>
533 friend Ostream& operator<< <Type>
536 friend Ostream& operator<< <Type>
static tmp< Field< Type > > NewCalculatedType(const Field< Type2 > &f)
Return a pointer to a new calculatedFvPatchFieldField created on freestore without setting patchField...
static autoPtr< Field< Type > > New(Istream &is)
Return a pointer to a new Field created on freestore.
void operator-=(const UList< Type > &)
Reference counter for various OpenFOAM components.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
void negate()
Inplace negate this field (negative).
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void clamp_min(const Type &lower)
Impose lower (floor) clamp on the field values (in-place)
A range or interval of labels defined by a start and a size.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
pTraits< Type >::cmptType cmptType
Component type.
A min/max value pair with additional methods. In addition to conveniently storing values...
static const Field< Type > & null() noexcept
Return a null Field (reference to a nullObject). Behaves like an empty Field.
A traits class, which is primarily used for primitives and vector-space.
void clamp_range(const Type &lower, const Type &upper)
Clamp field values (in-place) to the specified range.
string upper(const std::string &s)
Return string copy transformed with std::toupper on each character.
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
SubField is a Field obtained as a section of another Field, without its own allocation. SubField is derived from a SubList rather than a List.
void replace(const direction, const UList< cmptType > &)
Replace a component field of the field.
List< labelList > labelListList
List of labelList.
Base for lists with indirect addressing, templated on the list contents type and the addressing type...
UList< label > labelUList
A UList of labels.
static const char *const typeName
Typename for Field.
dimensionedScalar pos(const dimensionedScalar &ds)
const dimensionedScalar e
Elementary charge.
Abstract base class to hold the Field mapping addressing and weights.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
Generic templated field type.
List< scalarList > scalarListList
List of scalarList.
A class for handling words, derived from Foam::string.
tmp< Field< Type > > clone() const
Clone.
VSForm block(const label start) const
SubField< Type > slice(const label pos, label len=-1)
Return SubField slice (non-const access) - no range checking.
constexpr FieldBase() noexcept
Default construct.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Template invariant parts for Field and SubField.
void map(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 map from the given field
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
void operator=(const Field< Type > &)
Copy assignment.
void assign(const entry &e, const label len)
Assign from a primitive dictionary entry with the following behaviour:
void autoMap(const FieldMapper &map, const bool applyFlip=true)
Map from self.
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))
void rmap(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 reverse-map from the given field
Direction is an 8-bit unsigned integer type used to represent Cartesian directions, components etc.
string lower(const std::string &s)
Return string copy transformed with std::tolower on each character.
void clamp_max(const Type &upper)
Impose upper (ceiling) clamp on the field values (in-place)
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
tmp< Field< Type > > T() const
Return the field transpose (only defined for second rank tensors)
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
SubField< Type > subField
Declare type of subField.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
void operator+=(const UList< Type > &)
constexpr Field() noexcept
Default construct.
A class for managing temporary objects.
void normalise()
Inplace normalise this field. Generally a no-op except for vector fields.
static bool allowConstructFromLargerSize
Permit read construct from a larger size.
A non-counting (dummy) refCount.
void operator/=(const UList< scalar > &)
void operator*=(const UList< scalar > &)
A keyword and a list of tokens is an 'entry'.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
readOption
Enumeration defining read preferences.