Skip to content
Snippets Groups Projects
Commit b31bc56d authored by Christian Engwer's avatar Christian Engwer
Browse files

[quadraturerules]

remove unused pyramid rules implementationc

[[Imported from SVN: r465]]
parent 9187d9e0
No related branches found
No related tags found
No related merge requests found
......@@ -717,185 +717,6 @@ namespace Dune {
}
};
/** \todo Please doc me! */
class PyramidQuadraturePoints
{
public:
enum { MAXP=8};
enum { highest_order=2 };
//! initialize quadrature points on the interval for all orders
PyramidQuadraturePoints()
{
int m = 0;
O[m] = 0;
// polynom degree 2 ???
m = 8;
G[m][0][0] =0.58541020;
G[m][0][1] =0.72819660;
G[m][0][2] =0.13819660;
G[m][1][0] =0.13819660;
G[m][1][1] =0.72819660;
G[m][1][2] =0.13819660;
G[m][2][0] =0.13819660;
G[m][2][1] =0.27630920;
G[m][2][2] =0.58541020;
G[m][3][0] =0.13819660;
G[m][3][1] =0.27630920;
G[m][3][2] =0.13819660;
G[m][4][0] =0.72819660;
G[m][4][1] =0.13819660;
G[m][4][2] =0.13819660;
G[m][5][0] =0.72819660;
G[m][5][1] =0.58541020;
G[m][5][2] =0.13819660;
G[m][6][0] =0.27630920;
G[m][6][1] =0.13819660;
G[m][6][2] =0.58541020;
G[m][7][0] =0.27630920;
G[m][7][1] =0.13819660;
G[m][7][2] =0.13819660;
W[m][0] = 0.125 / 3.0;
W[m][1] = 0.125 / 3.0;
W[m][2] = 0.125 / 3.0;
W[m][3] = 0.125 / 3.0;
W[m][4] = 0.125 / 3.0;
W[m][5] = 0.125 / 3.0;
W[m][6] = 0.125 / 3.0;
W[m][7] = 0.125 / 3.0;
O[m] = 2; // verify ????????
}
/** \todo Please doc me! */
FieldVector<double, 3> point(int m, int i)
{
return G[m][i];
}
/** \todo Please doc me! */
double weight (int m, int i)
{
return W[m][i];
}
/** \todo Please doc me! */
int order (int m)
{
return O[m];
}
private:
FieldVector<double, 3> G[MAXP+1][MAXP];
double W[MAXP+1][MAXP]; // weights associated with points
int O[MAXP+1]; // order of the rule
};
/** \brief Singleton holding the pyramid quadrature points
\ingroup Quadrature
*/
template<int dim>
struct PyramidQuadraturePointsSingleton {};
/** \brief Singleton holding the pyramid quadrature points
\ingroup Quadrature
*/
template<>
struct PyramidQuadraturePointsSingleton<3> {
static PyramidQuadraturePoints pyqp;
};
/** \brief Quadrature rules for Pyramids
\ingroup Quadrature
*/
template<typename ct, int dim>
class PyramidQuadratureRule;
/** \brief Quadrature rules for Pyramids
\ingroup Quadrature
*/
template<typename ct>
class PyramidQuadratureRule<ct,3> : public QuadratureRule<ct,3>
{
public:
/** \brief The space dimension */
enum {d=3};
/** \brief The highest quadrature order available */
enum {highest_order=GaussQuadratureRule1D<ct>::highest_order};
/** \brief The type used for coordinates */
typedef ct CoordType;
/** \todo Please doc me! */
typedef PyramidQuadratureRule<ct,3> value_type;
~PyramidQuadratureRule(){}
private:
friend class QuadratureRuleFactory<ct,d>;
PyramidQuadratureRule(int p) : QuadratureRule<ct,3>(GeometryType(GeometryType::pyramid, d))
{
int m;
if (p>highest_order)
DUNE_THROW(QuadratureOrderOutOfRange,
"QuadratureRule for order " << p << " and GeometryType "
<< this->type() << " not available");
if(false) {
// if(p<=2) {
m=8;
this->delivered_order = PyramidQuadraturePointsSingleton<3>::pyqp.order(m);
FieldVector<ct, d> local;
double weight;
for(int i=0; i<m; ++i)
{
for(int k=0; k<d; ++k)
local[k]=PyramidQuadraturePointsSingleton<3>::pyqp.point(m,i)[k];
weight=PyramidQuadraturePointsSingleton<3>::pyqp.weight(m,i);
// put in container
this->push_back(QuadraturePoint<ct,d>(local,weight));
}
}
else
{
// Define the quadrature rules...
QuadratureRule<ct,3> simplex =
QuadratureRules<ct,3>::rule(GeometryType::simplex,p);
for (typename QuadratureRule<ct,3>::const_iterator
it=simplex.begin(); it != simplex.end(); ++it)
{
FieldVector<ct,3> local = it->position();
ct weight = it->weight();
// Simplex 1
// x:=x+y
local[0] = local[0]+local[1];
this->push_back(QuadraturePoint<ct,d>(local,weight));
// Simplex 2
// y:=x+y
local[0] = it->position()[0];
local[1] = local[0]+local[1];
this->push_back(QuadraturePoint<ct,d>(local,weight));
}
this->delivered_order = simplex.order();
}
}
};
/** \brief Factory class for creation of quadrature rules,
depending on GeometryType, order and QuadratureType.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment