151#include "rheolef/basis.h"
152#include "rheolef/basis_raw.h"
153#include "rheolef/iorheo.h"
154#include "rheolef/reference_element_face_transformation.h"
159 cerr <<
"basis: usage:" << endl
163 <<
"{-dubiner|-monomial} "
165 <<
"{-ndof|-poly|-node|-node-side int} "
166 <<
"[-subdivide int] "
167 <<
"[-[no]clean] [-[no]execute] [-[no]verbose] "
171int main(
int argc,
char**argv) {
175 if (argc == 1)
usage();
179 show_node_on_side = 2,
184 string approx =
"P1";
191 for (
int i = 1; i < argc; i++) {
194 if (strcmp (argv[i],
"-clean") == 0) cout <<
clean;
195 else if (strcmp (argv[i],
"-noclean") == 0) cout << noclean;
196 else if (strcmp (argv[i],
"-execute") == 0) cout << execute;
197 else if (strcmp (argv[i],
"-noexecute") == 0) cout << noexecute;
198 else if (strcmp (argv[i],
"-verbose") == 0) cout <<
verbose;
199 else if (strcmp (argv[i],
"-noverbose") == 0) cout << noverbose;
202 else if (strcmp (argv[i],
"-fem") == 0) raw =
false;
203 else if (strcmp (argv[i],
"-raw") == 0) raw =
true;
206 else if (strcmp (argv[i],
"-ndof") == 0) show = show_ndof;
207 else if (strcmp (argv[i],
"-nnod") == 0) show = show_nnod;
208 else if (strcmp (argv[i],
"-poly") == 0) show = show_poly;
209 else if (strcmp (argv[i],
"-node") == 0) show = show_node;
210 else if (strcmp (argv[i],
"-node-side") == 0) {
211 show = show_node_on_side;
212 if (i == argc-1) { cerr <<
"basis -node-side: option argument missing" << endl;
usage(); }
214 }
else if (strcmp (argv[i],
"-subdivide") == 0) {
215 if (i == argc-1) { cerr <<
"basis -subdivide: option argument missing" << endl;
usage(); }
216 nsub = atoi(argv[++i]);
217 cout << setsubdivide (nsub);
220 }
else if (argv[i][0] !=
'-' && strlen(argv[i]) == 1) {
224 }
else if (argv[i][0] !=
'-' && strlen(argv[i]) >= 2) {
227 cerr <<
"unexpected option `" << argv[i]<< endl;
231 if (approx[0] ==
'M' || approx[0] ==
'D') {
235 nsub = (hat_K.
dimension() == 1) ? 1000 : 40;
236 cout << setsubdivide (nsub);
242 if (show != show_poly) {
243 cerr <<
"basis: raw basis no not have nodes (HINT: use -poly option instead of -node)" << endl;
246 basis_raw
b (approx);
254 cout <<
b.ndof (hat_K) << endl;
257 cout <<
b.nnod (hat_K) << endl;
263 b.put_hat_node (cout, hat_K);
265 case show_node_on_side:
266 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
This file is part of Rheolef.