31 template<
class GeoFieldType>
32 bool Foam::functionObjects::components::calcFieldComponents()
34 typedef typename GeoFieldType::value_type Type;
36 const GeoFieldType& field(lookupObject<GeoFieldType>(
fieldName_));
38 resultNames_.
setSize(Type::nComponents);
42 for (
direction i=0; i<Type::nComponents; i++)
55 bool Foam::functionObjects::components::calcComponents()
57 typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
58 typedef GeometricField<Type, fvsPatchField, surfaceMesh> SurfaceFieldType;
62 return calcFieldComponents<VolFieldType>();
64 else if (foundObject<SurfaceFieldType>(
fieldName_))
66 return calcFieldComponents<SurfaceFieldType>();
word resultName_
Name of result field.
word fieldName_
Name of field to process.
bool store(word &fieldName, const tmp< ObjectType > &tfield, bool cacheable=false)
Store the given field in the objectRegistry under the given name.
void setSize(const label)
Reset size of List.