34 void Foam::functionObjects::mapFields::evaluateConstraintTypes
36 GeometricField<Type, fvPatchField, volMesh>&
fld
39 typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
41 typename VolFieldType::Boundary& fldBf =
fld.boundaryFieldRef();
53 fvPatchField<Type>& tgtField = fldBf[patchi];
57 tgtField.type() == tgtField.patch().patch().type()
77 fvPatchField<Type>& tgtField = fldBf[patchi];
81 tgtField.type() == tgtField.patch().patch().type()
92 fld.mesh().globalData().patchSchedule();
94 forAll(patchSchedule, patchEvali)
96 label patchi = patchSchedule[patchEvali].patch;
97 fvPatchField<Type>& tgtField = fldBf[patchi];
101 tgtField.type() == tgtField.patch().patch().type()
105 if (patchSchedule[patchEvali].
init)
120 bool Foam::functionObjects::mapFields::mapFieldType()
const
122 typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
124 const fvMesh& mapRegion = mapRegionPtr_();
130 for (
const label fieldi : selected)
134 const VolFieldType&
field = lookupObject<VolFieldType>(fieldName);
136 if (!mapRegion.foundObject<VolFieldType>(fieldName))
138 VolFieldType* tmappedField =
150 dimensioned<Type>(
field.dimensions(),
Zero)
153 tmappedField->store();
156 VolFieldType& mappedField =
157 mapRegion.template lookupObjectRef<VolFieldType>(fieldName);
159 mappedField = interpPtr_->mapTgtToSrc(
field);
161 Log <<
" " << fieldName <<
": interpolated";
166 return !selected.empty();
171 bool Foam::functionObjects::mapFields::writeFieldType()
const
173 typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
175 const fvMesh& mapRegion = mapRegionPtr_();
181 for (
const label fieldi : selected)
185 const VolFieldType& mappedField =
186 mapRegion.template lookupObject<VolFieldType>(fieldName);
190 Log <<
" " << fieldName <<
": written";
193 return !selected.empty();