* is the same as for cells
* in the triangulation.
*/
+#if ! ((__GNUC__==2) && (__GNUC_MINOR__==95))
Point<dim> vertices[GeometryInfo<dim>::vertices_per_cell];
+#else
+ Point<dim> vertices[1<<dim];
+#endif
/**
* Number of subdivisions with
*/
static const unsigned int rank = 1;
+#if (__GNUC__==2) && (__GNUC_MINOR__ < 95)
/**
* Unnecessary variable, only used in
* the declaration of #array_type#.
* we need it presently.
*/
static const unsigned int array_size = ((dim!=0) ? (dim) : 1);
-
+
/**
* Declare an array type which can
* be used to initialize statically
* as in the #TensorBase<1,dim># class.
*/
typedef double array_type[array_size];
+#else
+ /**
+ * Declare an array type which can
+ * be used to initialize statically
+ * an object of this type.
+ *
+ * Use the same condition for #dim==0#
+ * as in the #TensorBase<1,dim># class.
+ */
+ typedef double array_type[(dim!=0) ? dim : 1];
+#endif
+
/**
* Constructor. Initialize all entries
* to zero if #initialize==true#; this
vector<int> vertex_dofs;
+#if (__GNUC__==2) && (__GNUC_MINOR__ < 95)
+ // this seems to be disallowed
+ // by the standard, so gcc2.95
+ // does not accept it
friend class DoFObjectAccessor<1, dim>;
friend class DoFObjectAccessor<2, dim>;
friend class DoFObjectAccessor<3, dim>;
+#else
+ // this, however, may grant
+ // access to too many classes,
+ // but ...
+ template <int dim1, int dim2> friend class DoFObjectAccessor;
+#endif
};
*/
vector<unsigned int> mg_used_dofs;
+#if (__GNUC__==2) && (__GNUC_MINOR__ < 95)
+ // this seems to be disallowed
+ // by the standard, so gcc2.95
+ // does not accept it
friend class MGDoFObjectAccessor<1, dim>;
friend class MGDoFObjectAccessor<2, dim>;
friend class MGDoFObjectAccessor<3, dim>;
+#else
+ // this, however, may grant
+ // access to too many classes,
+ // but ...
+ template <int dim1, int dim2> friend class MGDoFObjectAccessor;
+#endif
};
* matrix are discarded and will not fill
* up the transfer matrix.
*/
+#if !((__GNUC__==2) && (__GNUC_MINOR__==95))
FullMatrix<double> restriction[GeometryInfo<dim>::children_per_cell];
+#else
+ FullMatrix<double> restriction[1 << dim];
+#endif
/**
* Have #N=2^dim# matrices keeping the
* matrix are discarded and will not fill
* up the transfer matrix.
*/
+#if ! ((__GNUC__==2) && (__GNUC_MINOR__==95))
FullMatrix<double> prolongation[GeometryInfo<dim>::children_per_cell];
+#else
+ FullMatrix<double> prolongation[1 << dim];
+#endif
/**
* Specify the constraints which the
struct EpsFlags : public EpsFlagsBase
{};
+#if (__GNUC__==2) && (__GNUC_MINOR__ < 95)
+
/**
* Flags specific to the output of
* grids in three space dimensions.
*/
template <>
- struct EpsFlags<3> : public EpsFlagsBase
+ struct EpsFlags<3> : public EpsFlagsBase
{
/**
* Angle of the line origin-viewer
azimut_angle (azimut_angle),
turn_angle (turn_angle) {};
};
+#else
+# warning Not implemented for gcc2.95
+#endif
class InterGridMap
{
public:
+
+#if (__GNUC__==2) && (__GNUC_MINOR__==95)
+ // helper class
+ struct GridClass_dim : public GridClass<dim> {
+ // constructor. will
+ // not be implemented,
+ // but suppresses compiler
+ // warning about non-default
+ // constructor of GridClass
+ GridClass_dim ();
+ };
+
/**
* Typedef to the iterator type of
* the grid class under consideration.
*/
- typedef typename GridClass<dim>::cell_iterator cell_iterator;
+ typedef typename GridClass_dim::cell_iterator cell_iterator;
+#else
+
+ /**
+ * Typedef to the iterator type of
+ * the grid class under consideration.
+ */
+ typedef typename GridClass<dim>::cell_iterator cell_iterator;
+#endif
/**
* Create the mapping between the two
* grids.
*/
template <int dim>
struct CellData {
+#if !((__GNUC__==2) && (__GNUC_MINOR__==95))
int vertices[GeometryInfo<dim>::vertices_per_cell];
+#else
+ int vertices[1 << dim];
+#endif
unsigned char material_id;
};
TriaNumberCache<dim> number_cache;
// Friendship includes local classes.
+#if (__GNUC__==2) && (__GNUC_MINOR__ < 95)
+ // this seems to be disallowed
+ // by the standard, so gcc2.95
+ // does not accept it
friend class TriaAccessor<dim>;
friend class TriaObjectAccessor<1, dim>;
friend class TriaObjectAccessor<2, dim>;
friend class TriaObjectAccessor<3, dim>;
-
+#else
+ // this, however, may grant
+ // access to too many classes,
+ // but ...
+ template <int dim1> friend class TriaAccessor;
+
+ template <int dim1, int dim2>
+ friend class TriaObjectAccessor;
+#endif
+
friend class CellAccessor<dim>;
friend class TriaRawIterator<1,TriaObjectAccessor<1, 1> >;
*/
vector<unsigned int> mg_used_dofs;
+#if (__GNUC__==2) && (__GNUC_MINOR__ < 95)
+ // this seems to be disallowed
+ // by the standard, so gcc2.95
+ // does not accept it
friend class MGDoFObjectAccessor<1, dim>;
friend class MGDoFObjectAccessor<2, dim>;
friend class MGDoFObjectAccessor<3, dim>;
+#else
+ // this, however, may grant
+ // access to too many classes,
+ // but ...
+ template <int dim1, int dim2> friend class MGDoFObjectAccessor;
+#endif
};
template <int dim>
int MGDoFObjectAccessor<1, dim>::mg_dof_index (const unsigned int i) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->get_fe().dofs_per_line,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_line));
template <int dim>
void MGDoFObjectAccessor<1, dim>::set_mg_dof_index (const unsigned int i,
const int index) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->get_fe().dofs_per_line,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_line));
template <int dim>
int MGDoFObjectAccessor<1, dim>::mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (vertex<2, ExcIndexRange (i,0,2));
Assert (i<dof_handler->get_fe().dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex));
void MGDoFObjectAccessor<1, dim>::set_mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const int index) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (vertex<2, ExcIndexRange (i,0,2));
Assert (i<dof_handler->get_fe().dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex));
template <int dim>
void
MGDoFObjectAccessor<1, dim>::get_mg_dof_indices (vector<int> &dof_indices) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (dof_indices.size() == (2*dof_handler->get_fe().dofs_per_vertex +
dof_handler->get_fe().dofs_per_line),
DoFAccessor<dim>::ExcVectorDoesNotMatch());
template <int dim>
inline
int MGDoFObjectAccessor<2, dim>::mg_dof_index (const unsigned int i) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->get_fe().dofs_per_quad,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_quad));
template <int dim>
void MGDoFObjectAccessor<2, dim>::set_mg_dof_index (const unsigned int i,
const int index) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->get_fe().dofs_per_quad,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_quad));
inline
int MGDoFObjectAccessor<2, dim>::mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (vertex<4, ExcIndexRange (i,0,4));
Assert (i<dof_handler->get_fe().dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex));
void MGDoFObjectAccessor<2, dim>::set_mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const int index) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (vertex<4, ExcIndexRange (i,0,4));
Assert (i<dof_handler->get_fe().dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex));
template <int dim>
void
MGDoFObjectAccessor<2, dim>::get_mg_dof_indices (vector<int> &dof_indices) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (dof_indices.size() == (4*dof_handler->get_fe().dofs_per_vertex +
4*dof_handler->get_fe().dofs_per_line +
dof_handler->get_fe().dofs_per_quad),
template <int dim>
inline
int MGDoFObjectAccessor<3, dim>::mg_dof_index (const unsigned int i) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->get_fe().dofs_per_hex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_hex));
template <int dim>
void MGDoFObjectAccessor<3, dim>::set_mg_dof_index (const unsigned int i,
const int index) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->get_fe().dofs_per_hex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_hex));
inline
int MGDoFObjectAccessor<3, dim>::mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (vertex<8, ExcIndexRange (i,0,8));
Assert (i<dof_handler->get_fe().dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex));
void MGDoFObjectAccessor<3, dim>::set_mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const int index) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (vertex<4, ExcIndexRange (i,0,4));
Assert (i<dof_handler->get_fe().dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex));
template <int dim>
void
MGDoFObjectAccessor<3, dim>::get_mg_dof_indices (vector<int> &dof_indices) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (dof_indices.size() == (8*dof_handler->get_fe().dofs_per_vertex +
12*dof_handler->get_fe().dofs_per_line +
6*dof_handler->get_fe().dofs_per_quad +
void
MGDoFCellAccessor<1>::get_mg_dof_values (const Vector<double> &values,
Vector<double> &dof_values) const {
- Assert (dof_handler != 0, DoFAccessor<1>::ExcInvalidObject());
- Assert (mg_dof_handler != 0, DoFAccessor<1>::ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, DoFAccessor<1>::ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<1>::DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<1>::DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<1>::DoFAccessor<dim>::ExcInvalidObject());
Assert (dof_values.size() == dof_handler->get_fe().total_dofs,
ExcVectorDoesNotMatch());
Assert (values.size() == dof_handler->n_dofs(),
// is in direction of the viewer, but
// I am too tired at present to fix
// this
+#if !((__GNUC__==2) && (__GNUC_MINOR__==95))
const double z_angle = eps_flags_3.azimut_angle;
const double turn_angle = eps_flags_3.turn_angle;
+#else
+# warning Not implemented for gcc2.95
+ const double z_angle = 60;
+ const double turn_angle = 30;
+#endif
const double pi = 3.1415926536;
const Point<dim> view_direction(-sin(z_angle * 2.*pi / 360.) * sin(turn_angle * 2.*pi / 360.),
+sin(z_angle * 2.*pi / 360.) * cos(turn_angle * 2.*pi / 360.),
-
// helper function to aquire the number of levels within a grid
template <class GridClass>
unsigned int
template <int dim>
int MGDoFObjectAccessor<1, dim>::mg_dof_index (const unsigned int i) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->get_fe().dofs_per_line,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_line));
template <int dim>
void MGDoFObjectAccessor<1, dim>::set_mg_dof_index (const unsigned int i,
const int index) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->get_fe().dofs_per_line,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_line));
template <int dim>
int MGDoFObjectAccessor<1, dim>::mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (vertex<2, ExcIndexRange (i,0,2));
Assert (i<dof_handler->get_fe().dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex));
void MGDoFObjectAccessor<1, dim>::set_mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const int index) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (vertex<2, ExcIndexRange (i,0,2));
Assert (i<dof_handler->get_fe().dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex));
template <int dim>
void
MGDoFObjectAccessor<1, dim>::get_mg_dof_indices (vector<int> &dof_indices) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (dof_indices.size() == (2*dof_handler->get_fe().dofs_per_vertex +
dof_handler->get_fe().dofs_per_line),
DoFAccessor<dim>::ExcVectorDoesNotMatch());
template <int dim>
inline
int MGDoFObjectAccessor<2, dim>::mg_dof_index (const unsigned int i) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->get_fe().dofs_per_quad,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_quad));
template <int dim>
void MGDoFObjectAccessor<2, dim>::set_mg_dof_index (const unsigned int i,
const int index) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->get_fe().dofs_per_quad,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_quad));
inline
int MGDoFObjectAccessor<2, dim>::mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (vertex<4, ExcIndexRange (i,0,4));
Assert (i<dof_handler->get_fe().dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex));
void MGDoFObjectAccessor<2, dim>::set_mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const int index) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (vertex<4, ExcIndexRange (i,0,4));
Assert (i<dof_handler->get_fe().dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex));
template <int dim>
void
MGDoFObjectAccessor<2, dim>::get_mg_dof_indices (vector<int> &dof_indices) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (dof_indices.size() == (4*dof_handler->get_fe().dofs_per_vertex +
4*dof_handler->get_fe().dofs_per_line +
dof_handler->get_fe().dofs_per_quad),
template <int dim>
inline
int MGDoFObjectAccessor<3, dim>::mg_dof_index (const unsigned int i) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->get_fe().dofs_per_hex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_hex));
template <int dim>
void MGDoFObjectAccessor<3, dim>::set_mg_dof_index (const unsigned int i,
const int index) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->get_fe().dofs_per_hex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_hex));
inline
int MGDoFObjectAccessor<3, dim>::mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (vertex<8, ExcIndexRange (i,0,8));
Assert (i<dof_handler->get_fe().dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex));
void MGDoFObjectAccessor<3, dim>::set_mg_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const int index) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (vertex<4, ExcIndexRange (i,0,4));
Assert (i<dof_handler->get_fe().dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex));
template <int dim>
void
MGDoFObjectAccessor<3, dim>::get_mg_dof_indices (vector<int> &dof_indices) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (mg_dof_handler != 0, ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
Assert (dof_indices.size() == (8*dof_handler->get_fe().dofs_per_vertex +
12*dof_handler->get_fe().dofs_per_line +
6*dof_handler->get_fe().dofs_per_quad +
void
MGDoFCellAccessor<1>::get_mg_dof_values (const Vector<double> &values,
Vector<double> &dof_values) const {
- Assert (dof_handler != 0, DoFAccessor<1>::ExcInvalidObject());
- Assert (mg_dof_handler != 0, DoFAccessor<1>::ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, DoFAccessor<1>::ExcInvalidObject());
+ Assert (dof_handler != 0, DoFAccessor<1>::DoFAccessor<dim>::ExcInvalidObject());
+ Assert (mg_dof_handler != 0, DoFAccessor<1>::DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0, DoFAccessor<1>::DoFAccessor<dim>::ExcInvalidObject());
Assert (dof_values.size() == dof_handler->get_fe().total_dofs,
ExcVectorDoesNotMatch());
Assert (values.size() == dof_handler->n_dofs(),
case logarithmic:
min_value = *min_element(values[0].begin(),
values[0].end(),
- // for gcc2.95
-// &Histogram::template logarithmic_less<number>);
- // for egcs1.1.2
- &logarithmic_less<number>);
+#if (__GNUC__==2) && (__GNUC_MINOR__ < 95)
+ &logarithmic_less<number>
+#else
+ &Histogram::template logarithmic_less<number>
+#endif
+ );
+
max_value = *max_element(values[0].begin(),
values[0].end(),
- // for gcc2.95
-// &Histogram::template logarithmic_less<number>);
- // for egcs1.1.2
- &logarithmic_less<number>);
+#if (__GNUC__==2) && (__GNUC_MINOR__ < 95)
+ &logarithmic_less<number>
+#else
+ &Histogram::template logarithmic_less<number>
+#endif
+ );
+
for (unsigned int i=1; i<values.size(); ++i)
{
min_value = min (min_value,
*min_element(values[i].begin(),
values[i].end(),
- // for gcc2.95
-// &Histogram::template logarithmic_less<number>);
- // for egcs1.1.2
- &logarithmic_less<number>),
- // for gcc2.95
-// &Histogram::template logarithmic_less<number>);
- // for egcs1.1.2
- &logarithmic_less<number>);
+#if (__GNUC__==2) && (__GNUC_MINOR__ < 95)
+ &logarithmic_less<number>
+#else
+ &Histogram::template logarithmic_less<number>
+#endif
+ ),
+
+#if (__GNUC__==2) && (__GNUC_MINOR__ < 95)
+ &logarithmic_less<number>
+#else
+ &Histogram::template logarithmic_less<number>
+#endif
+ );
+
max_value = max (max_value,
*max_element(values[i].begin(),
values[i].end(),
- // for gcc2.95
-// &Histogram::template logarithmic_less<number>);
- // for egcs1.1.2
- &logarithmic_less<number>),
- // for gcc2.95
-// &Histogram::template logarithmic_less<number>);
- // for egcs1.1.2
- &logarithmic_less<number>);
+#if (__GNUC__==2) && (__GNUC_MINOR__ < 95)
+ &logarithmic_less<number>
+#else
+ &Histogram::template logarithmic_less<number>
+#endif
+ ),
+
+#if (__GNUC__==2) && (__GNUC_MINOR__ < 95)
+ &logarithmic_less<number>
+#else
+ &Histogram::template logarithmic_less<number>
+#endif
+ );
};
break;