# HG changeset patch # User Matti Hamalainen # Date 1425902798 -7200 # Node ID effde12004ea51497a2ce0a815aaa1b797767f57 # Parent 0620fe91a259af450c71796664fa560558b736cd Comments. diff -r 0620fe91a259 -r effde12004ea materials/parsematerial.pl --- a/materials/parsematerial.pl Mon Mar 09 14:04:44 2015 +0200 +++ b/materials/parsematerial.pl Mon Mar 09 14:06:38 2015 +0200 @@ -583,7 +583,9 @@ ### Output functionality begins here ### -# Print names only +### +### Print material names only, one per line +### if ($opt_mode eq "-names") { foreach my $name (@entries) @@ -591,8 +593,9 @@ print $name."\n"; } } - -# Print CSV list +### +### Print CSV format list +### elsif ($opt_mode eq "-csv") { foreach my $name (@entries) @@ -600,8 +603,9 @@ print join(";", map { get_datastr($name, $$_{"i"}) } @fieldInfo)."\n"; } } - -# Dump normal data to files +### +### Dump long-format material data to individual files +### elsif ($opt_mode eq "-dumpfiles") { foreach my $name (@entries) @@ -613,8 +617,9 @@ close(OUTFILE); } } - -# Dump normal data to stdout +### +### Dump long-format material data to stdout +### elsif ($opt_mode eq "-dump") { foreach my $name (@entries) @@ -624,8 +629,9 @@ print_material_long(\*STDOUT, $data{$name}, $name); } } - -# Print TinyFugue formatted data +### +### Print TinyFugue script variables +### elsif ($opt_mode eq "-tf") { print "/set gmat_names=".join(' ', @entries)."\n"; @@ -639,8 +645,9 @@ join('|', @{$matByType{$type}})."\n"; } } - -# Print normal table +### +### Print a nice ASCII table +### elsif ($opt_mode eq "-table") { my $str = join("", @@ -660,8 +667,9 @@ } @fieldInfo)."\n"; } } - -# Dump a Perl module with material data +### +### Dump a Perl module with material data +### elsif ($opt_mode eq "-perl") { $Data::Dumper::Indent = 0;