38 #ifndef GETFEM_GENERIC_ASSEMBLY_FUNC_OP_H__ 39 #define GETFEM_GENERIC_ASSEMBLY_FUNC_OP_H__ 45 struct ga_instruction_set;
46 using instruction_set = omp_distribute<ga_instruction_set>;
48 class ga_predef_function {
57 pscalar_func_onearg f1_;
58 pscalar_func_twoargs f2_;
60 std::string derivative1_, derivative2_;
61 mutable omp_distribute<base_vector> t, u;
62 mutable omp_distribute<ga_workspace> workspace;
63 copyable_ptr<instruction_set> gis;
65 friend void ga_define_function(
const std::string &name,
size_type nbargs,
66 const std::string &expr,
67 const std::string &der1,
68 const std::string &der2);
69 friend void ga_define_function(
const std::string &name,
70 pscalar_func_onearg f,
71 const std::string &der);
72 friend void ga_define_function(
const std::string &name,
73 pscalar_func_twoargs f,
74 const std::string &der1,
75 const std::string &der2);
77 scalar_type operator()(scalar_type t_, scalar_type u_ = 0.)
const;
79 bool is_affine(
const std::string &varname)
const;
83 size_type nbargs()
const {
return nbargs_;}
84 const std::string &derivative1()
const {
return derivative1_;}
85 const std::string &derivative2()
const {
return derivative2_;}
86 const std::string &expr()
const {
return expr_;}
87 pscalar_func_onearg f1()
const {
return f1_;}
88 pscalar_func_twoargs f2()
const {
return f2_;}
91 ga_predef_function(pscalar_func_onearg f,
size_type dtype__ = 0,
92 const std::string &der =
"");
93 ga_predef_function(pscalar_func_twoargs f,
size_type dtype__ = 0,
94 const std::string &der1 =
"",
95 const std::string &der2 =
"");
96 ga_predef_function(
const std::string &expr__);
99 struct ga_predef_function_tab
100 :
public std::map<std::string, ga_predef_function> {
102 ga_predef_function_tab();
105 struct ga_spec_function_tab :
public std::set<std::string> {
106 ga_spec_function_tab();
109 struct ga_spec_op_tab :
public std::set<std::string> {
size_t size_type
used as the common size type in the library
GEneric Tool for Finite Element Methods.
Compilation and execution operations.