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>>&);
137 inline explicit
Field(const label len);
140 inline
Field(const label len, const Type& val);
158 inline explicit
Field(const
UList<Type>& list);
171 template<
int SizeMin>
177 const
UList<Type>& mapF,
191 const
UList<Type>& mapF,
207 const
UList<Type>& mapF,
209 const
bool applyFlip = true
215 const
UList<Type>& mapF,
217 const Type& defaultValue,
218 const
bool applyFlip = true
224 const
UList<Type>& mapF,
226 const
UList<Type>& defaultValues,
227 const
bool applyFlip = true
235 const
bool applyFlip = true
244 const Type& defaultValue,
245 const
bool applyFlip = true
254 const
UList<Type>& defaultValues,
255 const
bool applyFlip = true
296 template<
class Type2>
314 void assign(
const entry&
e,
const label len);
327 const dictionary&
dict,
335 const UList<Type>& mapF,
342 const tmp<Field<Type>>& tmapF,
349 const UList<Type>& mapF,
357 const tmp<Field<Type>>& tmapF,
367 const bool applyFlip =
true 375 const bool applyFlip =
true 382 const bool applyFlip =
true 451 template<
class VSForm>
452 VSForm
block(
const label start)
const;
493 template<
int SizeMin>
502 template<
class Form,
class Cmpt, direction nCmpt>
529 friend Ostream& operator<< <Type>
532 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...
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
static const Field< Type > & null()
Return nullObject reference Field.
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.