Loading...
Searching...
No Matches
integrate_option.h
Go to the documentation of this file.
#ifndef _RHEO_INTEGRATE_OPTION_H
#define _RHEO_INTEGRATE_OPTION_H
//
// This file is part of Rheolef.
//
// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
//
// Rheolef is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// Rheolef is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Rheolef; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// =========================================================================
namespace rheolef {
} // namespace rheolef
#include "rheolef/smart_pointer.h"
#include "rheolef/reference_element.h"
#include "rheolef/point.h"
namespace rheolef {
// [verbatim_integrate_option]
class integrate_option {
public:
// typedefs:
typedef size_t size_type;
typedef enum {
gauss = 0,
gauss_lobatto = 1,
gauss_radau = 2,
middle_edge = 3,
superconvergent = 4,
equispaced = 5,
max_family = 6
} family_type; // update also family_name[] in quatrature.cc
static const size_type unset_order = std::numeric_limits<size_type>::max();
static const size_type default_order = unset_order;
static const family_type default_family = gauss;
// allocators:
integrate_option(
family_type ft = default_family,
size_type k = default_order);
integrate_option (const std::string& name);
integrate_option (const integrate_option& iopt);
integrate_option& operator= (const integrate_option& iopt);
// accessors & modifiers:
std::string name() const;
size_t get_order() const;
family_type get_family() const;
std::string get_family_name() const;
void reset (const std::string& name);
void set_order (size_t r);
void set_family (family_type type);
void set_family (std::string name);
// data:
bool invert, ignore_sys_coord, lump;
// [verbatim_integrate_option]
// internals:
template<class T>
static T epsilon() { return 1e3*std::numeric_limits<T>::epsilon(); }
protected:
family_type _family;
size_t _order;
public:
mutable bool _is_on_interface, _is_inside_on_local_sides; // internals
// [verbatim_integrate_option_cont]
};
// [verbatim_integrate_option_cont]
// backward compatibility:
using quadrature_option = integrate_option;
using quadrature_option_type = integrate_option;
using integrate_option_type = integrate_option;
// ------------------------------------------------------------
// inlined
// ------------------------------------------------------------
inline
integrate_option::integrate_option (family_type ft, size_type k)
: invert (false),
ignore_sys_coord (false),
lump (false),
_family(ft),
_order(k),
_is_on_interface(false),
_is_inside_on_local_sides(false)
{
}
inline
integrate_option::integrate_option (const std::string& name)
: invert (false),
ignore_sys_coord (false),
lump (false),
_family(default_family),
_order(default_order),
_is_on_interface(false),
_is_inside_on_local_sides(false)
{
reset (name);
}
inline
integrate_option::integrate_option (const integrate_option& iopt)
: invert (iopt.invert),
ignore_sys_coord (iopt.ignore_sys_coord),
lump (iopt.lump),
_family(iopt._family),
_order(iopt._order),
_is_on_interface(iopt._is_on_interface),
_is_inside_on_local_sides(iopt._is_inside_on_local_sides)
{
}
inline
integrate_option&
integrate_option::operator= (const integrate_option& iopt)
{
invert = iopt.invert;
ignore_sys_coord = iopt.ignore_sys_coord;
lump = iopt.lump;
_family = iopt._family;
_order = iopt._order;
_is_on_interface = iopt._is_on_interface;
_is_inside_on_local_sides = iopt._is_inside_on_local_sides;
return *this;
}
inline
integrate_option::size_type
integrate_option::get_order () const
{
return _order;
}
inline
integrate_option::family_type
integrate_option::get_family () const
{
return _family;
}
inline
void
integrate_option::set_order (size_t r)
{
_order = r;
}
inline
void
integrate_option::set_family (family_type ft)
{
_family = ft;
}
}// namespace rheolef
#endif // _RHEO_INTEGRATE_OPTION_H
rheolef::integrate_option
see the integrate_option page for the full documentation
Definition integrate_option.h:125
rheolef::integrate_option::set_family
void set_family(std::string name)
rheolef::integrate_option::lump
bool lump
Definition integrate_option.h:168
rheolef::integrate_option::invert
bool invert
Definition integrate_option.h:168
rheolef::integrate_option::name
std::string name() const
rheolef::integrate_option::family_type
family_type
Definition integrate_option.h:131
rheolef::integrate_option::equispaced
@ equispaced
Definition integrate_option.h:137
rheolef::integrate_option::gauss_lobatto
@ gauss_lobatto
Definition integrate_option.h:133
rheolef::integrate_option::gauss
@ gauss
Definition integrate_option.h:132
rheolef::integrate_option::gauss_radau
@ gauss_radau
Definition integrate_option.h:134
rheolef::integrate_option::superconvergent
@ superconvergent
Definition integrate_option.h:136
rheolef::integrate_option::middle_edge
@ middle_edge
Definition integrate_option.h:135
rheolef::integrate_option::max_family
@ max_family
Definition integrate_option.h:138
rheolef::integrate_option::reset
void reset(const std::string &name)
rheolef::integrate_option::set_family
void set_family(family_type type)
Definition integrate_option.h:260
rheolef::integrate_option::size_type
size_t size_type
Definition integrate_option.h:129
rheolef::integrate_option::operator=
integrate_option & operator=(const integrate_option &iopt)
Definition integrate_option.h:229
rheolef::integrate_option::_is_on_interface
bool _is_on_interface
Definition integrate_option.h:180
rheolef::integrate_option::_family
family_type _family
Definition integrate_option.h:177
rheolef::integrate_option::_is_inside_on_local_sides
bool _is_inside_on_local_sides
Definition integrate_option.h:180
rheolef::integrate_option::default_family
static const family_type default_family
Definition integrate_option.h:143
rheolef::integrate_option::get_family_name
std::string get_family_name() const
rheolef::integrate_option::get_family
family_type get_family() const
Definition integrate_option.h:248
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::set_order
void set_order(size_t r)
Definition integrate_option.h:254
rheolef::integrate_option::ignore_sys_coord
bool ignore_sys_coord
Definition integrate_option.h:168
rheolef::integrate_option::_order
size_t _order
Definition integrate_option.h:178
rheolef::integrate_option::get_order
size_t get_order() const
Definition integrate_option.h:242
rheolef::integrate_option::default_order
static const size_type default_order
Definition integrate_option.h:142
rheolef::integrate_option::unset_order
static const size_type unset_order
Definition integrate_option.h:141
rheolef::integrate_option::epsilon
static T epsilon()
Definition integrate_option.h:174
T
Expr1::float_type T
Definition field_expr.h:230
rheolef
This file is part of Rheolef.
Definition compiler_eigen.h:39
rheolef::invert
void invert(tiny_matrix< T > &a, tiny_matrix< T > &inv_a)
Definition tiny_lu.h:127