CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Unable to abort OF when file not found in subroutine

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 8, 2022, 03:43
Default Unable to abort OF when file not found in subroutine
  #1
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 400
Rep Power: 19
quarkz is on a distinguished road
Hi,

I have written a code to deform/rotate my mesh.

I need it to read in the rotation rate from a text file, and abort OF if the file is not found.

I googled and also search the forums. I tried:

1. exit(1);
2 .exit();

elevatorRotation_simpleFB.C:133:9: error: no matching function for call to ‘exit()’
133 | exit();


3. stopAt(Time::saNoWriteNow);

elevatorRotation_simpleFB.C: In member function ‘virtual Foam::septernion Foam::solidBodyMotionFunctions::elevatorRotation_s impleFB::transformation() const’:
elevatorRotation_simpleFB.C:135:4: error: ‘stopAt’ was not declared in this scope
135 | stopAt(Time::saNoWriteNow);
| ^~~~~~

4. abort();

elevatorRotation_simpleFB.C: In member function ‘virtual Foam::septernion Foam::solidBodyMotionFunctions::elevatorRotation_s impleFB::transformation() const’:
elevatorRotation_simpleFB.C:137:10: error: no matching function for call to ‘abort()’
137 | abort();
| ^


but all can't work, giving error msgs as shown above during compilation.

Can someone help? Did I miss out some include files?

Thanks
quarkz is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.com] swak4foam compiling issues on a cluster saj216 OpenFOAM Installation 5 January 17, 2023 16:05
[Other] Tabulated thermophysicalProperties library chriss85 OpenFOAM Community Contributions 62 October 2, 2022 03:50
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 10:59
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 00:53.