GetFEM  5.6
getfem_generic_assembly_tree.h
Go to the documentation of this file.
1 /* -*- c++ -*- (enables emacs c++ mode) */
2 /*===========================================================================
3 
4  Copyright (C) 2013-2026 Yves Renard
5 
6  This file is a part of GetFEM
7 
8  GetFEM is free software; you can redistribute it and/or modify it
9  under the terms of the GNU Lesser General Public License as published
10  by the Free Software Foundation; either version 3 of the License, or
11  (at your option) any later version along with the GCC Runtime Library
12  Exception either version 3.1 or (at your option) any later version.
13  This program is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16  License and GCC Runtime Library Exception for more details.
17  You should have received a copy of the GNU Lesser General Public License
18  along with this program. If not, see https://www.gnu.org/licenses/.
19 
20  As a special exception, you may use this file as it is a part of a free
21  software library without restriction. Specifically, if other files
22  instantiate templates or use macros or inline functions from this file,
23  or you compile this file and link it with other files to produce an
24  executable, this file does not by itself cause the resulting executable
25  to be covered by the GNU Lesser General Public License. This exception
26  does not however invalidate any other reasons why the executable file
27  might be covered by the GNU Lesser General Public License.
28 
29 ===========================================================================*/
30 
31 /** @file getfem_generic_assembly_tree.h
32  @author Yves Renard <Yves.Renard@insa-lyon.fr>
33  @date November 18, 2013.
34  @brief Definition of the syntax tree and basic operations on it.
35  Internal header for the generic assembly language part.
36  */
37 
38 
39 #ifndef GETFEM_GENERIC_ASSEMBLY_TREE_H__
40 #define GETFEM_GENERIC_ASSEMBLY_TREE_H__
41 
43 #include "getfem/getfem_models.h"
44 #include "gmm/gmm_blas.h"
45 #include <iomanip>
46 #include "getfem/getfem_omp.h"
47 #include "getfem/dal_singleton.h"
48 #include "getfem/bgeot_rtree.h"
51 #ifndef _WIN32
52 extern "C"{
53 #include <unistd.h>
54 }
55 #endif
56 
57 #define GA_DEBUG_ASSERT(a, b) GMM_ASSERT1(a, b)
58 // #define GA_DEBUG_ASSERT(a, b)
59 
60 #if 1
61 # define GA_TIC
62 # define GA_TOC(a)
63 # define GA_TOCTIC(a)
64 #else
65 # define GA_TIC scalar_type _ga_time_ = gmm::uclock_sec();
66 # define GA_TOC(a) { cout <<(a)<<" : "<<gmm::uclock_sec()-_ga_time_<< endl; }
67 # define GA_TOCTIC(a) { GA_TOC(a); _ga_time_ = gmm::uclock_sec(); }
68 #endif
69 
70 namespace getfem {
71 
72  // Basic token types (basic language components)
73  enum GA_TOKEN_TYPE {
74  GA_INVALID = 0, // invalid token
75  GA_END, // string end
76  GA_NAME, // A variable or user defined nonlinear function name
77  GA_SCALAR, // A real number
78  GA_PLUS, // '+'
79  GA_MINUS, // '-'
80  GA_UNARY_MINUS, // '-'
81  GA_MULT, // '*'
82  GA_DIV, // '/'
83  GA_COLON, // ':'
84  GA_QUOTE, // ''' transpose
85  GA_COLON_EQ, // ':=' macro def
86  GA_DEF, // 'Def' macro def
87  GA_SYM, // 'Sym(M)' operator
88  GA_SKEW, // 'Skew(M)' operator
89  GA_TRACE, // 'Trace(M)' operator
90  GA_DEVIATOR, // 'Deviator' operator
91  GA_INTERPOLATE, // 'Interpolate' operation
92  GA_INTERPOLATE_FILTER, // 'Interpolate_filter' operation
93  GA_INTERPOLATE_DERIVATIVE, // 'Interpolate_derivative' operation
94  GA_ELEMENTARY, // 'Elementary' operation (operation at the element level)
95  GA_SECONDARY_DOMAIN, // For the integration on a product of two domains
96  GA_XFEM_PLUS, // Evaluation on the + side of a level-set for fem_level_set
97  GA_XFEM_MINUS, // Evaluation on the - side of a level-set for fem_level_set
98  GA_PRINT, // 'Print' Print the tensor
99  GA_DOT, // '.'
100  GA_DOTMULT, // '.*' componentwise multiplication
101  GA_DOTDIV, // './' componentwise division
102  GA_TMULT, // '@' tensor product
103  GA_COMMA, // ','
104  GA_DCOMMA, // ',,'
105  GA_SEMICOLON, // ';'
106  GA_DSEMICOLON, // ';;'
107  GA_LPAR, // '('
108  GA_RPAR, // ')'
109  GA_LBRACKET, // '['
110  GA_RBRACKET, // ']'
111  GA_NB_TOKEN_TYPE
112  };
113 
114  // Detects Grad_, Hess_ or Div_
115  size_type ga_parse_prefix_operator(std::string &name);
116  // Detects Test_ and Test2_
117  size_type ga_parse_prefix_test(std::string &name);
118 
119  // Types of nodes for the syntax tree
120  enum GA_NODE_TYPE {
121  GA_NODE_VOID = 0,
122  GA_NODE_OP,
123  GA_NODE_PREDEF_FUNC,
124  GA_NODE_SPEC_FUNC,
125  GA_NODE_OPERATOR,
126  GA_NODE_CONSTANT,
127  GA_NODE_NAME,
128  GA_NODE_MACRO_PARAM,
129  GA_NODE_PARAMS,
130  GA_NODE_RESHAPE,
131  GA_NODE_CROSS_PRODUCT,
132  GA_NODE_SWAP_IND,
133  GA_NODE_IND_MOVE_LAST,
134  GA_NODE_CONTRACT,
135  GA_NODE_ALLINDICES,
136  GA_NODE_C_MATRIX,
137  GA_NODE_X,
138  GA_NODE_ELT_SIZE,
139  GA_NODE_ELT_K,
140  GA_NODE_ELT_B,
141  GA_NODE_ELT_CURVATURE,
142  GA_NODE_NORMAL,
143  GA_NODE_VAL,
144  GA_NODE_GRAD,
145  GA_NODE_HESS,
146  GA_NODE_DIVERG,
147  GA_NODE_VAL_TEST,
148  GA_NODE_GRAD_TEST,
149  GA_NODE_HESS_TEST,
150  GA_NODE_DIVERG_TEST,
151  GA_NODE_INTERPOLATE,
152  GA_NODE_INTERPOLATE_FILTER,
153  GA_NODE_INTERPOLATE_VAL,
154  GA_NODE_INTERPOLATE_GRAD,
155  GA_NODE_INTERPOLATE_HESS,
156  GA_NODE_INTERPOLATE_DIVERG,
157  GA_NODE_INTERPOLATE_VAL_TEST,
158  GA_NODE_INTERPOLATE_GRAD_TEST,
159  GA_NODE_INTERPOLATE_HESS_TEST,
160  GA_NODE_INTERPOLATE_DIVERG_TEST,
161  GA_NODE_INTERPOLATE_X,
162  GA_NODE_INTERPOLATE_ELT_K,
163  GA_NODE_INTERPOLATE_ELT_B,
164  GA_NODE_INTERPOLATE_NORMAL,
165  GA_NODE_INTERPOLATE_DERIVATIVE,
166  GA_NODE_ELEMENTARY,
167  GA_NODE_ELEMENTARY_VAL,
168  GA_NODE_ELEMENTARY_GRAD,
169  GA_NODE_ELEMENTARY_HESS,
170  GA_NODE_ELEMENTARY_DIVERG,
171  GA_NODE_ELEMENTARY_VAL_TEST,
172  GA_NODE_ELEMENTARY_GRAD_TEST,
173  GA_NODE_ELEMENTARY_HESS_TEST,
174  GA_NODE_ELEMENTARY_DIVERG_TEST,
175  GA_NODE_SECONDARY_DOMAIN,
176  GA_NODE_SECONDARY_DOMAIN_VAL,
177  GA_NODE_SECONDARY_DOMAIN_GRAD,
178  GA_NODE_SECONDARY_DOMAIN_HESS,
179  GA_NODE_SECONDARY_DOMAIN_DIVERG,
180  GA_NODE_SECONDARY_DOMAIN_VAL_TEST,
181  GA_NODE_SECONDARY_DOMAIN_GRAD_TEST,
182  GA_NODE_SECONDARY_DOMAIN_HESS_TEST,
183  GA_NODE_SECONDARY_DOMAIN_DIVERG_TEST,
184  GA_NODE_SECONDARY_DOMAIN_X,
185  GA_NODE_SECONDARY_DOMAIN_NORMAL,
186  GA_NODE_XFEM_PLUS,
187  GA_NODE_XFEM_PLUS_VAL,
188  GA_NODE_XFEM_PLUS_GRAD,
189  GA_NODE_XFEM_PLUS_HESS,
190  GA_NODE_XFEM_PLUS_DIVERG,
191  GA_NODE_XFEM_PLUS_VAL_TEST,
192  GA_NODE_XFEM_PLUS_GRAD_TEST,
193  GA_NODE_XFEM_PLUS_HESS_TEST,
194  GA_NODE_XFEM_PLUS_DIVERG_TEST,
195  GA_NODE_XFEM_MINUS,
196  GA_NODE_XFEM_MINUS_VAL,
197  GA_NODE_XFEM_MINUS_GRAD,
198  GA_NODE_XFEM_MINUS_HESS,
199  GA_NODE_XFEM_MINUS_DIVERG,
200  GA_NODE_XFEM_MINUS_VAL_TEST,
201  GA_NODE_XFEM_MINUS_GRAD_TEST,
202  GA_NODE_XFEM_MINUS_HESS_TEST,
203  GA_NODE_XFEM_MINUS_DIVERG_TEST,
204  GA_NODE_ZERO};
205 
206  typedef std::shared_ptr<std::string> pstring;
207  // Print error message indicating the position in the assembly string
208  void ga_throw_error_msg(pstring expr, size_type pos,
209  const std::string &msg);
210 
211 # define ga_throw_error(expr, pos, msg) \
212  { std::stringstream ss; ss << msg; \
213  ga_throw_error_msg(expr, pos, ss.str()); \
214  GMM_ASSERT1(false, "Error in assembly string" ); \
215  }
216 
217  // Structure for the tensor associated with a tree node
218  class assembly_tensor {
219  bool is_copied;
220  int sparsity_; // 0: plain, 1: vectorized base, 2: vectorised grad, ...
221  // 4: vectorized with a mask, 10: repeated diagonal blocks
222  size_type qdim_; // Dimension of the vectorization for sparsity tensors
223  // For sparsity 4: for a tensor t(Q*ndof, proper indices), the possibly
224  // nonzero pattern on (q, p), stored at q + Q*p where q is the component
225  // of the test function and p the linearized proper index.
226  std::shared_ptr<const std::vector<bool>> mask_;
227  bool mask_sym_; // For sparsity 4: symmetric in the two proper indices
228  base_tensor t;
229  assembly_tensor *tensor_copied;
230  public:
231  const base_tensor &tensor() const
232  { return (is_copied ? tensor_copied->tensor() : t); }
233  base_tensor &tensor()
234  { return (is_copied ? tensor_copied->tensor() : t); }
235 
236  void set_sparsity(int sp, size_type q)
237  { sparsity_ = sp; qdim_ = q; mask_.reset(); mask_sym_ = false; }
238 
239  void set_mask(size_type q, std::shared_ptr<const std::vector<bool>> m,
240  bool symmetric = false)
241  { sparsity_ = 4; qdim_ = q; mask_ = std::move(m); mask_sym_ = symmetric; }
242 
243  bool mask_symmetric() const
244  { return is_copied ? tensor_copied->mask_symmetric() : mask_sym_; }
245 
246  const std::vector<bool> *mask() const
247  { return is_copied ? tensor_copied->mask() : mask_.get(); }
248 
249  void copy_structure(const assembly_tensor &t_) {
250  sparsity_ = t_.sparsity(); qdim_ = t_.qdim();
251  mask_ = t_.is_copied ? t_.tensor_copied->mask_ : t_.mask_;
252  mask_sym_ = t_.mask_symmetric();
253  }
254 
255  size_type qdim() const { return is_copied ? tensor_copied->qdim() : qdim_; }
256 
257  int sparsity() const
258  { return is_copied ? tensor_copied->sparsity() : sparsity_; }
259 
260  inline void set_to_original() { is_copied = false; }
261 
262  inline void set_to_copy(assembly_tensor &t_) {
263  is_copied = true; sparsity_ = t_.sparsity_; qdim_ = t_.qdim_;
264  mask_ = t_.mask_; mask_sym_ = t_.mask_sym_;
265  t = t_.tensor(); tensor_copied = &(t_);
266  }
267 
268  inline void adjust_sizes(const bgeot::multi_index &ssizes)
269  { t.adjust_sizes(ssizes); }
270 
271  inline void adjust_sizes()
272  { if (t.sizes().size() || t.size() != 1) t.init(); }
273 
274  inline void adjust_sizes(size_type i)
275  { if (t.sizes().size() != 1 || t.sizes()[0] != i) t.init(i); }
276 
277  inline void adjust_sizes(size_type i, size_type j) {
278  if (t.sizes().size() != 2 || t.sizes()[0] != i || t.sizes()[1] != j)
279  t.init(i, j);
280  }
281 
282  inline void adjust_sizes(size_type i, size_type j, size_type k) {
283  if (t.sizes().size() != 3 || t.sizes()[0] != i || t.sizes()[1] != j
284  || t.sizes()[2] != k)
285  t.init(i, j, k);
286  }
287  inline void adjust_sizes(size_type i, size_type j,
288  size_type k, size_type l) {
289  if (t.sizes().size() != 3 || t.sizes()[0] != i || t.sizes()[1] != j
290  || t.sizes()[2] != k || t.sizes()[3] != l)
291  t.init(i, j, k, l);
292  }
293 
294  void init_scalar_tensor(scalar_type v)
295  { set_to_original(); t.adjust_sizes(); t[0] = v; }
296 
297  void init_vector_tensor(size_type d)
298  { set_to_original(); t.adjust_sizes(d); }
299 
300  void init_matrix_tensor(size_type n, size_type m)
301  { set_to_original(); t.adjust_sizes(n, m); }
302 
303  void init_identity_matrix_tensor(size_type n) {
304  init_matrix_tensor(n, n);
305  auto itw = t.begin();
306  for (size_type i = 0; i < n; ++i)
307  for (size_type j = 0; j < n; ++j)
308  *itw++ = (i == j) ? scalar_type(1) : scalar_type(0);
309  }
310 
311  void init_third_order_tensor(size_type n, size_type m, size_type l)
312  { set_to_original(); t.adjust_sizes(n, m, l); }
313 
314  void init_fourth_order_tensor(size_type n, size_type m,
315  size_type l, size_type k)
316  { set_to_original(); t.adjust_sizes(n, m, l, k); }
317 
318  const bgeot::multi_index &sizes() const { return t.sizes(); }
319 
320  assembly_tensor()
321  : is_copied(false), sparsity_(0), qdim_(0), mask_sym_(false),
322  tensor_copied(0) {}
323  };
324 
325  struct ga_tree_node;
326  typedef ga_tree_node *pga_tree_node;
327 
328 
329  struct ga_tree_node {
330  GA_NODE_TYPE node_type;
331  GA_TOKEN_TYPE op_type;
332  assembly_tensor t;
333  size_type test_function_type; // -1 = undetermined
334  // 0 = no test function,
335  // 1 = first order, 2 = second order,
336  // 3 = both with always first order in first
337  std::string name_test1, name_test2; // variable names corresponding to test
338  // functions when test_function_type > 0.
339  std::string interpolate_name_test1, interpolate_name_test2; // name
340  // of interpolation transformation if any
341  size_type qdim1, qdim2; // Qdims when test_function_type > 0.
342  size_type nbc1, nbc2, nbc3; // For X (nbc1=coordinate number),
343  // macros (nbc1=param number, nbc2,nbc3 type))
344  // and C_MATRIX (nbc1=order).
345  size_type pos; // Position of the first character in string
346  pstring expr; // Original string, for error messages.
347  std::string name; // variable/constant/function/operator name
348  std::string interpolate_name; // For Interpolate : name of transformation
349  std::string interpolate_name_der; // For Interpolate derivative:
350  // name of transformation
351  std::string elementary_name; // For Elementary_transformation :
352  // name of transformation
353  std::string elementary_target;// For Elementary_transformation :
354  // target variable (for its mesh_fem)
355  size_type der1, der2; // For functions and nonlinear operators,
356  // optional derivative or second derivative.
357  bool symmetric_op;
358  pga_tree_node parent; // Parent node
359  std::vector<pga_tree_node> children; // Children nodes
360  scalar_type hash_value; // Hash value to identify nodes.
361  bool marked; // For specific use of some algorithms
362 
363  inline const base_tensor &tensor() const { return t.tensor(); }
364  inline base_tensor &tensor() { return t.tensor(); }
365  int sparsity() const { return t.sparsity(); }
366 
367  inline size_type nb_test_functions() const {
368  if (test_function_type == size_type(-1)) return 0;
369  return test_function_type - (test_function_type >= 2 ? 1 : 0);
370  }
371 
372  inline size_type tensor_order() const
373  { return t.sizes().size() - nb_test_functions(); }
374 
375  inline size_type tensor_test_size() const {
376  size_type st = nb_test_functions();
377  return (st >= 1 ? t.sizes()[0] : 1) * (st == 2 ? t.sizes()[1] : 1);
378  }
379 
380  inline size_type tensor_proper_size() const
381  { return t.tensor().size() / tensor_test_size(); }
382 
383  inline size_type tensor_proper_size(size_type i) const
384  { return t.sizes()[nb_test_functions()+i]; }
385 
386 
387  void mult_test(const pga_tree_node n0, const pga_tree_node n1);
388 
389  bool tensor_is_zero() {
390  if (node_type == GA_NODE_ZERO) return true;
391  if (node_type != GA_NODE_CONSTANT) return false;
392  for (size_type i = 0; i < tensor().size(); ++i)
393  if (tensor()[i] != scalar_type(0)) return false;
394  return true;
395  }
396 
397  inline bool is_constant() {
398  return (node_type == GA_NODE_CONSTANT ||
399  (node_type == GA_NODE_ZERO && test_function_type == 0));
400  }
401 
402  inline void init_scalar_tensor(scalar_type v)
403  { t.init_scalar_tensor(v); test_function_type = 0; }
404 
405  inline void init_vector_tensor(size_type d)
406  { t.init_vector_tensor(d); test_function_type = 0; }
407 
408  inline void init_matrix_tensor(size_type n, size_type m)
409  { t.init_matrix_tensor(n, m); test_function_type = 0; }
410 
411  inline void init_identity_matrix_tensor(size_type n)
412  { t.init_identity_matrix_tensor(n); test_function_type = 0; }
413 
414  inline void init_third_order_tensor(size_type n, size_type m, size_type l)
415  { t.init_third_order_tensor(n, m, l); test_function_type = 0; }
416 
417  inline void init_fourth_order_tensor(size_type n, size_type m,
418  size_type l, size_type k)
419  { t.init_fourth_order_tensor(n, m, l, k); test_function_type = 0; }
420 
421  inline void adopt_child(pga_tree_node new_child)
422  { children.push_back(new_child); children.back()->parent = this; }
423 
424  inline void accept_child(size_type i) {
425  GMM_ASSERT1(i < children.size(), "Internal error");
426  children[i]->parent = this;
427  }
428 
429  inline void replace_child(pga_tree_node oldchild,
430  pga_tree_node newchild) {
431  bool found = false;
432  for (pga_tree_node &child : children)
433  if (child == oldchild) { child = newchild; found = true; }
434  GMM_ASSERT1(found, "Internal error");
435  }
436 
437  ga_tree_node()
438  : node_type(GA_NODE_VOID), test_function_type(-1), qdim1(0), qdim2(0),
439  nbc1(0), nbc2(0), nbc3(0), pos(0), expr(0), der1(0), der2(0),
440  symmetric_op(false), hash_value(0) {}
441  ga_tree_node(GA_NODE_TYPE ty, size_type p, pstring expr_)
442  : node_type(ty), test_function_type(-1),
443  qdim1(0), qdim2(0), nbc1(0), nbc2(0), nbc3(0),
444  pos(p), expr(expr_), der1(0), der2(0), symmetric_op(false),
445  hash_value(0) {}
446  ga_tree_node(scalar_type v, size_type p, pstring expr_)
447  : node_type(GA_NODE_CONSTANT), test_function_type(-1),
448  qdim1(0), qdim2(0), nbc1(0), nbc2(0), nbc3(0),
449  pos(p), expr(expr_), der1(0), der2(0), symmetric_op(false),
450  hash_value(0)
451  { init_scalar_tensor(v); }
452  ga_tree_node(const char *n, size_type l, size_type p, pstring expr_)
453  : node_type(GA_NODE_NAME), test_function_type(-1),
454  qdim1(0), qdim2(0), nbc1(0), nbc2(0), nbc3(0),
455  pos(p), expr(expr_), name(n, l), der1(0), der2(0), symmetric_op(false),
456  hash_value(0) {}
457  ga_tree_node(GA_TOKEN_TYPE op, size_type p, pstring expr_)
458  : node_type(GA_NODE_OP), op_type(op), test_function_type(-1),
459  qdim1(0), qdim2(0), nbc1(0), nbc2(0), nbc3(0),
460  pos(p), expr(expr_), der1(0), der2(0), symmetric_op(false),
461  hash_value(0) {}
462  };
463 
464  struct ga_tree {
465  pga_tree_node root, current_node;
466  std::string secondary_domain;
467 
468  void add_scalar(scalar_type val, size_type pos, pstring expr);
469  void add_allindices(size_type pos, pstring expr);
470  void add_name(const char *name, size_type length, size_type pos,
471  pstring expr);
472  void add_sub_tree(ga_tree &sub_tree);
473  void add_params(size_type pos, pstring expr);
474  void add_matrix(size_type pos, pstring expr);
475  void add_op(GA_TOKEN_TYPE op_type, size_type pos, pstring expr);
476  void clear_node_rec(pga_tree_node pnode);
477  void clear_node(pga_tree_node pnode);
478  void clear() { clear_node_rec(root); root = current_node = nullptr; }
479  void clear_children(pga_tree_node pnode);
480  void replace_node_by_child(pga_tree_node pnode, size_type i);
481  void copy_node(pga_tree_node pnode, pga_tree_node &pnode_new);
482  void duplicate_with_operation(pga_tree_node pnode, GA_TOKEN_TYPE op_type);
483  void duplicate_with_addition(pga_tree_node pnode)
484  { duplicate_with_operation(pnode, GA_PLUS); }
485  void duplicate_with_substraction(pga_tree_node pnode)
486  { duplicate_with_operation(pnode, GA_MINUS); }
487  void insert_node(pga_tree_node pnode, GA_NODE_TYPE node_type);
488  void add_child(pga_tree_node pnode, GA_NODE_TYPE node_type = GA_NODE_VOID);
489  void swap(ga_tree &tree) {
490  std::swap(root, tree.root);
491  std::swap(current_node, tree.current_node);
492  std::swap(secondary_domain, tree.secondary_domain);
493  }
494 
495  ga_tree() : root(nullptr), current_node(nullptr), secondary_domain() {}
496 
497  ga_tree(const ga_tree &tree)
498  : root(nullptr), current_node(nullptr),
499  secondary_domain(tree.secondary_domain)
500  {
501  if (tree.root)
502  copy_node(tree.root, root);
503  }
504 
505  ga_tree &operator =(const ga_tree &tree) {
506  clear();
507  secondary_domain = tree.secondary_domain;
508  if (tree.root)
509  copy_node(tree.root, root);
510  return *this;
511  }
512 
513  ~ga_tree() { clear(); }
514  };
515 
516  // Test equality or equivalence of two sub trees.
517  // version = 0 : strict equality
518  // 1 : give the same result
519  // 2 : give the same result with transposition of test functions
520  bool sub_tree_are_equal
521  (const pga_tree_node pnode1, const pga_tree_node pnode2,
522  const ga_workspace &workspace, int version);
523 
524  // Transform the expression of a node and its sub-nodes in the equivalent
525  // assembly string sent to ostream str
526  void ga_print_node(const pga_tree_node pnode, std::ostream &str);
527  // The same for the whole tree, the result is a std::string
528  std::string ga_tree_to_string(const ga_tree &tree);
529 
530  // Syntax analysis of an assembly string. Conversion to a tree.
531  // No semantic analysis is done. The tree can be inconsistent.
532  void ga_read_string(const std::string &expr, ga_tree &tree,
533  const ga_macro_dictionary &macro_dict);
534  void ga_read_string_reg(const std::string &expr, ga_tree &tree,
535  ga_macro_dictionary &macro_dict);
536 
537 
538 } /* end of namespace */
539 
540 
541 #endif /* GETFEM_GENERIC_ASSEMBLY_TREE_H__ */
Inversion of geometric transformations.
region-tree for window/point search on a set of rectangles.
A simple singleton implementation.
A smart pointer that copies the value it points to on copy operations.
A language for generic assembly of pde boundary value problems.
Model representation in Getfem.
Tools for multithreaded, OpenMP and Boost based parallelization.
Basic linear algebra functions.
void clear(L &l)
clear (fill with zeros) a vector or matrix.
Definition: gmm_blas.h:58
size_t size_type
used as the common size type in the library
Definition: bgeot_poly.h:48
GEneric Tool for Finite Element Methods.