1
// file automatically generated by "basis_symbolic_hermite_cxx.cc"
3
/// This file is part of Rheolef.
5
/// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
7
/// Rheolef is free software; you can redistribute it and/or modify
8
/// it under the terms of the GNU General Public License as published by
9
/// the Free Software Foundation; either version 2 of the License, or
10
/// (at your option) any later version.
12
/// Rheolef is distributed in the hope that it will be useful,
13
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
14
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
/// GNU General Public License for more details.
17
/// You should have received a copy of the GNU General Public License
18
/// along with Rheolef; if not, write to the Free Software
19
/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
/// =========================================================================
26
typedef size_t size_type;
28
size_type i_dof_local,
30
static point grad_eval(
31
size_type i_dof_local,
35
vector<Float>& values);
36
static void grad_eval(
38
vector<point>& values);
40
vector<point>& hat_node);
44
typedef size_t size_type;
46
size_type i_dof_local,
48
static point grad_eval(
49
size_type i_dof_local,
53
vector<Float>& values);
54
static void grad_eval(
56
vector<point>& values);
58
vector<point>& hat_node);
62
size_type i_dof_local,
67
switch (i_dof_local) {
73
error_macro ("eval: invalid i_dof_local = " << i_dof_local);
79
basis_H3_p::grad_eval(
80
size_type i_dof_local,
85
switch (i_dof_local) {
90
error_macro ("grad_eval: invalid i_dof_local = " << i_dof_local);
98
vector<Float>& values)
105
basis_H3_p::grad_eval(
107
vector<point>& values)
113
basis_H3_p::hat_node(
121
size_type i_dof_local,
126
switch (i_dof_local) {
128
val = 2.0*(hat_x[0]*hat_x[0]*hat_x[0])+-3.0*(hat_x[0]*hat_x[0])+1.0;
132
val = 3.0*(hat_x[0]*hat_x[0])+-2.0*(hat_x[0]*hat_x[0]*hat_x[0]);
136
val = hat_x[0]+(hat_x[0]*hat_x[0]*hat_x[0])+-2.0*(hat_x[0]*hat_x[0]);
140
val = -(hat_x[0]*hat_x[0])+(hat_x[0]*hat_x[0]*hat_x[0]);
144
error_macro ("eval: invalid i_dof_local = " << i_dof_local);
150
basis_H3_e::grad_eval(
151
size_type i_dof_local,
156
switch (i_dof_local) {
158
val[0] = 6.0*(hat_x[0]*hat_x[0])+-6.0*hat_x[0];
162
val[0] = 6.0*hat_x[0]+-6.0*(hat_x[0]*hat_x[0]);
166
val[0] = 3.0*(hat_x[0]*hat_x[0])+-4.0*hat_x[0]+1.0;
170
val[0] = -2.0*hat_x[0]+3.0*(hat_x[0]*hat_x[0]);
174
error_macro ("grad_eval: invalid i_dof_local = " << i_dof_local);
182
vector<Float>& values)
186
values[0] = -3.0*(hat_x[0]*hat_x[0])+2.0*(hat_x[0]*hat_x[0]*hat_x[0])+1.0;
187
values[1] = -2.0*(hat_x[0]*hat_x[0]*hat_x[0])+3.0*(hat_x[0]*hat_x[0]);
188
values[2] = hat_x[0]+-2.0*(hat_x[0]*hat_x[0])+(hat_x[0]*hat_x[0]*hat_x[0]);
189
values[3] = (hat_x[0]*hat_x[0]*hat_x[0])-(hat_x[0]*hat_x[0]);
192
basis_H3_e::grad_eval(
194
vector<point>& values)
198
values[0][0] = 6.0*(hat_x[0]*hat_x[0])+-6.0*hat_x[0];
199
values[1][0] = -6.0*(hat_x[0]*hat_x[0])+6.0*hat_x[0];
200
values[2][0] = -4.0*hat_x[0]+3.0*(hat_x[0]*hat_x[0])+1.0;
201
values[3][0] = 3.0*(hat_x[0]*hat_x[0])+-2.0*hat_x[0];
204
basis_H3_e::hat_node(
213
basis_H3::~basis_H3()
217
basis_H3::degree () const
223
reference_element hat_K) const
225
switch (hat_K.type()) {
226
case reference_element::p: {
229
case reference_element::e: {
233
error_macro ("size: unsupported `" << hat_K.name() << "' element type");
240
reference_element hat_K,
241
size_type i_dof_local,
242
const point& hat_x) const
244
switch (hat_K.type()) {
245
case reference_element::p: {
246
return basis_H3_p::eval (i_dof_local,hat_x);
248
case reference_element::e: {
249
return basis_H3_e::eval (i_dof_local,hat_x);
252
error_macro ("eval: unsupported `" << hat_K.name() << "' element type");
259
reference_element hat_K,
260
size_type i_dof_local,
261
const point& hat_x) const
263
switch (hat_K.type()) {
264
case reference_element::p: {
265
return basis_H3_p::grad_eval (i_dof_local,hat_x);
267
case reference_element::e: {
268
return basis_H3_e::grad_eval (i_dof_local,hat_x);
271
error_macro ("grad_eval: unsupported `" << hat_K.name() << "' element type");
278
reference_element hat_K,
280
vector<Float>& values) const
282
switch (hat_K.type()) {
283
case reference_element::p: {
284
return basis_H3_p::eval (hat_x, values);
286
case reference_element::e: {
287
return basis_H3_e::eval (hat_x, values);
290
error_macro ("eval: unsupported `" << hat_K.name() << "' element type");
296
reference_element hat_K,
298
vector<point>& values) const
300
switch (hat_K.type()) {
301
case reference_element::p: {
302
return basis_H3_p::grad_eval (hat_x, values);
304
case reference_element::e: {
305
return basis_H3_e::grad_eval (hat_x, values);
308
error_macro ("grad_eval: unsupported `" << hat_K.name() << "' element type");
314
reference_element hat_K,
315
vector<point>& hat_node) const
317
switch (hat_K.type()) {
318
case reference_element::p: {
319
return basis_H3_p::hat_node (hat_node);
321
case reference_element::e: {
322
return basis_H3_e::hat_node (hat_node);
325
error_macro ("hat_node: unsupported `" << hat_K.name() << "' element type");
329
basis_rep* make_H3(void) { return new_macro(basis_H3); }