Rheolef  7.1
an efficient C++ finite element environment
quadrature.cc
Go to the documentation of this file.
1 //
4 // Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
5 //
6 // Rheolef is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // Rheolef is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with Rheolef; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // =========================================================================
21 // author: Pierre.Saramito@imag.fr
22 // date: 5 february 2019
23 
24 namespace rheolef {
55 } // namespace rheolef
56 
57 #include "rheolef/quadrature.h"
58 using namespace rheolef;
59 using namespace std;
60 
61 int main(int argc, char**argv) {
62  if (argc < 3) {
63  cerr << "usage: quadrature_show element 'name(order)'" << endl
64  << "ex:" << endl
65  << " quadrature_tst t 'gauss(2)'" << endl;
66  exit (0);
67  }
68  char c = argv[1][0];
69  string name = argv[2];
70  reference_element hat_K;
71  hat_K.set_name (c);
72  quadrature<Float> quad;
73  quad.reset (name);
74 
75  size_t d = hat_K.dimension();
76  cout << setprecision(numeric_limits<Float>::digits10)
77  << quad.size(hat_K) << endl;
78  for (quadrature<Float>::const_iterator first = quad.begin(hat_K), last = quad.end(hat_K);
79  first != last; first++) {
80  const point& xq = (*first).x;
81  const Float& wq = (*first).w;
82  cout << wq << "\t";
83  xq.put (cout, d);
84  cout << endl;
85  }
86 }
main
int main(int argc, char **argv)
Definition: quadrature.cc:61
rheolef::quadrature::reset
void reset(const std::string &name)
Definition: quadrature_rep.cc:254
rheolef::quadrature::size
size_type size(reference_element hat_K) const
Definition: quadrature.h:217
rheolef::quadrature::const_iterator
rep::const_iterator const_iterator
Definition: quadrature.h:195
mkgeo_ball.c
c
Definition: mkgeo_ball.sh:153
rheolef::quadrature::end
const_iterator end(reference_element hat_K) const
Definition: quadrature.h:219
rheolef::reference_element
see the reference_element page for the full documentation
Definition: reference_element.h:66
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
Float
see the Float page for the full documentation
point
see the point page for the full documentation
mkgeo_ball.d
d
Definition: mkgeo_ball.sh:154
rheolef::reference_element::dimension
size_type dimension() const
Definition: reference_element.h:101
rheolef::reference_element::set_name
void set_name(char name)
Definition: reference_element.cc:59
rheolef::std
Definition: vec_expr_v2.h:391
rheolef::quadrature
Definition: quadrature.h:185
mkgeo_contraction.name
name
Definition: mkgeo_contraction.sh:133
rheolef::quadrature::begin
const_iterator begin(reference_element hat_K) const
Definition: quadrature.h:218