46 template<
class GeometricField>
74 const label nSubCycles
126 template<
class GeometricField>
154 const label nSubCycles
158 gf0Ptrs_(gfPtrs.size())
166 gf0Ptrs_[i] = &gfPtrs_[i]->oldTimeRef();
173 gf0Ptrs_[i]->
name() +
"_",
185 if (gf_0Ptrs_.
size())
190 *gf0Ptrs_[i] = gf_0Ptrs_[i];
203 return gfPtrs_[0]->time();
229 class GeometricField,
230 template<
class>
class SubCycleField = subCycleField
234 public SubCycleField<GeometricField>,
245 typename SubCycleField<GeometricField>::FieldsType& gf,
#define forAll(list, i)
Loop across all elements in list.
Generic GeometricField class.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
const Time & time() const
Return time.
const word & name() const
Return name.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label)
Override size to be inconsistent with allocated storage.
label timeIndex() const
Return the time index of the field.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool set(const label) const
Is element set.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
label timeIndex() const
Return current time index.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
label size() const
Return the number of elements in the UPtrList.
const Time & time() const
Access to time.
void updateTimeIndex()
Correct the time index of the field to correspond to.
~subCycleField()
Destructor.
GeometricField FieldsType
Type of the field.
subCycleField(GeometricField &gf, const label nSubCycles)
Construct from field and number of sub-cycles.
const Time & time() const
Access to time.
List< GeometricField * > FieldsType
Type of the list of fields.
void updateTimeIndex()
Correct the time index of the fields to correspond to.
~subCycleFields()
Destructor.
subCycleFields(List< GeometricField * > &gfPtrs, const label nSubCycles)
Construct from field list and number of sub-cycles.
A class for managing sub-cycling times.
label nSubCycles() const
Return the total number of sub-cycles.
void endSubCycle()
End the sub-cycling and reset the time-state.
Perform a subCycleTime on a field or list of fields.
void operator=(const subCycle< GeometricField > &)=delete
Disallow default bitwise assignment.
subCycle(typename SubCycleField< GeometricField >::FieldsType &gf, const label nSubCycles)
Construct field and number of sub-cycles.
A class for managing temporary objects.
bool valid() const
Is this temporary object valid,.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const bool)
Return a word representation of a bool.