CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Mesh Generation & Pre-Processing Software > Pointwise & Gridgen

Plugin creation - how to export binary?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 6, 2013, 04:45
Default Plugin creation - how to export binary?
  #1
New Member
 
Andreas K.
Join Date: May 2013
Posts: 5
Rep Power: 12
adkay is on a distinguished road
Hello there,

I'm currently working on a Pointwise export plugin for directly saving the CAE output in a format that is uses by one of the solvers at my university.
Generally it works quite fine, but I would like to add the possibility to save the output file as a binary file, to reduce the file size.
Currently it's ASCII, because the plugin code is based on the Pointwise xml example plugins.

I don't really have a clue how to do that, because I think the fput and fwrite commands used in c++ will never be able to write real binary. Not "binary" that is still coded as ascii....
On the other hand I'm sure that it's possible bacause of some other PW plugins (maybe using fortran-code??).

Anyone an idea on how to do that?

Thanks in advance!
adkay is offline   Reply With Quote

Old   May 7, 2013, 17:38
Default
  #2
New Member
 
Andreas K.
Join Date: May 2013
Posts: 5
Rep Power: 12
adkay is on a distinguished road
I think I solved the problem... and to my shame I accidentially answered my question in the same sentence in which I asked because of a typo

If maybe someone also wonders how to output binary:
The simple fwrite() function seems to work well for that.
In the pointwise example plugins fprintf and fput are used which (I think) can't write binary...
adkay is offline   Reply With Quote

Old   May 20, 2013, 13:58
Default
  #3
Senior Member
 
David Garlisch
Join Date: Jan 2013
Location: Fidelity Pointwise, Cadence Design Systems (Fort Worth, Texas Office)
Posts: 307
Rep Power: 14
dgarlisch is on a distinguished road
Quote:
Originally Posted by adkay View Post
I think I solved the problem... and to my shame I accidentially answered my question in the same sentence in which I asked because of a typo

If maybe someone also wonders how to output binary:
The simple fwrite() function seems to work well for that.
In the pointwise example plugins fprintf and fput are used which (I think) can't write binary...
You are correct. Use fwrite() for binary.

I didn't see your post until just today. Let me know if you have any other issues.
dgarlisch is offline   Reply With Quote

Reply

Tags
ascii, binary file, plugin, pointwise

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
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 14:43
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 08:21
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
Error to re-open fluent case file J.Gimbun FLUENT 0 April 27, 2006 09:42
Sliding mesh error Karl Kevala FLUENT 4 February 21, 2001 16:52


All times are GMT -4. The time now is 05:32.