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_cos(double x);
58 double do_cosd(double x);
59 double do_cosh(double x);
60 double do_d2r(double x);
61 double do_dim(double x, double y);
62 double do_dist(double x1, double y1, double x2, double y2);
63 double do_exp(double x);
64 double do_expm1(double x);
65 double do_fabs(double x);
66 double do_floor(double x);
67 double do_nint(double x);
68 double do_fmod(double x, double y);
69 double do_hypot(double x, double y);
70 double do_int(double x);
71 double do_log(double x);
72 double do_log10(double x);
73 double do_max(double x, double y);
74 double do_min(double x, double y);
75 double do_r2d(double x);
76 double do_rand(double xl, double xh);
77 double do_srand(double seed);
78 double do_rand_normal(double mean, double stddev);
79 double do_rand_lognormal(double mean, double stddev);
80 double do_rand_weibull(double alpha, double beta);
81 double do_sign(double x, double y);
82 double do_sin(double x);
83 double do_sind(double x);
84 double do_sinh(double x);
85 double do_sqrt(double x);
86 double do_tan(double x);
87 double do_tand(double x);
88 double do_tanh(double x);
89 double do_polarX(double rad, double ang);
90 double do_polarY(double rad, double ang);
91 double do_strtod(char *string);
92 double do_option(char *option, double value);
93 double do_word_count(char *string, char *delm);
94 double do_find_word(char *word, char *string, char *delm);
95 double do_lgamma(double val);
96 double do_juldayhms(double mon, double day, double year, double h, double mi, double se);
97 double do_julday(double mon, double day, double year);
98 double do_log1p(double x);
99 double do_rows(const array *arr);
100 double do_cols(const array *arr);
101 double do_time();
102
103 const char *do_dumpsym();
104 const char *do_dumpfunc();
105 const char *do_dumpvar();
106 const char *do_get_date();
107 const char *do_get_iso_date();
108 const char *do_get_time();
109 const char *do_get_temp_filename();
110
111 const char *do_dumpsym1(char *pre);
112 const char *do_dumpfunc1(char *pre);
113 const char *do_dumpvar1(char *pre);
114 const char *do_tolower(char *string);
115 const char *do_toupper(char *string);
116 const char *do_Units(char *type);
117 const char *do_file_to_string(char *filename);
118 const char *do_error(char *error_string);
119 const char *do_include_path(char *new_path);
120 const char *do_getenv(char *env);
121 const char *do_output(char *filename);
122 const char *do_append(char *filename);
123 const char *do_execute(char *string);
124 const char *do_rescan(char *string);
125
126 const char *do_if(double x);
127 const char *do_notif(double x);
128 const char *do_elseif(double x);
129 const char *do_switch(double x);
130 const char *do_case(double x);
131 const char *do_intout(double intval);
132 const char *do_tostring(double x);
133
134 const char *do_get_word(double n, char *string, char *delm);
135 const char *do_extract(char *string, char *begin, char *end);
136 const char *do_print_array(const array *my_array_data);
137
138 const char *do_execute(char *string);
139 const char *do_getenv(char *env);
140 const char *do_tolower(char *string);
141 const char *do_toupper(char *string);
142 const char *do_tostring(double x);
143 const char *do_output(char *filename);
144 const char *do_append(char *filename);
145 const char *do_error(char *error_string);
146 const char *do_get_date(void);
147 const char *do_get_iso_date(void);
148 const char *do_get_time(void);
149 const char *do_get_word(double n, char *string, char *delm);
150 const char *do_file_to_string(char *filename);
151 const char *do_extract(char *string, char *begin, char *end);
152 const char *do_include_path(char *new_path);
153 const char *do_intout(double intval);
154 const char *do_print_array(array *my_array_data);
155 const char *do_str_if(char *string);
156 const char *do_str_notif(char *string);
157 const char *do_str_elseif(char *string);
158 const char *do_delete(char *string);
159
160 #if defined(EXODUS_SUPPORT)
161 const char *do_exodus_info_range(char *filename, char *beg, char *end);
162 const char *do_exodus_info(char *filename, char *prefix);
163 const char *do_exodus_meta(char *filename);
164 #endif
165
166 array *do_csv_array(const char *filename, double skip);
167 array *do_csv_array1(const char *filename);
168 array *do_csv_array2(const char *filename, const char *comment);
169 array *do_make_array(double rows, double cols);
170 array *do_identity(double size);
171 array *do_transpose(const array *a);
172 array *do_array_from_string(const char *string, const char *delm);
173 } // namespace SEAMS
174
175 #endif
SEAMS::do_file_to_string
const char * do_file_to_string(char *filename)
Definition: apr_builtin.cc:770
SEAMS::do_nint
double do_nint(double x)
Definition: apr_builtin.cc:158
SEAMS::do_cols
double do_cols(const array *arr)
Definition: apr_builtin.cc:597
SEAMS::do_word_count
double do_word_count(char *string, char *delm)
Definition: apr_builtin.cc:740
SEAMS::do_if
const char * do_if(double x)
Definition: apr_builtin.cc:916
SEAMS::do_dim
double do_dim(double x, double y)
Definition: apr_builtin.cc:401
SEAMS::do_polarX
double do_polarX(double rad, double ang)
Definition: apr_builtin.cc:512
SEAMS::do_find_word
double do_find_word(char *word, char *string, char *delm)
Definition: apr_builtin.cc:745
SEAMS::do_dumpsym1
const char * do_dumpsym1(char *pre)
Definition: apr_builtin.cc:828
SEAMS::do_Units
const char * do_Units(char *type)
Definition: apr_units.cc:332
SEAMS::do_srand
double do_srand(double seed)
Definition: apr_builtin.cc:362
SEAMS::do_r2d
double do_r2d(double x)
Definition: apr_builtin.cc:247
SEAMS::do_array_from_string
array * do_array_from_string(const char *string, const char *delm)
Definition: apr_builtin.cc:1186
SEAMS::do_max
double do_max(double x, double y)
Definition: apr_builtin.cc:229
SEAMS::do_tan
double do_tan(double x)
Definition: apr_builtin.cc:289
SEAMS::do_elseif
const char * do_elseif(double x)
Definition: apr_builtin.cc:929
SEAMS::do_fmod
double do_fmod(double x, double y)
Definition: apr_builtin.cc:461
SEAMS::do_make_array
array * do_make_array(double rows, double cols)
Definition: apr_builtin.cc:1058
SEAMS::do_csv_array2
array * do_csv_array2(const char *filename, const char *comment)
Definition: apr_builtin.cc:1139
SEAMS::do_output
const char * do_output(char *filename)
Definition: apr_builtin.cc:685
SEAMS::do_dumpfunc
const char * do_dumpfunc()
Definition: apr_builtin.cc:816
SEAMS::do_toupper
const char * do_toupper(char *string)
Definition: apr_builtin.cc:657
SEAMS::do_error
const char * do_error(char *error_string)
Definition: apr_builtin.cc:1012
SEAMS::do_print_array
const char * do_print_array(const array *my_array_data)
Definition: apr_builtin.cc:1021
SEAMS::do_min
double do_min(double x, double y)
Definition: apr_builtin.cc:237
SEAMS::do_sinh
double do_sinh(double x)
Definition: apr_builtin.cc:485
SEAMS::do_asin
double do_asin(double x)
Definition: apr_builtin.cc:337
SEAMS::do_exp
double do_exp(double x)
Definition: apr_builtin.cc:433
SEAMS::do_execute
const char * do_execute(char *string)
Definition: apr_builtin.cc:904
SEAMS::do_rand_normal
double do_rand_normal(double mean, double stddev)
Definition: apr_builtin.cc:375
SEAMS::do_acosh
double do_acosh(double x)
Definition: apr_builtin.cc:565
SEAMS::do_intout
const char * do_intout(double intval)
Definition: apr_builtin.cc:883
SEAMS::do_transpose
array * do_transpose(const array *a)
Definition: apr_builtin.cc:1076
SEAMS::do_log1p
double do_log1p(double x)
Definition: apr_builtin.cc:563
SEAMS::do_sin
double do_sin(double x)
Definition: apr_builtin.cc:257
SEAMS::do_asind
double do_asind(double x)
Definition: apr_builtin.cc:329
SEAMS::do_get_temp_filename
const char * do_get_temp_filename()
Definition: apr_builtin.cc:1005
SEAMS::do_rand_weibull
double do_rand_weibull(double alpha, double beta)
Definition: apr_builtin.cc:387
SEAMS::do_acos
double do_acos(double x)
Definition: apr_builtin.cc:353
SEAMS::do_case
const char * do_case(double x)
Definition: apr_builtin.cc:965
SEAMS::do_sign
double do_sign(double x, double y)
Definition: apr_builtin.cc:393
SEAMS::do_lgamma
double do_lgamma(double val)
Definition: apr_builtin.cc:518
SEAMS::do_acosd
double do_acosd(double x)
Definition: apr_builtin.cc:345
SEAMS::do_delete
const char * do_delete(char *string)
Definition: apr_builtin.cc:1051
SEAMS::do_get_iso_date
const char * do_get_iso_date()
Definition: apr_builtin.cc:615
SEAMS::do_rand_lognormal
double do_rand_lognormal(double mean, double stddev)
Definition: apr_builtin.cc:381
SEAMS::do_csv_array1
array * do_csv_array1(const char *filename)
Definition: apr_builtin.cc:1089
SEAMS::do_get_word
const char * do_get_word(double n, char *string, char *delm)
Definition: apr_builtin.cc:757
SEAMS::do_rows
double do_rows(const array *arr)
Definition: apr_builtin.cc:595
SEAMS::do_atan2d
double do_atan2d(double x, double y)
Definition: apr_builtin.cc:297
SEAMS::do_cos
double do_cos(double x)
Definition: apr_builtin.cc:273
SEAMS::do_csv_array
array * do_csv_array(const char *filename, double skip)
Definition: apr_builtin.cc:1091
SEAMS::do_notif
const char * do_notif(double x)
Definition: apr_builtin.cc:923
SEAMS::do_option
double do_option(char *option, double value)
Definition: apr_builtin.cc:846
SEAMS::do_ceil
double do_ceil(double x)
Definition: apr_builtin.cc:417
SEAMS::do_str_if
const char * do_str_if(char *string)
Definition: apr_builtin.cc:935
SEAMS::do_hypot
double do_hypot(double x, double y)
Definition: apr_builtin.cc:206
SEAMS::do_str_elseif
const char * do_str_elseif(char *string)
Definition: apr_builtin.cc:951
SEAMS::do_angle
double do_angle(double x1, double y1, double x2, double y2)
Definition: apr_builtin.cc:180
SEAMS::do_sqrt
double do_sqrt(double x)
Definition: apr_builtin.cc:493
SEAMS::do_strtod
double do_strtod(char *string)
Definition: apr_builtin.cc:802
SEAMS::do_atand
double do_atand(double x)
Definition: apr_builtin.cc:313
SEAMS::do_atan
double do_atan(double x)
Definition: apr_builtin.cc:321
SEAMS::do_asinh
double do_asinh(double x)
Definition: apr_builtin.cc:574
SEAMS::do_dumpvar
const char * do_dumpvar()
Definition: apr_builtin.cc:822
SEAMS::anonymous_namespace{apr_units.cc}::comment
std::string & comment()
Definition: apr_units.cc:50
SEAMS::do_expm1
double do_expm1(double x)
Definition: apr_builtin.cc:441
SEAMS::do_tand
double do_tand(double x)
Definition: apr_builtin.cc:281
SEAMS::do_dumpsym
const char * do_dumpsym()
Definition: apr_builtin.cc:810
SEAMS::do_get_time
const char * do_get_time()
Definition: apr_builtin.cc:630
SEAMS::do_rescan
const char * do_rescan(char *string)
Definition: apr_builtin.cc:910
SEAMS::do_floor
double do_floor(double x)
Definition: apr_builtin.cc:453
SEAMS::do_cosh
double do_cosh(double x)
Definition: apr_builtin.cc:425
SEAMS::do_tostring
const char * do_tostring(double x)
Definition: apr_builtin.cc:669
SEAMS::do_julday
double do_julday(double mon, double day, double year)
Definition: apr_builtin.cc:558
SEAMS::do_polarY
double do_polarY(double rad, double ang)
Definition: apr_builtin.cc:514
SEAMS::do_getenv
const char * do_getenv(char *env)
Definition: apr_builtin.cc:787
SEAMS::do_rand
double do_rand(double xl, double xh)
Definition: apr_builtin.cc:369
SEAMS::do_juldayhms
double do_juldayhms(double mon, double day, double year, double h, double mi, double se)
Definition: apr_builtin.cc:532
SEAMS::do_cosd
double do_cosd(double x)
Definition: apr_builtin.cc:265
SEAMS::do_dumpfunc1
const char * do_dumpfunc1(char *pre)
Definition: apr_builtin.cc:834
SEAMS::do_fabs
double do_fabs(double x)
Definition: apr_builtin.cc:409
SEAMS::do_angled
double do_angled(double x1, double y1, double x2, double y2)
Definition: apr_builtin.cc:192
SEAMS::do_atan2
double do_atan2(double x, double y)
Definition: apr_builtin.cc:305
SEAMS::do_tolower
const char * do_tolower(char *string)
Definition: apr_builtin.cc:645
SEAMS::do_identity
array * do_identity(double size)
Definition: apr_builtin.cc:1064
SEAMS::do_include_path
const char * do_include_path(char *new_path)
Definition: apr_builtin.cc:877
SEAMS::do_time
double do_time()
Definition: apr_builtin.cc:142
SEAMS::do_log10
double do_log10(double x)
Definition: apr_builtin.cc:477
SEAMS::do_append
const char * do_append(char *filename)
Definition: apr_builtin.cc:712
SEAMS
Definition: apr_aprepro.cc:57
SEAMS::do_sind
double do_sind(double x)
Definition: apr_builtin.cc:249
SEAMS::do_extract
const char * do_extract(char *string, char *begin, char *end)
Definition: apr_builtin.cc:971
SEAMS::do_dumpvar1
const char * do_dumpvar1(char *pre)
Definition: apr_builtin.cc:840
SEAMS::do_d2r
double do_d2r(double x)
Definition: apr_builtin.cc:245
SEAMS::do_switch
const char * do_switch(double x)
Definition: apr_builtin.cc:959
SEAMS::do_get_date
const char * do_get_date()
Definition: apr_builtin.cc:600
SEAMS::do_atanh
double do_atanh(double x)
Definition: apr_builtin.cc:587
SEAMS::do_dist
double do_dist(double x1, double y1, double x2, double y2)
Definition: apr_builtin.cc:169
SEAMS::do_log
double do_log(double x)
Definition: apr_builtin.cc:469
SEAMS::do_int
double do_int(double x)
Definition: apr_builtin.cc:149
SEAMS::do_str_notif
const char * do_str_notif(char *string)
Definition: apr_builtin.cc:943
SEAMS::do_tanh
double do_tanh(double x)
Definition: apr_builtin.cc:504