Rheolef
7.1
an efficient C++ finite element environment
space_constitution_old_get.cc
Go to the documentation of this file.
1
// old format input space_constitution files:
22
// space_constitution_old_get (idiststream& ids, space_constitution<T,M>& constit)
23
//
24
// author: Pierre.Saramito@imag.fr
25
//
26
// date: 19 dec 2011
27
//
28
#include "
space_constitution_get.icc
"
29
30
// ================================================================================
31
// part 1 : read from idiststeam and build as tree_type* result_ptr
32
// ================================================================================
33
/* AIX requires this to be the first thing in the file. */
34
#ifndef __GNUC__
35
# if _RHEOLEF_HAVE_ALLOCA_H
36
# include <alloca.h>
37
# else
38
# ifdef _AIX
39
#pragma alloca
40
# else
41
# ifndef alloca
/* predefined by HP cc +Olibcalls */
42
char
*alloca ();
43
# endif
44
# endif
45
# endif
46
#endif
47
48
namespace
rheolef
{
49
50
using namespace
std;
51
52
typedef
size_t
size_type
;
53
54
static
size_type
space_constitution_old_line_no
= 1;
55
static
size_type
space_constitution_old_n_error
= 0;
56
57
extern
int
space_constitution_old_lex
();
58
void
space_constitution_old_error
(
const
char
* msg) {
59
std::string near;
60
error_macro
(
"space constitution_old input:"
<<
space_constitution_old_line_no
<<
": "
<< msg);
61
space_constitution_old_n_error
++;
62
}
63
int
space_constitution_old_wrap
() {
return
1; }
64
65
#pragma GCC diagnostic push
66
#pragma GCC diagnostic ignored "-Weffc++"
67
#define YYMALLOC ::malloc
68
#define YYFREE ::free
69
#include "space_constitution_old_yacc.cc"
70
// avoid re-definition of YY_NULL within flex
71
#ifdef YY_NULL
72
#undef YY_NULL
73
#endif
74
#include "space_constitution_old_lex.cc"
75
#pragma GCC diagnostic pop
76
77
static
yyFlexLexer
input_space_constitution_old
;
78
79
int
space_constitution_old_lex
() {
return
input_space_constitution_old
.yylex(); }
80
81
// ================================================================================
82
// part 2 : main call
83
// ================================================================================
84
template
<
class
T,
class
M>
85
void
86
space_constitution_old_get
(idiststream& ids,
space_constitution<T,M>
& constit)
87
{
88
space_constitution_get_pass_1_2 (ids, space_constitution_old_parse,
89
input_space_constitution_old
,
space_constitution_old_line_no
,
space_constitution_old_n_error
);
90
// convert tree_type result_ptr to space_constitution
91
const
tree_type
* ptr =
result_ptr
;
92
constit = build_from_tree<T,M> (*ptr);
93
delete_macro (
result_ptr
);
result_ptr
= 0;
94
}
95
// ----------------------------------------------------------------------------
96
// instanciation in library
97
// ----------------------------------------------------------------------------
98
template
void
space_constitution_old_get
(idiststream&, space_constitution<Float,sequential>&);
99
100
#ifdef _RHEOLEF_HAVE_MPI
101
template
void
space_constitution_old_get
(idiststream&, space_constitution<Float,distributed>&);
102
#endif // _RHEOLEF_HAVE_MPI
103
104
}
// namespace rheolef
space_constitution_get.icc
rheolef::result_ptr
static tree_type * result_ptr
Definition:
space_constitution_get.icc:100
rheolef::tree_type
Definition:
space_constitution_get.icc:67
rheolef::size_type
size_t size_type
Definition:
space_constitution_old_get.cc:52
rheolef::space_constitution_old_wrap
int space_constitution_old_wrap()
Definition:
space_constitution_old_get.cc:63
rheolef::space_constitution_old_error
void space_constitution_old_error(const char *msg)
Definition:
space_constitution_old_get.cc:58
rheolef::space_constitution_old_line_no
static size_type space_constitution_old_line_no
Definition:
space_constitution_old_get.cc:54
rheolef::space_constitution_old_get
void space_constitution_old_get(idiststream &ids, space_constitution< T, M > &constit)
Definition:
space_constitution_old_get.cc:86
rheolef
This file is part of Rheolef.
Definition:
compiler_eigen.h:37
error_macro
#define error_macro(message)
Definition:
dis_macros.h:49
rheolef::space_constitution_old_n_error
static size_type space_constitution_old_n_error
Definition:
space_constitution_old_get.cc:55
rheolef::space_constitution_old_lex
int space_constitution_old_lex()
Definition:
space_constitution_old_get.cc:79
rheolef::input_space_constitution_old
static yyFlexLexer input_space_constitution_old
Definition:
space_constitution_old_get.cc:77
rheolef::space_constitution
Definition:
space_constitution.h:32