Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
quadrature.cc
Go to the documentation of this file.
1
3//
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
24namespace rheolef {
55} // namespace rheolef
56
57#include "rheolef/quadrature.h"
58using namespace rheolef;
59using namespace std;
60
61int 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];
71 hat_K.set_name (c);
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}
see the Float page for the full documentation
see the point page for the full documentation
rep::const_iterator const_iterator
Definition quadrature.h:195
const_iterator end(reference_element hat_K) const
Definition quadrature.h:219
void reset(const std::string &name)
size_type size(reference_element hat_K) const
Definition quadrature.h:217
const_iterator begin(reference_element hat_K) const
Definition quadrature.h:218
see the reference_element page for the full documentation
int main()
Definition field2bb.cc:58
This file is part of Rheolef.
STL namespace.