![]() |
00001 // Copyright (C) 2003 Johan Hoffman and Anders Logg. 00002 // Licensed under the GNU GPL Version 2. 00003 00004 #ifndef __TRIANGLE_MIDPOINT_QUADRATURE_H 00005 #define __TRIANGLE_MIDPOINT_QUADRATURE_H 00006 00007 #include <dolfin/Quadrature.h> 00008 00009 namespace dolfin { 00010 00013 class TriangleMidpointQuadrature : public Quadrature { 00014 public: 00015 00016 TriangleMidpointQuadrature() : Quadrature(3) { 00017 00018 // Area of triangle 00019 m = 0.5; 00020 00021 // Quadrature points 00022 points[0] = Point(0.5, 0.0); 00023 points[1] = Point(0.5, 0.5); 00024 points[2] = Point(0.0, 0.5); 00025 00026 // Quadrature weights 00027 weights[0] = m / 3.0; 00028 weights[1] = m / 3.0; 00029 weights[2] = m / 3.0; 00030 00031 } 00032 00033 void show() const {}; 00034 00035 }; 00036 00037 } 00038 00039 #endif
![]()
Documentation automatically generated with Doxygen on 10 Sep 2004.