31 template<
class GeoFieldType>
32 bool Foam::functionObjects::components::calcFieldComponents()
34 typedef typename GeoFieldType::value_type Type;
38 resultNames_.
setSize(Type::nComponents);
42 for (
direction i=0; i<Type::nComponents; i++)
44 resultNames_[i] =
fieldName_ + word(Type::componentNames[i]);
45 stored = stored &&
store(resultNames_[i],
field.component(i));
53 bool Foam::functionObjects::components::calcComponents()
55 typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
56 typedef GeometricField<Type, fvsPatchField, surfaceMesh> SurfaceFieldType;
60 return calcFieldComponents<VolFieldType>();
62 else if (foundObject<SurfaceFieldType>(
fieldName_))
64 return calcFieldComponents<SurfaceFieldType>();
const word fieldName_
Name of field to process.
bool store(const tmp< ObjectType > &tfield)
Store the given field in the objectRegistry.
void setSize(const label)
Reset size of List.