Aprepro 5.0x

apr_builtin.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2014-2017 National Technology & Engineering Solutions
3 * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
4 * NTESS, the U.S. Government retains certain rights in this software.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:
9 *
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * * Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials provided
16 * with the distribution.
17 *
18 * * Neither the name of NTESS nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 *
34 */
35 #ifndef APR_BUILTIN_H
36 #define APR_BUILTIN_H
37
38 #include <cstdio>
39
40 namespace SEAMS {
41 struct array;
42
43 double do_acos(double x);
44 double do_acosd(double x);
45 double do_acosh(double x);
46 double do_angle(double x1, double y1, double x2, double y2);
47 double do_angled(double x1, double y1, double x2, double y2);
48 double do_asin(double x);
49 double do_asind(double x);
50 double do_asinh(double x);
51 double do_atan(double x);
52 double do_atan2(double x, double y);
53 double do_atan2d(double x, double y);
54 double do_atand(double x);
55 double do_atanh(double x);
56 double do_ceil(double x);
57 double do_cbrt(double x);
58 double do_cos(double x);
59 double do_cosd(double x);
60 double do_cosh(double x);
61 double do_d2r(double x);
62 double do_dim(double x, double y);
63 double do_dist(double x1, double y1, double x2, double y2);
64 double do_erf(double x);
65 double do_erfc(double x);
66 double do_exp(double x);
67 double do_expm1(double x);
68 double do_fabs(double x);
69 double do_floor(double x);
70 double do_nint(double x);
71 double do_fmod(double x, double y);
72 double do_hypot(double x, double y);
73 double do_int(double x);
74 double do_log(double x);
75 double do_log10(double x);
76 double do_max(double x, double y);
77 double do_min(double x, double y);
78 double do_pow(double x, double y);
79 double do_r2d(double x);
80 double do_rand(double xl, double xh);
81 double do_srand(double seed);
82 double do_rand_normal(double mean, double stddev);
83 double do_rand_lognormal(double mean, double stddev);
84 double do_rand_weibull(double alpha, double beta);
85 double do_sign(double x, double y);
86 double do_sin(double x);
87 double do_sind(double x);
88 double do_sinh(double x);
89 double do_sqrt(double x);
90 double do_tan(double x);
91 double do_tand(double x);
92 double do_tanh(double x);
93 double do_polarX(double rad, double ang);
94 double do_polarY(double rad, double ang);
95 double do_strtod(char *string);
96 double do_option(char *option, double value);
97 double do_word_count(char *string, char *delm);
98 double do_find_word(char *word, char *string, char *delm);
99 double do_lgamma(double val);
100 double do_tgamma(double val);
101 double do_juldayhms(double mon, double day, double year, double h, double mi, double se);
102 double do_julday(double mon, double day, double year);
103 double do_log1p(double x);
104 double do_rows(const array *arr);
105 double do_cols(const array *arr);
106 double do_time();
107
108 const char *do_dumpsym();
109 const char *do_dumpfunc();
110 const char *do_dumpvar();
111 const char *do_get_date();
112 const char *do_get_iso_date();
113 const char *do_get_time();
114 const char *do_get_temp_filename();
115
116 const char *do_dumpsym1(char *pre);
117 const char *do_dumpfunc1(char *pre);
118 const char *do_dumpvar1(char *pre);
119 const char *do_tolower(char *string);
120 const char *do_toupper(char *string);
121 const char *do_Units(char *type);
122 const char *do_file_to_string(char *filename);
123 const char *do_error(char *error_string);
124 const char *do_include_path(char *new_path);
125 const char *do_getenv(char *env);
126 const char *do_output(char *filename);
127 const char *do_append(char *filename);
128 const char *do_execute(char *string);
129 const char *do_rescan(char *string);
130
131 const char *do_if(double x);
132 const char *do_notif(double x);
133 const char *do_elseif(double x);
134 const char *do_switch(double x);
135 const char *do_case(double x);
136 const char *do_intout(double intval);
137 const char *do_tostring(double x);
138
139 const char *do_get_word(double n, char *string, char *delm);
140 const char *do_extract(char *string, char *begin, char *end);
141 const char *do_print_array(const array *my_array_data);
142
143 const char *do_execute(char *string);
144 const char *do_getenv(char *env);
145 const char *do_tolower(char *string);
146 const char *do_toupper(char *string);
147 const char *do_tostring(double x);
148 const char *do_output(char *filename);
149 const char *do_append(char *filename);
150 const char *do_error(char *error_string);
151 const char *do_get_date(void);
152 const char *do_get_iso_date(void);
153 const char *do_get_time(void);
154 const char *do_get_word(double n, char *string, char *delm);
155 const char *do_file_to_string(char *filename);
156 const char *do_extract(char *string, char *begin, char *end);
157 const char *do_include_path(char *new_path);
158 const char *do_intout(double intval);
159 const char *do_print_array(array *my_array_data);
160 const char *do_str_if(char *string);
161 const char *do_str_notif(char *string);
162 const char *do_str_elseif(char *string);
163 const char *do_delete(char *string);
164
165 #if defined(EXODUS_SUPPORT)
166 const char *do_exodus_info_range(char *filename, char *beg, char *end);
167 const char *do_exodus_info(char *filename, char *prefix);
168 const char *do_exodus_meta(char *filename);
169 #endif
170
171 array *do_csv_array(const char *filename, double skip);
172 array *do_csv_array1(const char *filename);
173 array *do_csv_array2(const char *filename, const char *comment);
174 array *do_make_array(double rows, double cols);
175 array *do_make_array_init(double rows, double cols, double init);
176 array *do_linear_array(double init, double final, double count);
177 array *do_identity(double size);
178 array *do_transpose(const array *a);
179 array *do_array_from_string(const char *string, const char *delm);
180 } // namespace SEAMS
181
182 #endif
SEAMS::do_tanh
double do_tanh(double x)
Definition: apr_builtin.cc:465
SEAMS::do_atan2
double do_atan2(double x, double y)
Definition: apr_builtin.cc:255
SEAMS::do_getenv
const char * do_getenv(char *env)
Definition: apr_builtin.cc:700
SEAMS
Definition: apr_aprepro.cc:68
SEAMS::do_sinh
double do_sinh(double x)
Definition: apr_builtin.cc:435
SEAMS::do_r2d
double do_r2d(double x)
Definition: apr_builtin.cc:197
SEAMS::do_acosd
double do_acosd(double x)
Definition: apr_builtin.cc:295
SEAMS::do_Units
const char * do_Units(char *type)
Definition: apr_units.cc:332
SEAMS::do_str_if
const char * do_str_if(char *string)
Definition: apr_builtin.cc:848
SEAMS::do_word_count
double do_word_count(char *string, char *delm)
Definition: apr_builtin.cc:653
SEAMS::do_str_elseif
const char * do_str_elseif(char *string)
Definition: apr_builtin.cc:864
SEAMS::do_error
const char * do_error(char *error_string)
Definition: apr_builtin.cc:922
SEAMS::do_csv_array1
array * do_csv_array1(const char *filename)
Definition: apr_builtin.cc:1023
SEAMS::do_julday
double do_julday(double mon, double day, double year)
Definition: apr_builtin.cc:507
SEAMS::do_append
const char * do_append(char *filename)
Definition: apr_builtin.cc:631
SEAMS::do_tand
double do_tand(double x)
Definition: apr_builtin.cc:231
SEAMS::do_intout
const char * do_intout(double intval)
Definition: apr_builtin.cc:796
SEAMS::do_rand_normal
double do_rand_normal(double mean, double stddev)
Definition: apr_builtin.cc:325
SEAMS::do_identity
array * do_identity(double size)
Definition: apr_builtin.cc:984
SEAMS::do_rescan
const char * do_rescan(char *string)
Definition: apr_builtin.cc:823
SEAMS::do_linear_array
array * do_linear_array(double init, double final, double count)
Definition: apr_builtin.cc:996
SEAMS::do_erf
double do_erf(double x)
Definition: apr_builtin.cc:399
SEAMS::do_toupper
const char * do_toupper(char *string)
Definition: apr_builtin.cc:582
SEAMS::do_dist
double do_dist(double x1, double y1, double x2, double y2)
Definition: apr_builtin.cc:138
SEAMS::do_notif
const char * do_notif(double x)
Definition: apr_builtin.cc:836
SEAMS::do_asinh
double do_asinh(double x)
Definition: apr_builtin.cc:516
SEAMS::do_srand
double do_srand(double seed)
Definition: apr_builtin.cc:312
SEAMS::do_print_array
const char * do_print_array(const array *my_array_data)
Definition: apr_builtin.cc:931
SEAMS::do_switch
const char * do_switch(double x)
Definition: apr_builtin.cc:872
SEAMS::do_asind
double do_asind(double x)
Definition: apr_builtin.cc:279
SEAMS::do_rand_weibull
double do_rand_weibull(double alpha, double beta)
Definition: apr_builtin.cc:337
SEAMS::do_option
double do_option(char *option, double value)
Definition: apr_builtin.cc:759
SEAMS::do_if
const char * do_if(double x)
Definition: apr_builtin.cc:829
SEAMS::do_delete
const char * do_delete(char *string)
Definition: apr_builtin.cc:961
SEAMS::do_angled
double do_angled(double x1, double y1, double x2, double y2)
Definition: apr_builtin.cc:161
SEAMS::do_make_array
array * do_make_array(double rows, double cols)
Definition: apr_builtin.cc:968
SEAMS::do_tgamma
double do_tgamma(double val)
Definition: apr_builtin.cc:479
SEAMS::do_expm1
double do_expm1(double x)
Definition: apr_builtin.cc:391
SEAMS::do_elseif
const char * do_elseif(double x)
Definition: apr_builtin.cc:842
SEAMS::do_cols
double do_cols(const array *arr)
Definition: apr_builtin.cc:522
SEAMS::do_dumpvar1
const char * do_dumpvar1(char *pre)
Definition: apr_builtin.cc:753
SEAMS::do_sin
double do_sin(double x)
Definition: apr_builtin.cc:207
SEAMS::do_get_temp_filename
const char * do_get_temp_filename()
Definition: apr_builtin.cc:915
SEAMS::do_dim
double do_dim(double x, double y)
Definition: apr_builtin.cc:351
SEAMS::do_asin
double do_asin(double x)
Definition: apr_builtin.cc:287
SEAMS::do_dumpsym
const char * do_dumpsym()
Definition: apr_builtin.cc:723
SEAMS::do_atand
double do_atand(double x)
Definition: apr_builtin.cc:263
SEAMS::do_get_date
const char * do_get_date()
Definition: apr_builtin.cc:525
SEAMS::do_acosh
double do_acosh(double x)
Definition: apr_builtin.cc:514
SEAMS::do_file_to_string
const char * do_file_to_string(char *filename)
Definition: apr_builtin.cc:683
SEAMS::do_dumpvar
const char * do_dumpvar()
Definition: apr_builtin.cc:735
SEAMS::do_atan2d
double do_atan2d(double x, double y)
Definition: apr_builtin.cc:247
SEAMS::do_exp
double do_exp(double x)
Definition: apr_builtin.cc:383
SEAMS::do_atan
double do_atan(double x)
Definition: apr_builtin.cc:271
SEAMS::do_sind
double do_sind(double x)
Definition: apr_builtin.cc:199
SEAMS::do_tolower
const char * do_tolower(char *string)
Definition: apr_builtin.cc:570
SEAMS::do_strtod
double do_strtod(char *string)
Definition: apr_builtin.cc:715
SEAMS::do_transpose
array * do_transpose(const array *a)
Definition: apr_builtin.cc:1010
SEAMS::do_cbrt
double do_cbrt(double x)
Definition: apr_builtin.cc:454
SEAMS::do_juldayhms
double do_juldayhms(double mon, double day, double year, double h, double mi, double se)
Definition: apr_builtin.cc:481
SEAMS::do_pow
double do_pow(double x, double y)
Definition: apr_builtin.cc:173
SEAMS::do_d2r
double do_d2r(double x)
Definition: apr_builtin.cc:195
SEAMS::do_log
double do_log(double x)
Definition: apr_builtin.cc:419
SEAMS::do_rows
double do_rows(const array *arr)
Definition: apr_builtin.cc:520
SEAMS::do_array_from_string
array * do_array_from_string(const char *string, const char *delm)
Definition: apr_builtin.cc:1120
SEAMS::do_hypot
double do_hypot(double x, double y)
Definition: apr_builtin.cc:171
SEAMS::do_cosh
double do_cosh(double x)
Definition: apr_builtin.cc:375
SEAMS::do_erfc
double do_erfc(double x)
Definition: apr_builtin.cc:401
SEAMS::do_max
double do_max(double x, double y)
Definition: apr_builtin.cc:179
SEAMS::do_nint
double do_nint(double x)
Definition: apr_builtin.cc:127
SEAMS::do_acos
double do_acos(double x)
Definition: apr_builtin.cc:303
SEAMS::do_make_array_init
array * do_make_array_init(double rows, double cols, double init)
Definition: apr_builtin.cc:974
SEAMS::anonymous_namespace{apr_units.cc}::comment
std::string & comment()
Definition: apr_units.cc:50
SEAMS::do_fabs
double do_fabs(double x)
Definition: apr_builtin.cc:359
SEAMS::do_atanh
double do_atanh(double x)
Definition: apr_builtin.cc:518
SEAMS::do_find_word
double do_find_word(char *word, char *string, char *delm)
Definition: apr_builtin.cc:658
SEAMS::do_cosd
double do_cosd(double x)
Definition: apr_builtin.cc:215
SEAMS::do_str_notif
const char * do_str_notif(char *string)
Definition: apr_builtin.cc:856
SEAMS::do_dumpsym1
const char * do_dumpsym1(char *pre)
Definition: apr_builtin.cc:741
SEAMS::do_cos
double do_cos(double x)
Definition: apr_builtin.cc:223
SEAMS::do_get_time
const char * do_get_time()
Definition: apr_builtin.cc:555
SEAMS::do_log10
double do_log10(double x)
Definition: apr_builtin.cc:427
SEAMS::do_output
const char * do_output(char *filename)
Definition: apr_builtin.cc:610
SEAMS::do_floor
double do_floor(double x)
Definition: apr_builtin.cc:403
SEAMS::do_sqrt
double do_sqrt(double x)
Definition: apr_builtin.cc:443
SEAMS::do_dumpfunc
const char * do_dumpfunc()
Definition: apr_builtin.cc:729
SEAMS::do_rand_lognormal
double do_rand_lognormal(double mean, double stddev)
Definition: apr_builtin.cc:331
SEAMS::do_include_path
const char * do_include_path(char *new_path)
Definition: apr_builtin.cc:790
SEAMS::do_min
double do_min(double x, double y)
Definition: apr_builtin.cc:187
SEAMS::do_int
double do_int(double x)
Definition: apr_builtin.cc:118
SEAMS::do_lgamma
double do_lgamma(double val)
Definition: apr_builtin.cc:477
SEAMS::do_ceil
double do_ceil(double x)
Definition: apr_builtin.cc:367
SEAMS::do_csv_array2
array * do_csv_array2(const char *filename, const char *comment)
Definition: apr_builtin.cc:1073
SEAMS::do_angle
double do_angle(double x1, double y1, double x2, double y2)
Definition: apr_builtin.cc:149
SEAMS::do_get_iso_date
const char * do_get_iso_date()
Definition: apr_builtin.cc:540
SEAMS::do_sign
double do_sign(double x, double y)
Definition: apr_builtin.cc:343
SEAMS::do_time
double do_time()
Definition: apr_builtin.cc:111
SEAMS::do_csv_array
array * do_csv_array(const char *filename, double skip)
Definition: apr_builtin.cc:1025
SEAMS::do_tostring
const char * do_tostring(double x)
Definition: apr_builtin.cc:594
init
Definition: init_structs.h:42
SEAMS::do_polarX
double do_polarX(double rad, double ang)
Definition: apr_builtin.cc:473
SEAMS::do_tan
double do_tan(double x)
Definition: apr_builtin.cc:239
SEAMS::do_polarY
double do_polarY(double rad, double ang)
Definition: apr_builtin.cc:475
SEAMS::do_dumpfunc1
const char * do_dumpfunc1(char *pre)
Definition: apr_builtin.cc:747
SEAMS::do_fmod
double do_fmod(double x, double y)
Definition: apr_builtin.cc:411
SEAMS::do_rand
double do_rand(double xl, double xh)
Definition: apr_builtin.cc:319
SEAMS::do_execute
const char * do_execute(char *string)
Definition: apr_builtin.cc:817
SEAMS::do_case
const char * do_case(double x)
Definition: apr_builtin.cc:878
SEAMS::do_get_word
const char * do_get_word(double n, char *string, char *delm)
Definition: apr_builtin.cc:670
SEAMS::do_log1p
double do_log1p(double x)
Definition: apr_builtin.cc:512
SEAMS::do_extract
const char * do_extract(char *string, char *begin, char *end)
Definition: apr_builtin.cc:884