Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
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
24namespace rheolef {
115} // namespace rheolef
116
117#include "rheolef/smart_pointer.h"
118#include "rheolef/reference_element.h"
119#include "rheolef/point.h"
120
121namespace rheolef {
122
123// [verbatim_integrate_option]
126public:
127// typedefs:
128
129 typedef size_t size_type;
130
131 typedef enum {
132 gauss = 0,
138 max_family = 6
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);
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
176protected:
178 size_t _order;
179public:
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// ------------------------------------------------------------
193inline
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}
204inline
205integrate_option::integrate_option (const std::string& name)
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}
216inline
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}
227inline
230{
231 invert = iopt.invert;
233 lump = iopt.lump;
234 _family = iopt._family;
235 _order = iopt._order;
238 return *this;
239}
240inline
243{
244 return _order;
245}
246inline
249{
250 return _family;
251}
252inline
253void
255{
256 _order = r;
257}
258inline
259void
264
265}// namespace rheolef
266#endif // _RHEO_INTEGRATE_OPTION_H
see the integrate_option page for the full documentation
void set_family(std::string name)
std::string name() const
void reset(const std::string &name)
void set_family(family_type type)
integrate_option & operator=(const integrate_option &iopt)
static const family_type default_family
std::string get_family_name() const
family_type get_family() const
integrate_option(family_type ft=default_family, size_type k=default_order)
static const size_type default_order
static const size_type unset_order
Expr1::float_type T
Definition field_expr.h:230
This file is part of Rheolef.
void invert(tiny_matrix< T > &a, tiny_matrix< T > &inv_a)
Definition tiny_lu.h:127