150 #include "rheolef/basis.h"
151 #include "rheolef/basis_raw.h"
152 #include "rheolef/iorheo.h"
153 #include "rheolef/reference_element_face_transformation.h"
158 cerr <<
"basis: usage:" << endl
162 <<
"{-dubiner|-monomial} "
164 <<
"{-ndof|-poly|-node|-node-side int} "
165 <<
"[-subdivide int] "
166 <<
"[-[no]clean] [-[no]execute] [-[no]verbose] "
170 int main(
int argc,
char**argv) {
174 if (argc == 1)
usage();
178 show_node_on_side = 2,
183 string approx =
"P1";
190 for (
int i = 1; i < argc; i++) {
193 if (strcmp (argv[i],
"-clean") == 0) cout <<
clean;
194 else if (strcmp (argv[i],
"-noclean") == 0) cout << noclean;
195 else if (strcmp (argv[i],
"-execute") == 0) cout << execute;
196 else if (strcmp (argv[i],
"-noexecute") == 0) cout << noexecute;
197 else if (strcmp (argv[i],
"-verbose") == 0) cout <<
verbose;
198 else if (strcmp (argv[i],
"-noverbose") == 0) cout << noverbose;
201 else if (strcmp (argv[i],
"-fem") == 0) raw =
false;
202 else if (strcmp (argv[i],
"-raw") == 0) raw =
true;
205 else if (strcmp (argv[i],
"-ndof") == 0) show = show_ndof;
206 else if (strcmp (argv[i],
"-nnod") == 0) show = show_nnod;
207 else if (strcmp (argv[i],
"-poly") == 0) show = show_poly;
208 else if (strcmp (argv[i],
"-node") == 0) show = show_node;
209 else if (strcmp (argv[i],
"-node-side") == 0) {
210 show = show_node_on_side;
211 if (i == argc-1) { cerr <<
"basis -node-side: option argument missing" << endl;
usage(); }
213 }
else if (strcmp (argv[i],
"-subdivide") == 0) {
214 if (i == argc-1) { cerr <<
"basis -subdivide: option argument missing" << endl;
usage(); }
215 nsub = atoi(argv[++i]);
216 cout << setsubdivide (nsub);
219 }
else if (argv[i][0] !=
'-' && strlen(argv[i]) == 1) {
223 }
else if (argv[i][0] !=
'-' && strlen(argv[i]) >= 2) {
226 cerr <<
"unexpected option `" << argv[i]<< endl;
230 if (approx[0] ==
'M' || approx[0] ==
'D') {
234 nsub = (hat_K.
dimension() == 1) ? 1000 : 40;
235 cout << setsubdivide (nsub);
241 if (show != show_poly) {
242 cerr <<
"basis: raw basis no not have nodes (HINT: use -poly option instead of -node)" << endl;
253 cout <<
b.ndof (hat_K) << endl;
256 cout <<
b.nnod (hat_K) << endl;
262 b.put_hat_node (cout, hat_K);
264 case show_node_on_side:
265 b.put_hat_node_on_side (cout, hat_K, sid);
int main(int argc, char **argv)
see the basis page for the full documentation
see the reference_element page for the full documentation
size_type dimension() const
basis_raw_basic< Float > basis_raw
This file is part of Rheolef.