bool operator != (const TriaAccessor &) const;
public:
+
+ double ind_value;
+
/**
* Data type to be used for passing
* parameters from iterators to the
* of a cell).
*/
bool active () const;
+
+ /**
+ * Test whether the point p is inside
+ * this cell.
+ * Up to now, this function is only
+ * implemented for 2d
+ */
+ bool point_inside(const Point<dim> &p) const;
+
/**
* Exception
};
+template <>
+bool CellAccessor<1>::point_inside (const Point<1> &) const
+{
+ Assert (false, ExcNotImplemented() );
+}
+
#endif
= mat_id;
};
+template <>
+bool CellAccessor<2>::point_inside (const Point<2> &p) const
+{
+ for (unsigned int k=0;k<4;++k)
+ {
+ const Point<2> to_p = p-vertex(k);
+ const Point<2> face = vertex((k+1)%4)-vertex(k);
+ if (-face(1)*to_p(0)+face(0)*to_p(1)<0)
+ return false;
+ }
+ return true;
+}
+
+
#endif
= mat_id;
};
+template <>
+bool CellAccessor<3>::point_inside (const Point<3> &) const
+{
+ Assert (false, ExcNotImplemented() );
+}
+
+
#endif
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams