1
#ifndef _RHEO_BASIS_REP_H
2
#define _RHEO_BASIS_REP_H
4
/// This file is part of Rheolef.
6
/// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
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.
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.
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
22
/// =========================================================================
24
#include "rheolef/reference_element.h"
25
#include "rheolef/point.h"
26
#include "rheolef/tensor.h"
27
#include "rheolef/element_constant.h"
31
typedef element_constant::dof_family_type dof_family_type;
32
typedef size_t size_type;
33
basis_rep(std::string name, dof_family_type family) : _name(name), _family(family) {};
34
virtual ~basis_rep() { }
35
std::string name() const;
36
dof_family_type family() const;
37
virtual dof_family_type dof_family(
38
reference_element hat_K,
39
size_type i_dof_local) const = 0;
40
virtual size_type degree () const = 0;
41
virtual size_type size (
42
reference_element hat_K, dof_family_type family) const = 0;
44
reference_element hat_K,
45
size_type i_dof_local,
46
const point& hat_x) const = 0;
47
virtual point grad_eval(
48
reference_element hat_K,
49
size_type i_dof_local,
50
const point& hat_x) const = 0;
51
virtual tensor hessian_eval(
52
reference_element hat_K,
53
size_type i_dof_local,
54
const point & hat_x) const = 0;
56
reference_element hat_K,
58
std::vector<Float>& values) const = 0;
59
virtual void grad_eval(
60
reference_element hat_K,
62
std::vector<point>& values) const = 0;
63
virtual void hessian_eval(
64
reference_element hat_K,
66
std::vector<tensor>& values) const = 0;
67
virtual void hat_node(
68
reference_element hat_K,
69
std::vector<point>& hat_node) const = 0;
70
static basis_rep* make_ptr (std::string name);
73
dof_family_type _family;
77
basis_rep::name() const
82
basis_rep::dof_family_type
83
basis_rep::family() const
88
#endif // _RHEO_BASIS_REP_H