From 4a53835f4bc30352bbb9d71616059c1d00a8614b Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 16 Nov 2018 12:23:41 +0100 Subject: [PATCH] BUG: incorrect transform for fieldCoordinateSystemTransform (fixes #1076) - was using coordinate-system and transform() which is the local-to-global mapping, whereas it should be invTransform() which is the global-to-local mapping --- .../fieldCoordinateSystemTransform.C | 2 +- .../fieldCoordinateSystemTransform.H | 10 +++++----- .../fieldCoordinateSystemTransformTemplates.C | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C b/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C index eefc9ca268..e1d06c1729 100644 --- a/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C +++ b/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C @@ -64,7 +64,7 @@ fieldCoordinateSystemTransform read(dict); Info<< type() << " " << name << ":" << nl - << " Applying transformation from global Cartesian to local " + << " Applying uniform transformation from global Cartesian to local " << *csysPtr_ << nl << endl; } diff --git a/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H b/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H index 5f68d09f8b..6247df0dca 100644 --- a/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H +++ b/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H @@ -29,8 +29,8 @@ Group Description Transforms a user-specified selection of fields from global Cartesian - coordinates to a local coordinate system. The fields are run-time - modifiable. + coordinates to a local Cartesian coordinate system. + The fields are run-time modifiable. Usage Example of function object specification: @@ -62,10 +62,10 @@ Usage Where the entries comprise: \table - Property | Description | Required | Default value + Property | Description | Required | Default value type | type name: fieldCoordinateSystemTransform | yes | - fields | list of fields to be transformed |yes | - coordinateSystem | local coordinate system | yes | + fields | list of fields to be transformed | yes | + coordinateSystem | local coordinate system | yes | \endtable See also diff --git a/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransformTemplates.C b/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransformTemplates.C index 2cf380522b..a0ea180a43 100644 --- a/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransformTemplates.C +++ b/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransformTemplates.C @@ -41,7 +41,7 @@ void Foam::functionObjects::fieldCoordinateSystemTransform::transformField store ( transFieldName, - Foam::transform(dimensionedTensor(csysPtr_->R()), field) + Foam::invTransform(dimensionedTensor(csysPtr_->R()), field) ); }