View Issue Details

IDProjectCategoryView StatusLast Update
0003904OpenFOAMBugpublic2022-10-13 12:14
Reportercgoessni Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformamd64OSCentOSOS Version7
Product Versiondev 
Fixed in Versiondev 
Summary0003904: setWriteInterval and setTimeStep functionObjects do not convert user time to real time
DescriptionOne would expect that the values given to setWriteInterval and setTimeStep are in units userTime. However, there is no conversion userTimeToTime() yet in these two functionObjects.

Patch attached.
TagsNo tags attached.

Activities

cgoessni

2022-10-12 14:41

reporter  

functionObjects_timeToUserTime_diff.txt (1,327 bytes)   
diff --git a/src/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.C b/src/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.C
index f8051c2..8d2a9a6 100644
--- a/src/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.C
+++ b/src/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.C
@@ -88,7 +88,7 @@ bool Foam::functionObjects::setTimeStepFunctionObject::execute()
     {
         const_cast<Time&>(time_).setDeltaT
         (
-            timeStepPtr_().value(time_.userTimeValue())
+            time_.userTimeToTime(timeStepPtr_().value(time_.userTimeValue()))
         );
     }
 
diff --git a/src/functionObjects/utilities/setWriteInterval/setWriteIntervalFunctionObject.C b/src/functionObjects/utilities/setWriteInterval/setWriteIntervalFunctionObject.C
index 75ab1ac..e47918f 100644
--- a/src/functionObjects/utilities/setWriteInterval/setWriteIntervalFunctionObject.C
+++ b/src/functionObjects/utilities/setWriteInterval/setWriteIntervalFunctionObject.C
@@ -85,7 +85,7 @@ bool Foam::functionObjects::setWriteIntervalFunctionObject::execute()
 {
     const_cast<Time&>(time_).setWriteInterval
     (
-        writeIntervalPtr_().value(time_.userTimeValue())
+        time_.userTimeToTime(writeIntervalPtr_().value(time_.userTimeValue()))
     );
 
     return true;

henry

2022-10-13 12:14

manager   ~0012804

Resolved by commit 2972d1665309c93d4ee965d892420493701eadf3

Issue History

Date Modified Username Field Change
2022-10-12 14:41 cgoessni New Issue
2022-10-12 14:41 cgoessni File Added: functionObjects_timeToUserTime_diff.txt
2022-10-13 12:14 henry Assigned To => henry
2022-10-13 12:14 henry Status new => resolved
2022-10-13 12:14 henry Resolution open => fixed
2022-10-13 12:14 henry Fixed in Version => dev
2022-10-13 12:14 henry Note Added: 0012804