View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002165 | OpenFOAM | Patch | public | 2016-08-01 11:56 | 2016-08-01 14:31 |
Reporter | Lieven | Assigned To | henry | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Summary | 0002165: Patch for meshToMesh related to new .ref() | ||||
Description | A number of compilation errors appear when using the mapTgtToSrc(field) function of a meshToMesh object, e.g.: OpenFOAM-4.x/src/sampling/lnInclude/meshToMeshTemplates.C:566:72: error: invalid initialization of reference of type ‘Foam::fvPatchField<double>&’ from expression of type ‘const Foam::fvPatchField<double>’ fvPatchField<Type>& srcField = result.boundaryField()[srcPatchi]; This seems related to the new .ref(), and it looks to me that it should be corrected as: result.boundaryFieldRef()[srcPatchi]; | ||||
Additional Information | The attached patch resolves this issue at three locations inside meshToMeshTemplates.C (although their might be others) | ||||
Tags | No tags attached. | ||||
|
meshToMeshTemplates.patch (912 bytes)
@@ -554,7 +554,7 @@ GeometricField<Type, fvPatchField, volMesh>& result ) const { - mapTgtToSrc(field, cop, result.primitiveField()); + mapTgtToSrc(field, cop, result.primitiveFieldRef()); const PtrList<AMIPatchToPatchInterpolation>& AMIList = patchAMIs(); @@ -563,7 +563,7 @@ label srcPatchi = srcPatchID_[i]; label tgtPatchi = tgtPatchID_[i]; - fvPatchField<Type>& srcField = result.boundaryField()[srcPatchi]; + fvPatchField<Type>& srcField = result.boundaryFieldRef()[srcPatchi]; const fvPatchField<Type>& tgtField = field.boundaryField()[tgtPatchi]; @@ -602,7 +602,7 @@ forAll(cuttingPatches_, i) { label patchi = cuttingPatches_[i]; - fvPatchField<Type>& pf = result.boundaryField()[patchi]; + fvPatchField<Type>& pf = result.boundaryFieldRef()[patchi]; pf == pf.patchInternalField(); } } |
|
Thanks for the patch Resolved in OpenFOAM-dev by commit d394cec0dccefa2c7bbe12259f0066fe825e7529 Resolved in OpenFOAM-4.x commit b6498a8c05ea44ba78ed24ac9799586229947572 |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-08-01 11:56 | Lieven | New Issue | |
2016-08-01 11:56 | Lieven | File Added: meshToMeshTemplates.patch | |
2016-08-01 14:31 | henry | Note Added: 0006589 | |
2016-08-01 14:31 | henry | Status | new => resolved |
2016-08-01 14:31 | henry | Fixed in Version | => 4.x |
2016-08-01 14:31 | henry | Resolution | open => fixed |
2016-08-01 14:31 | henry | Assigned To | => henry |