~ubuntu-branches/ubuntu/trusty/rheolef/trusty-proposed

« back to all changes in this revision

Viewing changes to nfem/basis/basis_rep.h

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2010-06-12 09:08:59 UTC
  • Revision ID: james.westby@ubuntu.com-20100612090859-8gpm2gc7j3ab43et
Tags: upstream-5.89
ImportĀ upstreamĀ versionĀ 5.89

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _RHEO_BASIS_REP_H
 
2
#define _RHEO_BASIS_REP_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
#include "rheolef/reference_element.h"
 
24
#include "rheolef/point.h"
 
25
class basis_rep {
 
26
public:
 
27
    typedef size_t size_type;
 
28
    basis_rep() {};
 
29
    virtual ~basis_rep() { }
 
30
    std::string name() const;
 
31
    virtual size_type degree () const = 0;
 
32
    virtual size_type size (
 
33
        reference_element hat_K) const = 0;
 
34
    virtual Float eval(
 
35
        reference_element hat_K,
 
36
        size_type         i_dof_local,
 
37
        const point&      hat_x) const = 0;
 
38
    virtual point grad_eval(
 
39
        reference_element hat_K,
 
40
        size_type         i_dof_local,
 
41
        const point&      hat_x) const = 0;
 
42
    virtual void eval(
 
43
        reference_element    hat_K,
 
44
        const point&         hat_x,
 
45
        std::vector<Float>&  values) const = 0;
 
46
    virtual void grad_eval(
 
47
        reference_element    hat_K,
 
48
        const point&         hat_x,
 
49
        std::vector<point>&  values) const = 0;
 
50
    virtual void hat_node(
 
51
        reference_element    hat_K,
 
52
        std::vector<point>&  hat_node) const = 0;
 
53
    static basis_rep* make_ptr (std::string name);
 
54
protected:
 
55
    std::string _name;
 
56
};
 
57
inline
 
58
std::string
 
59
basis_rep::name() const
 
60
{
 
61
  return _name;
 
62
}
 
63
#endif // _RHEO_BASIS_REP_H