Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
space_constitution_get.cc
Go to the documentation of this file.
1
21// input space_constitution files:
22// idiststream& operator >> (idiststream&, space_constitution&);
23//
24// author: Pierre.Saramito@imag.fr
25//
26// date: 19 dec 2011
27//
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 */
42char *alloca ();
43# endif
44# endif
45# endif
46#endif
47
48namespace rheolef {
49
50using namespace std;
51
52typedef size_t size_type;
53
56
57extern int space_constitution_lex();
58void space_constitution_error (const char* msg) {
59 std::string near;
60 error_macro("space constitution input:" << space_constitution_line_no << ": " << msg);
61 space_constitution_n_error++;
62}
63int space_constitution_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_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_lex.cc"
75#pragma GCC diagnostic pop
76
77static yyFlexLexer input_space_constitution;
78
79int space_constitution_lex() { return input_space_constitution.yylex(); }
80
81// ================================================================================
82// part 2 : main call
83// ================================================================================
84template<class T, class M>
85idiststream&
87{
88 space_constitution_get_pass_1_2 (ids, space_constitution_parse,
89 input_space_constitution, space_constitution_line_no, space_constitution_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 return ids;
95}
96// ----------------------------------------------------------------------------
97// instanciation in library
98// ----------------------------------------------------------------------------
100
101#ifdef _RHEOLEF_HAVE_MPI
103#endif // _RHEOLEF_HAVE_MPI
104
105} // namespace rheolef
field::size_type size_type
Definition branch.cc:430
idiststream: see the diststream page for the full documentation
Definition diststream.h:336
static size_type space_constitution_n_error
static size_type space_constitution_line_no
static yyFlexLexer input_space_constitution
#define error_macro(message)
Definition dis_macros.h:49
This file is part of Rheolef.
void space_constitution_error(const char *msg)
int space_constitution_wrap()
std::istream & operator>>(std::istream &is, const catchmark &m)
Definition catchmark.h:88
STL namespace.