25
25
namespace rheolef {
26
26
using namespace std;
30
form_element_rep<T>::make_ptr (
28
template<class T, class M>
29
form_element_rep<T,M>*
30
form_element_rep<T,M>::make_ptr (
34
const geo_basic<T>& omega)
32
const element_type& X,
33
const element_type& Y,
34
const geo_type& omega)
36
36
// TODO: use gperf instead of a long if-else test suite
37
37
if (name == "") return 0;
38
if (name == "mass") return new_macro (mass<T>(X,Y,omega));
39
if (name == "grad_grad") return new_macro (grad_grad<T>(X,Y,omega));
38
if (name == "mass") return new_macro ((mass<T,M>)(X,Y,omega));
39
if (name == "grad_grad") return new_macro ((grad_grad<T,M>)(X,Y,omega));
40
40
error_macro ("undefined form_element `" << name << "'");
43
43
// ----------------------------------------------------------------------------
44
44
// instanciation in library
45
45
// ----------------------------------------------------------------------------
46
template class form_element_rep<Float>;
46
template class form_element_rep<Float,sequential>;
48
#ifdef _RHEOLEF_HAVE_MPI
49
template class form_element_rep<Float,distributed>;
50
#endif // _RHEOLEF_HAVE_MPI
48
52
} // namespace rheolef