Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
geo_build_zero_dim.cc
Go to the documentation of this file.
1
21// used by space IR = space(zero,"P1");
22// zero.geo = 0D, 1 node, as in file:
23// mesh
24// 4
25// header
26// dimension 0
27// nodes 1
28// end header
29//
30// NOTE:
31// - the only node is attributed to iproc=0
32// used by field_concat.cc & form_concat.cc
33// and this attribution convention
34// is assumed in vec_concat.cc & csr_concat.cc
35//
36// TODO:
37// - build it directly, without any file
38// - for space IR^n : use a "n" parameter
39//
40#include "rheolef/geo.h"
41
42namespace rheolef {
43
44static std::string zero_full_name() {
45 std::string full_name = std::string(_RHEOLEF_PKGDATADIR) + "/zero-1";
46 if (file_exists (full_name + ".geo")) return full_name;
47 // second chance: regression tests running with non-installed lib
48 full_name = std::string(_RHEOLEF_ABS_TOP_SRCDIR) + "/main/lib/zero-1";
49 if (file_exists (full_name + ".geo")) return full_name;
50 fatal_macro ("cannot find \"zero-1.geo\"");
51 return std::string();
52}
53#define _RHEOLEF_zero_dimension(M) \
54template <class T> \
55geo_basic<T,M>::geo_basic ( \
56 details::zero_dimension, \
57 const communicator& comm) \
58: base (0) \
59{ \
60 bool prev_verbose = iorheo::getverbose(std::clog); \
61 std::clog << noverbose; \
62 base::operator= (geo_load<T,M>(zero_full_name())); \
63 if (prev_verbose) std::clog << verbose; \
64}
66#ifdef _RHEOLEF_HAVE_MPI
68#endif // _RHEOLEF_HAVE_MPI
69#undef _RHEOLEF_zero_dimension
70// ----------------------------------------------------------------------------
71// instanciation in library
72// ----------------------------------------------------------------------------
73#define _RHEOLEF_instanciation(T,M) \
74template \
75geo_basic<T,M>::geo_basic ( \
76 details::zero_dimension, \
77 const communicator& comm);
78
80#ifdef _RHEOLEF_HAVE_MPI
82#endif // _RHEOLEF_HAVE_MPI
83#undef _RHEOLEF_instanciation
84
85
86} // namespace rheolef
#define _RHEOLEF_instanciation(T, M, A)
Definition asr.cc:223
see the Float page for the full documentation
#define _RHEOLEF_PKGDATADIR
Definition config.h:234
#define _RHEOLEF_ABS_TOP_SRCDIR
Definition config.h:6
#define fatal_macro(message)
Definition dis_macros.h:33
#define _RHEOLEF_zero_dimension(M)
This file is part of Rheolef.
bool file_exists(const std::string &filename)
file_exists: see the rheostream page for the full documentation
Definition scatch.icc:34