49 class lagrangianFieldDecomposer::fieldsCache::privateCache
54 #define declareField(Type) \ 55 PtrList<PtrList<IOField<Type>>> Type##Fields_; \ 56 PtrList<PtrList<CompactIOField<Field<Type>, Type>>> Type##FieldFields_; 70 void resize(
const label len)
73 #define doLocalCode(Type) \ 75 Type##Fields_.resize(len); \ 76 Type##FieldFields_.resize(len); \ 92 #define doLocalCode(Type) \ 94 lagrangianFieldDecomposer::readFields \ 100 lagrangianFieldDecomposer::readFieldFields \ 127 #define doLocalCode(Type) \ 129 decomposer.decomposeFields \ 132 Type##Fields_[cloudi] \ 134 decomposer.decomposeFieldFields \ 137 Type##FieldFields_[cloudi] \ 168 cache_(new privateCache)
170 cache_->resize(nClouds);
185 return (!cache_ || cache_->empty());
191 return (cache_ ? cache_->size() : label(0));
208 cache_->resize(nClouds);
221 cache_->readAll(cloudi, lagrangianObjects);
236 cache_->decomposeAll(cloudi, cloudDir, decomposer, report);
label size() const
Number of clouds.
fieldsCache()
Default construct (no clouds)
A class for handling file names.
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable, so the various sorted methods should be used if traversing in parallel.
void decomposeAllFields(const label cloudi, const fileName &cloudDir, const lagrangianFieldDecomposer &decomposer, bool report=false) const
Decompose and write all fields and field-fields for given cloud.
bool empty() const
No clouds.
void readAllFields(const label cloudi, const IOobjectList &lagrangianObjects)
Read all fields and field-fields for given cloud and objects.
bool empty() const noexcept
label size() const noexcept
void resize(const label nClouds)
Resize for the number of clouds.
void decomposeAll(const label cloudi, const fileName &cloudDir, const lagrangianFieldDecomposer &decomposer, bool report) const
~fieldsCache()
Destructor.
#define doLocalCode(Type)
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
void resize(const label len)
void readAll(const label cloudi, const IOobjectList &lagrangianObjects)
#define declareField(Type)
Tensor of scalars, i.e. Tensor<scalar>.
PtrList< PtrList< IOField< label > > > labelFields_
Lagrangian field decomposer.