lib/App/SeismicUnixGui/sunix/model/elacheck.pm untested

filter: Statementstmt 0.0% 0 / 41 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 57 CC 2 SCAR 10.3
CC
2
Cov
0%
file
6.0
Step
2.0
note
2.0
CRAP 2.8
1 package App::SeismicUnixGui::sunix::model::elacheck;
2  
3 =head2 SYNOPSIS
4  
5 PERL PROGRAM NAME:
6  
7 AUTHOR: Juan Lorenzo (Perl module only)
8  
9 DATE:
10  
11 DESCRIPTION:
12  
13 Version:
14  
15 =head2 USE
16  
17 =head3 NOTES
18  
19 =head4 Examples
20  
21 =head2 SYNOPSIS
22  
23 =head3 SEISMIC UNIX NOTES
24 ELACHECK - get elastic coefficients of model
25  
26  
27  
28 elacheck file= (required modelfile)
29  
30  
31  
32 ____ interactive program _____________
33  
34  
35  
36  
37  
38  
39  
40  
41  
42 Author:: Andreas Rueger, Colorado School of Mines, 01/20/94
43  
44 get stiffness information for anisotropic model (interactive)
45  
46  
47  
48  
49  
50 =head2 User's notes (Juan Lorenzo)
51 untested
52  
53 =cut
54  
55  
56 =head2 CHANGES and their DATES
57  
58 =cut
59  
60 use Moose;
61 our $VERSION = '0.0.1';
62  
63  
64 =head2 Import packages
65  
66 =cut
67  
68 use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';
69  
70 use App::SeismicUnixGui::misc::SeismicUnix qw($in $out $on $go $to $suffix_ascii $off $suffix_su $suffix_bin);
71 use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config';
72  
73  
74 =head2 instantiation of packages
75  
76 =cut
77  
78 my $get = L_SU_global_constants->new();
79 my $Project = Project_config->new();
80 my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU();
81 my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN();
82 my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT();
83  
84 my $var = $get->var();
85 my $on = $var->{_on};
86 my $off = $var->{_off};
87 my $true = $var->{_true};
88 my $false = $var->{_false};
89 my $empty_string = $var->{_empty_string};
90  
91 =head2 Encapsulated
92 hash of private variables
93  
94 =cut
95  
96 my $elacheck = {
97 _file => '',
98 _Step => '',
99 _note => '',
100  
101 };
102  
103 =head2 sub Step
104  
105 collects switches and assembles bash instructions
106 by adding the program name
107  
108 =cut
109  
110 sub Step {
111  
112 $elacheck->{_Step} = 'elacheck'.$elacheck->{_Step};
113 return ( $elacheck->{_Step} );
114  
115 }
116  
117  
118 =head2 sub note
119  
120 collects switches and assembles bash instructions
121 by adding the program name
122  
123 =cut
124  
125 sub note {
126  
127 $elacheck->{_note} = 'elacheck'.$elacheck->{_note};
128 return ( $elacheck->{_note} );
129  
130 }
131  
132  
133  
134 =head2 sub clear
135  
136 =cut
137  
138 sub clear {
139  
140 $elacheck->{_file} = '';
141 $elacheck->{_Step} = '';
142 $elacheck->{_note} = '';
143 }
144  
145  
146 =head2 sub file
147  
148  
149 =cut
150  
151 sub file {
152  
153 my ( $self,$file ) = @_;
154 if ( $file ne $empty_string ) {
155  
156 $elacheck->{_file} = $file;
157 $elacheck->{_note} = $elacheck->{_note}.' file='.$elacheck->{_file};
158 $elacheck->{_Step} = $elacheck->{_Step}.' file='.$elacheck->{_file};
159  
160 } else {
161 print("elacheck, file, missing file,\n");
162 }
163 }
164  
165  
166 =head2 sub get_max_index
167  
168 max index = number of input variables -1
169
170 =cut
171
172 sub get_max_index {
173 my ($self) = @_;
174 my $max_index = 0;
175  
176 return($max_index);
177 }
178
179
180 1;