quadrature.cc
Go to the documentation of this file.
//
// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
//
// Rheolef is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// Rheolef is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Rheolef; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// =========================================================================
// author: Pierre.Saramito@imag.fr
// date: 5 february 2019
namespace rheolef {
} // namespace rheolef
#include "rheolef/quadrature.h"
using namespace rheolef;
using namespace std;
int main(int argc, char**argv) {
if (argc < 3) {
cerr << "usage: quadrature_show element 'name(order)'" << endl
<< "ex:" << endl
<< " quadrature_tst t 'gauss(2)'" << endl;
exit (0);
}
char c = argv[1][0];
string name = argv[2];
reference_element hat_K;
hat_K.set_name (c);
quadrature<Float> quad;
quad.reset (name);
size_t d = hat_K.dimension();
cout << setprecision(numeric_limits<Float>::digits10)
<< quad.size(hat_K) << endl;
for (quadrature<Float>::const_iterator first = quad.begin(hat_K), last = quad.end(hat_K);
first != last; first++) {
const point& xq = (*first).x;
const Float& wq = (*first).w;
cout << wq << "\t";
xq.put (cout, d);
cout << endl;
}
}
Float
see the Float page for the full documentation
point
see the point page for the full documentation
rheolef::quadrature
Definition: quadrature.h:186
rheolef::quadrature::const_iterator
rep::const_iterator const_iterator
Definition: quadrature.h:195
rheolef::quadrature::end
const_iterator end(reference_element hat_K) const
Definition: quadrature.h:219
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::begin
const_iterator begin(reference_element hat_K) const
Definition: quadrature.h:218
rheolef::reference_element
see the reference_element page for the full documentation
Definition: reference_element.h:66
rheolef::reference_element::set_name
void set_name(char name)
Definition: reference_element.cc:59
rheolef::reference_element::dimension
size_type dimension() const
Definition: reference_element.h:101
rheolef::std
Definition: vec_expr_v2.h:402
mkgeo_ball.c
int c
Definition: mkgeo_ball.sh:153
mkgeo_ball.d
int d
Definition: mkgeo_ball.sh:154
mkgeo_contraction.name
string name
Definition: mkgeo_contraction.sh:133
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
main
int main(int argc, char **argv)
Definition: quadrature.cc:61