cmConvert - converts files between CMISS formats
1.01 (23 March 2001)
The routines in this package can be called in several ways.
1/ From the shell prompt, call as cmConvert, or one of the aliases for specific conversions. Prefix options with '-'. e.g.
cmConvert -toformat exdata -force file.ipdata # creates file.exdata toIpnode file.exnode # creates file.ipnode cmConvert file.ipnode # creates file.exnode
2/ If data is piped in (or out) then the file formats must be explicitly specified. e.g.
cat file.ipnode | cmConvert -fromformat ipnode -toformat exnode > file.exnode
3/ From a Perl script, or from inside CMISS, load this module (with optional flags):
use CmUtils::CmConvert; # loads cmConvert() use CmUtils::CmConvert qw(:all); # loads all routines use CmUtils::CmConvert qw(ipExnode toIpdata); # ipExnode() & toIpdata()
Options and filenames can then be specified in several ways.
a) as a string equivalent to a command line
ipExnode("-force -unique file.ipnode"); # create file.exnode
b) as options and filenames
cmConvert("-toformat","ipdata",$file);
c) as a hash array of options, followed by a list of files
$options->{-force} = 1; $options->{-toformat} = "ipdata"; cmConvert($options, @files);
$options = {-force => 1, -unique => 1, x0 => 5.7}; toIpdata($options, $exdatafile); %options = (-force => 1, -unique => 1, x0 => 5.7); toIpdata(\%options, "file.exdata");
Select a subset of nodes to convert. Any nodes lying in the range given will be output if they exist. Nodelist must be defined without spaces, e.g.
-nodes 4,7,10..14,32
cmConvert converts file between different CMISS formats, including ipnode, ipdata, exnode, exdata, ipfiel and ipfibr. Will also read from STDIN and write to STDOUT. If multiple files are specified and sort is set, then files will be sorted by decreasing size. If an output file already exists, it will not be written, unless the force option is used.
File input and output formats are specified using the fromformat and toformat options, or are determined from the input file(s).
If the variable offset is set, then the numbering will begin from offset, else it is the same as the input file. If multiple files are parsed, the unique option allows numbering to increment for each file in sequence so that all written nodes for all files have unique numbers. The thousand option causes this numbering to jump to the next multiple of 1000. The log option instead jumps to next appropriate power of 10.
Can also set a translation using x0, y0 and z0. Translates the nodes so this specified point is at the origin.
If symbolic links are made to this program, it can also be run as one of the following names, with appropriate input and output formats preset.
ipExdata exIpdata ipExnode exIpnode toExdata toIpdata toExnode toIpnode
Used as a module, the cmConvert routine is available by default, with additional routines exportable if needed, individually, or together with qualifier :all.
Converts from ipdata to exdata formats.
Converts from ipnode to exnode formats.
Converts from exdata to ipdata formats.
Converts from exnode to ipnode formats.
Converts to exdata formats.
Converts to ipdata formats.
Converts to exnode formats.
Converts to ipnode formats.
1.01 - Added options for specifying fields to use. Also verbose option.
1.0 - Release
0.7 - Added new Pod documentation system to give help in CMISS or perldl etc
0.6 - Added documentation and examples describing usage