Rheolef  7.1
an efficient C++ finite element environment
integrate_option.h
Go to the documentation of this file.
1 #ifndef _RHEO_INTEGRATE_OPTION_H
2 #define _RHEO_INTEGRATE_OPTION_H
3 //
4 // This file is part of Rheolef.
5 //
6 // Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
7 //
8 // Rheolef is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
12 //
13 // Rheolef is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with Rheolef; if not, write to the Free Software
20 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 //
22 // =========================================================================
23 
24 namespace rheolef {
115 } // namespace rheolef
116 
117 #include "rheolef/smart_pointer.h"
118 #include "rheolef/reference_element.h"
119 #include "rheolef/point.h"
120 
121 namespace rheolef {
122 
123 // [verbatim_integrate_option]
126 public:
127 // typedefs:
128 
129  typedef size_t size_type;
130 
131  typedef enum {
132  gauss = 0,
139  } family_type; // update also family_name[] in quatrature.cc
140 
141  static const size_type unset_order = std::numeric_limits<size_type>::max();
144 
145 // allocators:
146 
150 
151  integrate_option (const std::string& name);
152  integrate_option (const integrate_option& iopt);
154 
155 // accessors & modifiers:
156 
157  std::string name() const;
158  size_t get_order() const;
159  family_type get_family() const;
160  std::string get_family_name() const;
161  void reset (const std::string& name);
162  void set_order (size_t r);
163  void set_family (family_type type);
164  void set_family (std::string name);
165 
166 // data:
167 
169 
170 // [verbatim_integrate_option]
171 // internals:
172 
173  template<class T>
174  static T epsilon() { return 1e3*std::numeric_limits<T>::epsilon(); }
175 
176 protected:
178  size_t _order;
179 public:
180  mutable bool _is_on_interface, _is_inside_on_local_sides; // internals
181 // [verbatim_integrate_option_cont]
182 };
183 // [verbatim_integrate_option_cont]
184 
185 // backward compatibility:
189 
190 // ------------------------------------------------------------
191 // inlined
192 // ------------------------------------------------------------
193 inline
195  : invert (false),
196  ignore_sys_coord (false),
197  lump (false),
198  _family(ft),
199  _order(k),
200  _is_on_interface(false),
201  _is_inside_on_local_sides(false)
202 {
203 }
204 inline
206  : invert (false),
207  ignore_sys_coord (false),
208  lump (false),
209  _family(default_family),
210  _order(default_order),
211  _is_on_interface(false),
212  _is_inside_on_local_sides(false)
213 {
214  reset (name);
215 }
216 inline
218  : invert (iopt.invert),
219  ignore_sys_coord (iopt.ignore_sys_coord),
220  lump (iopt.lump),
221  _family(iopt._family),
222  _order(iopt._order),
223  _is_on_interface(iopt._is_on_interface),
224  _is_inside_on_local_sides(iopt._is_inside_on_local_sides)
225 {
226 }
227 inline
230 {
231  invert = iopt.invert;
233  lump = iopt.lump;
234  _family = iopt._family;
235  _order = iopt._order;
238  return *this;
239 }
240 inline
243 {
244  return _order;
245 }
246 inline
249 {
250  return _family;
251 }
252 inline
253 void
255 {
256  _order = r;
257 }
258 inline
259 void
261 {
262  _family = ft;
263 }
264 
265 }// namespace rheolef
266 #endif // _RHEO_INTEGRATE_OPTION_H
rheolef::integrate_option::get_order
size_t get_order() const
Definition: integrate_option.h:242
rheolef::integrate_option::_order
size_t _order
Definition: integrate_option.h:178
rheolef::integrate_option::default_order
static const size_type default_order
Definition: integrate_option.h:142
rheolef::integrate_option::set_order
void set_order(size_t r)
Definition: integrate_option.h:254
rheolef::integrate_option::reset
void reset(const std::string &name)
rheolef::integrate_option::get_family_name
std::string get_family_name() const
rheolef::integrate_option::size_type
size_t size_type
Definition: integrate_option.h:129
rheolef::integrate_option::integrate_option
integrate_option(family_type ft=default_family, size_type k=default_order)
Definition: integrate_option.h:194
rheolef::integrate_option::unset_order
static const size_type unset_order
Definition: integrate_option.h:141
rheolef::integrate_option::_is_on_interface
bool _is_on_interface
Definition: integrate_option.h:180
rheolef::integrate_option::gauss_radau
@ gauss_radau
Definition: integrate_option.h:134
rheolef::integrate_option::lump
bool lump
Definition: integrate_option.h:168
rheolef::integrate_option::name
std::string name() const
rheolef::integrate_option::epsilon
static T epsilon()
Definition: integrate_option.h:174
rheolef::integrate_option::operator=
integrate_option & operator=(const integrate_option &iopt)
Definition: integrate_option.h:229
rheolef::integrate_option::_family
family_type _family
Definition: integrate_option.h:177
rheolef::integrate_option
see the integrate_option page for the full documentation
Definition: integrate_option.h:125
rheolef::integrate_option::get_family
family_type get_family() const
Definition: integrate_option.h:248
rheolef::integrate_option::gauss
@ gauss
Definition: integrate_option.h:132
rheolef::type
rheolef::std type
rheolef::integrate_option::gauss_lobatto
@ gauss_lobatto
Definition: integrate_option.h:133
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
rheolef::integrate_option::invert
bool invert
Definition: integrate_option.h:168
rheolef::integrate_option::ignore_sys_coord
bool ignore_sys_coord
Definition: integrate_option.h:168
rheolef::integrate_option::_is_inside_on_local_sides
bool _is_inside_on_local_sides
Definition: integrate_option.h:180
rheolef::integrate_option::middle_edge
@ middle_edge
Definition: integrate_option.h:135
rheolef::integrate_option::set_family
void set_family(family_type type)
Definition: integrate_option.h:260
rheolef::integrate_option::superconvergent
@ superconvergent
Definition: integrate_option.h:136
rheolef::integrate_option::equispaced
@ equispaced
Definition: integrate_option.h:137
rheolef::invert
void invert(tiny_matrix< T > &a, tiny_matrix< T > &inv_a)
Definition: tiny_lu.h:127
epsilon
Float epsilon
Definition: transmission_error.cc:25
rheolef::integrate_option::max_family
@ max_family
Definition: integrate_option.h:138
mkgeo_contraction.name
name
Definition: mkgeo_contraction.sh:133
rheolef::integrate_option::family_type
family_type
Definition: integrate_option.h:131
T
Expr1::float_type T
Definition: field_expr.h:218
rheolef::integrate_option::default_family
static const family_type default_family
Definition: integrate_option.h:143