Go to the documentation of this file.00001
00004 #ifndef appRaduTree_hh
00005 #define appRaduTree_hh
00006
00007 #include "basics/typedefs.hh"
00008 #include "basics/vectorsMatricesForward.hh"
00009 #include "basics/exceptions.hh"
00010 #include "space/space.hh"
00011 #include "app-radu/element.hh"
00012 #include "cluster/tree.hh"
00013
00014
00015
00025 void cebysev(const concepts::Real3d** vtx, uint nvtx, concepts::Real3d& c,
00026 concepts::Real& r, const concepts::Real3d* (&e)[4], uint& ne);
00027
00028
00029
00033 template<class F>
00034 class BBall001 : public cluster::BBall<F> {
00035 public:
00042 void operator()(const concepts::Element<F>& elm, concepts::Real3d& c,
00043 concepts::Real& r) const;
00044 };
00045
00046 template<class F>
00047 void BBall001<F>::operator()(const concepts::Element<F>& elm,
00048 concepts::Real3d& c, concepts::Real& r) const {
00049
00050 const Constant3d000<F>* elmA =
00051 dynamic_cast<const Constant3d000<F>*>(&elm);
00052 if (elmA != 0) {
00053 const concepts::Real3d *v[4], *e[4];
00054 v[0] = &elmA->vertex(0); v[1] = &elmA->vertex(1);
00055 v[2] = &elmA->vertex(2); v[3] = &elmA->vertex(3);
00056 uint ne;
00057 cebysev(v, 4, c, r, e, ne);
00058 return;
00059 }
00060
00061 const Constant3d001<F>* elmB =
00062 dynamic_cast<const Constant3d001<F>*>(&elm);
00063 if (elmB != 0) {
00064 const concepts::Real3d *v[8], *e[4];
00065 v[0] = &elmB->vertex(0); v[1] = &elmB->vertex(1);
00066 v[2] = &elmB->vertex(2); v[3] = &elmB->vertex(3);
00067 v[4] = &elmB->vertex(4); v[5] = &elmB->vertex(5);
00068 v[6] = &elmB->vertex(6); v[7] = &elmB->vertex(7);
00069 uint ne;
00070 cebysev(v, 8, c, r, e, ne);
00071 return;
00072 }
00073
00074 const Constant3d002<F>* elmC =
00075 dynamic_cast<const Constant3d002<F>*>(&elm);
00076 if (elmC != 0) {
00077 const concepts::Real3d *v[8], *e[4];
00078 v[0] = &elmC->vertex(0); v[1] = &elmC->vertex(1);
00079 v[2] = &elmC->vertex(2); v[3] = &elmC->vertex(3);
00080 v[4] = &elmC->vertex(4); v[5] = &elmC->vertex(5);
00081 v[6] = &elmC->vertex(6); v[7] = &elmC->vertex(7);
00082 uint ne;
00083 cebysev(v, 8, c, r, e, ne);
00084 return;
00085 }
00086
00087 throw conceptsException(concepts::MissingFeature("cell not supported"));
00088 }
00089
00090
00091 #endif // appRaduTree_hh