|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Chris Sideroff
Join Date: Mar 2009
Location: Ottawa, ON, CAN
Posts: 425
Rep Power: 20 ![]() |
I'm trying to implement the CoEuler (local timestepping) scheme in my solver but I don't think its working. As a simple check to confirm, I want to print the min/max timestep to stdout. I've included the following in main source file of my solver:
Code:
dimensionedScalar maxDt = 0.0; dimensionedScalar minDt = 0.0; maxDt = max(runTime.deltaT()).value(); minDt = min(runTime.deltaT()).value(); Info<< "Max and min time steps = " << maxDt << " " << minDt << endl; Code:
mySolverFoam.C: In function ‘int main(int, char**)’: mySolverFoam.C:229: error: no matching function for call to ‘max(Foam::dimensionedScalar)’ I guess, the general questions is how do I find min/max timestep? Also, am I right in assuming the timestep is stored as a scalar field array, i.e. a deltaT for each cell? I'm a noob at C++ so I think this a simple question for someone in the know. |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 694
Rep Power: 27 ![]() ![]() |
Quote:
So what you are trying to do is calculate something like max(1). |
||
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Chris Sideroff
Join Date: Mar 2009
Location: Ottawa, ON, CAN
Posts: 425
Rep Power: 20 ![]() |
||
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to find the number of particles trapped | prashant | FLUENT | 5 | January 3, 2020 04:33 |
Looking for SUBOFF model but i can't find it. | Heewon Lee | Main CFD Forum | 7 | March 5, 2017 14:36 |
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug | unoder | OpenFOAM Installation | 11 | January 30, 2008 21:30 |
where can I find information on Star v4? | tootoon | Siemens | 5 | March 11, 2007 17:36 |
YPlus nowhere to be find | Daniel | CFX | 3 | May 1, 2006 17:22 |