GeometricField: New non-const access function boundaryFieldRef()
There is a need to specify const or non-const access to a non-const object which is not currently possible with the "boundaryField()" access function the const-ness of the return of which is defined by the const-ness of the object for which it is called. For consistency with the latest "tmp" storage class in which non-const access is obtained with the "ref()" function it is proposed to replace the non-const form of "boundaryField()" with "boundaryFieldRef()". Thanks to Mattijs Janssens for starting the process of migration to "boundaryFieldRef()" and providing a patch for the OpenFOAM and finiteVolume libraries.
This commit is contained in:
@ -46,7 +46,7 @@ void transform
|
||||
)
|
||||
{
|
||||
transform(rtf.internalField(), trf.internalField(), tf.internalField());
|
||||
transform(rtf.boundaryField(), trf.boundaryField(), tf.boundaryField());
|
||||
transform(rtf.boundaryFieldRef(), trf.boundaryField(), tf.boundaryField());
|
||||
}
|
||||
|
||||
|
||||
@ -132,7 +132,7 @@ void transform
|
||||
)
|
||||
{
|
||||
transform(rtf.internalField(), t.value(), tf.internalField());
|
||||
transform(rtf.boundaryField(), t.value(), tf.boundaryField());
|
||||
transform(rtf.boundaryFieldRef(), t.value(), tf.boundaryField());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user