~ubuntu-branches/ubuntu/wily/dolfin/wily-proposed

« back to all changes in this revision

Viewing changes to dolfin/geometry/SimplexQuadrature.h

  • Committer: Package Import Robot
  • Author(s): Johannes Ring
  • Date: 2014-09-22 14:35:34 UTC
  • mfrom: (1.1.17) (19.1.23 sid)
  • Revision ID: package-import@ubuntu.com-20140922143534-0yi89jyuqbgdxwm9
Tags: 1.4.0+dfsg-4
* debian/control: Disable libcgal-dev on i386, mipsel and sparc.
* debian/rules: Remove bad directives in pkg-config file dolfin.pc
  (closes: #760658).
* Remove debian/libdolfin-dev.lintian-overrides.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (C) 2014 Anders Logg
 
2
//
 
3
// This file is part of DOLFIN.
 
4
//
 
5
// DOLFIN is free software: you can redistribute it and/or modify
 
6
// it under the terms of the GNU Lesser General Public License as published by
 
7
// the Free Software Foundation, either version 3 of the License, or
 
8
// (at your option) any later version.
 
9
//
 
10
// DOLFIN is distributed in the hope that it will be useful,
 
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
13
// GNU Lesser General Public License for more details.
 
14
//
 
15
// You should have received a copy of the GNU Lesser General Public License
 
16
// along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
 
17
//
 
18
// First added:  2014-02-24
 
19
// Last changed: 2014-03-03
 
20
 
 
21
#ifndef __SIMPLEX_QUADRATURE_H
 
22
#define __SIMPLEX_QUADRATURE_H
 
23
 
 
24
#include <vector>
 
25
#include "Point.h"
 
26
 
 
27
namespace dolfin
 
28
{
 
29
 
 
30
  class SimplexQuadrature
 
31
  {
 
32
  public:
 
33
 
 
34
    /// Compute quadrature rule for simplex.
 
35
    ///
 
36
    /// *Arguments*
 
37
    ///     coordinates (double *)
 
38
    ///         A flattened array of simplex coordinates of
 
39
    ///         dimension num_vertices x gdim = (tdim + 1)*gdim.
 
40
    ///     tdim (std::size_t)
 
41
    ///         The topological dimension of the simplex.
 
42
    ///     gdim (std::size_t)
 
43
    ///         The geometric dimension.
 
44
    ///     order (std::size_t)
 
45
    ///         The order of convergence of the quadrature rule.
 
46
    ///
 
47
    /// *Returns*
 
48
    ///     std::pair<std::vector<double>, std::vector<double> >
 
49
    ///         An array of quadrature weights and a corresponding
 
50
    ///         flattened array of quadrature points.
 
51
    static std::pair<std::vector<double>, std::vector<double> >
 
52
    compute_quadrature_rule(const double* coordinates,
 
53
                            std::size_t tdim,
 
54
                            std::size_t gdim,
 
55
                            std::size_t order);
 
56
 
 
57
    /// Compute quadrature rule for interval.
 
58
    ///
 
59
    /// *Arguments*
 
60
    ///     coordinates (double *)
 
61
    ///         A flattened array of simplex coordinates of
 
62
    ///         dimension num_vertices x gdim = 2*gdim.
 
63
    ///     gdim (std::size_t)
 
64
    ///         The geometric dimension.
 
65
    ///     order (std::size_t)
 
66
    ///         The order of convergence of the quadrature rule.
 
67
    ///
 
68
    /// *Returns*
 
69
    ///     std::pair<std::vector<double>, std::vector<double> >
 
70
    ///         An array of quadrature weights and a corresponding
 
71
    ///         flattened array of quadrature points.
 
72
    static std::pair<std::vector<double>, std::vector<double> >
 
73
    compute_quadrature_rule_interval(const double* coordinates,
 
74
                                     std::size_t gdim,
 
75
                                     std::size_t order);
 
76
 
 
77
    /// Compute quadrature rule for triangle.
 
78
    ///
 
79
    /// *Arguments*
 
80
    ///     coordinates (double *)
 
81
    ///         A flattened array of simplex coordinates of
 
82
    ///         dimension num_vertices x gdim = 3*gdim.
 
83
    ///     gdim (std::size_t)
 
84
    ///         The geometric dimension.
 
85
    ///     order (std::size_t)
 
86
    ///         The order of convergence of the quadrature rule.
 
87
    ///
 
88
    /// *Returns*
 
89
    ///     std::pair<std::vector<double>, std::vector<double> >
 
90
    ///         An array of quadrature weights and a corresponding
 
91
    ///         flattened array of quadrature points.
 
92
    static std::pair<std::vector<double>, std::vector<double> >
 
93
    compute_quadrature_rule_triangle(const double* coordinates,
 
94
                                     std::size_t gdim,
 
95
                                     std::size_t order);
 
96
 
 
97
    /// Compute quadrature rule for tetrahedron.
 
98
    ///
 
99
    /// *Arguments*
 
100
    ///     coordinates (double *)
 
101
    ///         A flattened array of simplex coordinates of
 
102
    ///         dimension num_vertices x gdim = 4*gdim.
 
103
    ///     gdim (std::size_t)
 
104
    ///         The geometric dimension.
 
105
    ///     order (std::size_t)
 
106
    ///         The order of convergence of the quadrature rule.
 
107
    ///
 
108
    /// *Returns*
 
109
    ///     std::pair<std::vector<double>, std::vector<double> >
 
110
    ///         An array of quadrature weights and a corresponding
 
111
    ///         flattened array of quadrature points.
 
112
    static std::pair<std::vector<double>, std::vector<double> >
 
113
    compute_quadrature_rule_tetrahedron(const double* coordinates,
 
114
                                        std::size_t gdim,
 
115
                                        std::size_t order);
 
116
 
 
117
  };
 
118
 
 
119
}
 
120
 
 
121
#endif
 
122