#include <cmath>
+
+// in strict ANSI C mode, the following constants are not defined by
+// default, so we do it ourselves
+#ifndef M_PI
+# define M_PI 3.14159265358979323846
+#endif
+
+#ifndef M_PI_2
+# define M_PI_2 1.57079632679489661923
+#endif
+
+
+
+
+
template<int dim>
double
PillowFunction<dim>::value (const Point<dim> &p,
if test $GXX = yes ; then
CXXFLAGSO="-O2 -Wuninitialized -felide-constructors -fnonnull-objects -ftemplate-depth-32"
- CXXFLAGSG="-DDEBUG -ggdb -Wall -W -Wtraditional -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Woverloaded-virtual -Wstrict-prototypes -Wsynth -Wsign-compare -Wconversion -ftemplate-depth-32"
+ CXXFLAGSG="-DDEBUG -ggdb -ansi -pedantic -Wall -W -Wtraditional -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Woverloaded-virtual -Wstrict-prototypes -Wsynth -Wsign-compare -Wconversion -ftemplate-depth-32"
case "$GXXVERSION" in
if test $GXX = yes ; then
CXXFLAGSO="-O2 -Wuninitialized -felide-constructors -fnonnull-objects -ftemplate-depth-32"
- CXXFLAGSG="-DDEBUG -ggdb -Wall -W -Wtraditional -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Woverloaded-virtual -Wstrict-prototypes -Wsynth -Wsign-compare -Wconversion -ftemplate-depth-32"
+ CXXFLAGSG="-DDEBUG -ggdb -ansi -pedantic -Wall -W -Wtraditional -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Woverloaded-virtual -Wstrict-prototypes -Wsynth -Wsign-compare -Wconversion -ftemplate-depth-32"
dnl set some flags that are specific to some versions of the
dnl compiler:
unsigned int
DoFObjectAccessor<1,dim>::dof_index (const unsigned int i) const
{
- Assert (dof_handler != 0, ExcInvalidObject());
+ // since the exception classes are
+ // from a template dependent base
+ // class, we have to fully qualify
+ // them. to work around more
+ // trouble, typedef the template
+ // dependent base class to a
+ // non-template dependent name and
+ // use that to specify the
+ // qualified exception names
+ typedef DoFAccessor<dim> BaseClass;
+
+ Assert (dof_handler != 0, typename BaseClass::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0, typename BaseClass::ExcInvalidObject());
Assert (i<dof_handler->selected_fe->dofs_per_line,
ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_line));
DoFObjectAccessor<1,dim>::vertex_dof_index (const unsigned int vertex,
const unsigned int i) const
{
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ // since the exception classes are
+ // from a template dependent base
+ // class, we have to fully qualify
+ // them. to work around more
+ // trouble, typedef the template
+ // dependent base class to a
+ // non-template dependent name and
+ // use that to specify the
+ // qualified exception names
+ typedef DoFAccessor<dim> BaseClass;
+
+ Assert (dof_handler != 0, typename BaseClass::ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0, typename BaseClass::ExcInvalidObject());
Assert (vertex<2, ExcIndexRange (i,0,2));
Assert (i<dof_handler->selected_fe->dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_vertex));
void
DoFObjectAccessor<1,dim>::get_dof_indices (vector<unsigned int> &dof_indices) const
{
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ // since the exception classes are
+ // from a template dependent base
+ // class, we have to fully qualify
+ // them. to work around more
+ // trouble, typedef the template
+ // dependent base class to a
+ // non-template dependent name and
+ // use that to specify the
+ // qualified exception names
+ typedef DoFAccessor<dim> BaseClass;
+
+ Assert (dof_handler != 0, typename BaseClass::ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0, typename BaseClass::ExcInvalidObject());
Assert (dof_indices.size() == (2*dof_handler->get_fe().dofs_per_vertex +
dof_handler->get_fe().dofs_per_line),
- ExcVectorDoesNotMatch());
+ typename BaseClass::ExcVectorDoesNotMatch());
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line;
inline
unsigned int DoFObjectAccessor<2,dim>::dof_index (const unsigned int i) const
{
- Assert (dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->selected_fe->dofs_per_quad,
ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_quad));
DoFObjectAccessor<2,dim>::vertex_dof_index (const unsigned int vertex,
const unsigned int i) const
{
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
Assert (vertex<4, ExcIndexRange (i,0,4));
Assert (i<dof_handler->selected_fe->dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_vertex));
void
DoFObjectAccessor<2,dim>::get_dof_indices (vector<unsigned int> &dof_indices) const
{
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename 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),
- ExcVectorDoesNotMatch());
+ typename DoFAccessor<dim>::ExcVectorDoesNotMatch());
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line,
unsigned int
DoFObjectAccessor<3,dim>::dof_index (const unsigned int i) const
{
- Assert (dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->selected_fe->dofs_per_hex,
ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_hex));
DoFObjectAccessor<3,dim>::vertex_dof_index (const unsigned int vertex,
const unsigned int i) const
{
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
Assert (vertex<8, ExcIndexRange (i,0,8));
Assert (i<dof_handler->selected_fe->dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_vertex));
void
DoFObjectAccessor<3,dim>::get_dof_indices (vector<unsigned int> &dof_indices) const
{
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename 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 +
dof_handler->get_fe().dofs_per_hex),
- ExcVectorDoesNotMatch());
+ typename DoFAccessor<dim>::ExcVectorDoesNotMatch());
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line,
};
+
+
/*------------------------ Inline functions: FEValuesBase ------------------------*/
};
+
template <int dim>
inline
const vector<vector<Tensor<1,dim> > > &
};
+
template <int dim>
inline
const vector<vector<Tensor<2,dim> > > &
};
+
template <int dim>
inline
const vector<Point<dim> > &
-FEValuesBase<dim>::get_quadrature_points () const {
+FEValuesBase<dim>::get_quadrature_points () const
+{
Assert (update_flags & update_q_points, ExcAccessToUninitializedField());
return quadrature_points;
};
+
template <int dim>
inline
const vector<Point<dim> > &
-FEValuesBase<dim>::get_support_points () const {
+FEValuesBase<dim>::get_support_points () const
+{
Assert (update_flags & update_support_points, ExcAccessToUninitializedField());
return support_points;
};
+
template <int dim>
inline
const vector<double> &
-FEValuesBase<dim>::get_JxW_values () const {
+FEValuesBase<dim>::get_JxW_values () const
+{
Assert (update_flags & update_JxW_values, ExcAccessToUninitializedField());
return JxW_values;
};
+
template <int dim>
inline
const FiniteElement<dim> &
-FEValuesBase<dim>::get_fe () const {
+FEValuesBase<dim>::get_fe () const
+{
return *fe;
};
+
template <int dim>
inline
const DoFHandler<dim>::cell_iterator &
-FEValuesBase<dim>::get_cell() const {
+FEValuesBase<dim>::get_cell() const
+{
return present_cell;
};
template <int dim>
inline
const vector<Point<dim> > &
-FEFaceValuesBase<dim>::get_normal_vectors () const {
- Assert (update_flags & update_normal_vectors, ExcAccessToUninitializedField());
+FEFaceValuesBase<dim>::get_normal_vectors () const
+{
+ Assert (update_flags & update_normal_vectors,
+ typename FEValuesBase<dim>::ExcAccessToUninitializedField());
return normal_vectors;
};
inline
bool
TriaObjectAccessor<1,dim>::used () const {
- Assert (state() == valid, ExcDereferenceInvalidObject());
+ Assert (state() == valid,
+ typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
return tria->levels[present_level]->lines.used[present_index];
};
inline
bool
TriaObjectAccessor<1,dim>::user_flag_set () const {
- Assert (used(), ExcCellNotUsed());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
return tria->levels[present_level]->lines.user_flags[present_index];
};
inline
void
TriaObjectAccessor<1,dim>::set_user_flag () const {
- Assert (used(), ExcCellNotUsed());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
tria->levels[present_level]->lines.user_flags[present_index] = true;
};
inline
void
TriaObjectAccessor<1,dim>::clear_user_flag () const {
- Assert (used(), ExcCellNotUsed());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
tria->levels[present_level]->lines.user_flags[present_index] = false;
};
#ifdef DEBUG
if (q.state() != past_the_end)
- Assert (q->used(), ExcUnusedCellAsChild());
+ Assert (q->used(), typename TriaAccessor<dim>::ExcUnusedCellAsChild());
#endif
return q;
};
inline
bool
TriaObjectAccessor<1,dim>::has_children () const {
- Assert (state() == valid, ExcDereferenceInvalidObject());
+ Assert (state() == valid, typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
return (tria->levels[present_level]->lines.children[present_index] != -1);
}
inline
bool
TriaObjectAccessor<2,dim>::used () const {
- Assert (state() == valid, ExcDereferenceInvalidObject());
+ Assert (state() == valid,
+ typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
return tria->levels[present_level]->quads.used[present_index];
};
inline
bool
TriaObjectAccessor<2,dim>::user_flag_set () const {
- Assert (used(), ExcCellNotUsed());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
return tria->levels[present_level]->quads.user_flags[present_index];
};
inline
void
TriaObjectAccessor<2,dim>::set_user_flag () const {
- Assert (used(), ExcCellNotUsed());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
tria->levels[present_level]->quads.user_flags[present_index] = true;
};
inline
void
TriaObjectAccessor<2,dim>::clear_user_flag () const {
- Assert (used(), ExcCellNotUsed());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
tria->levels[present_level]->quads.user_flags[present_index] = false;
};
#ifdef DEBUG
if (q.state() != past_the_end)
- Assert (q->used(), ExcUnusedCellAsChild());
+ Assert (q->used(), typename TriaAccessor<dim>::ExcUnusedCellAsChild());
#endif
return q;
};
inline
bool
TriaObjectAccessor<2,dim>::has_children () const {
- Assert (state() == valid, ExcDereferenceInvalidObject());
+ Assert (state() == valid, typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
return (tria->levels[present_level]->quads.children[present_index] != -1);
};
inline
bool
TriaObjectAccessor<3,dim>::used () const {
- Assert (state() == valid, ExcDereferenceInvalidObject());
+ Assert (state() == valid,
+ typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
return tria->levels[present_level]->hexes.used[present_index];
};
inline
bool
TriaObjectAccessor<3,dim>::user_flag_set () const {
- Assert (used(), ExcCellNotUsed());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
return tria->levels[present_level]->hexes.user_flags[present_index];
};
inline
void
TriaObjectAccessor<3,dim>::set_user_flag () const {
- Assert (used(), ExcCellNotUsed());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
tria->levels[present_level]->hexes.user_flags[present_index] = true;
};
template <int dim>
inline
void TriaObjectAccessor<3,dim>::clear_user_flag () const {
- Assert (used(), ExcCellNotUsed());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
tria->levels[present_level]->hexes.user_flags[present_index] = false;
};
inline
TriaIterator<dim,TriaObjectAccessor<1,dim> >
TriaObjectAccessor<3,dim>::line (const unsigned int i) const {
- Assert (used(), ExcCellNotUsed());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
Assert (i<12, ExcIndexRange (i,0,12));
// egcs 1.1.2 gets into trouble if we
inline
TriaIterator<dim,TriaObjectAccessor<2,dim> >
TriaObjectAccessor<3,dim>::quad (const unsigned int i) const {
- Assert (used(), ExcCellNotUsed());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
return
TriaIterator<dim,TriaObjectAccessor<2,dim> >
(
#ifdef DEBUG
if (q.state() != past_the_end)
- Assert (q->used(), ExcUnusedCellAsChild());
+ Assert (q->used(), typename TriaAccessor<dim>::ExcUnusedCellAsChild());
#endif
return q;
};
template <int dim>
bool TriaObjectAccessor<3,dim>::has_children () const {
- Assert (state() == valid, ExcDereferenceInvalidObject());
+ Assert (state() == valid, typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
return (tria->levels[present_level]->hexes.children[present_index] != -1);
};
int
CellAccessor<dim>::neighbor_index (const unsigned int i) const {
Assert (i<GeometryInfo<dim>::faces_per_cell,
- ExcInvalidNeighbor(i));
+ typename TriaAccessor<dim>::ExcInvalidNeighbor(i));
return tria->levels[present_level]->
neighbors[present_index*GeometryInfo<dim>::faces_per_cell+i].second;
};
template <int dim>
inline
int
-CellAccessor<dim>::neighbor_level (const unsigned int i) const {
+CellAccessor<dim>::neighbor_level (const unsigned int i) const
+{
Assert (i<GeometryInfo<dim>::faces_per_cell,
- ExcInvalidNeighbor(i));
+ typename TriaAccessor<dim>::ExcInvalidNeighbor(i));
return tria->levels[present_level]->
neighbors[present_index*GeometryInfo<dim>::faces_per_cell+i].first;
};
+
template <int dim>
inline
bool
-CellAccessor<dim>::refine_flag_set () const {
- Assert (used(), ExcCellNotUsed());
+CellAccessor<dim>::refine_flag_set () const
+{
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
// cells flagged for refinement must be active
// (the #set_refine_flag# function checks this,
// but activity may change when refinement is
};
+
template <int dim>
inline
void
-CellAccessor<dim>::set_refine_flag () const {
+CellAccessor<dim>::set_refine_flag () const
+{
Assert (used() && active(), ExcRefineCellNotActive());
- Assert (!coarsen_flag_set(), ExcCellFlaggedForCoarsening());
+ Assert (!coarsen_flag_set(),
+ ExcCellFlaggedForCoarsening());
tria->levels[present_level]->refine_flags[present_index] = true;
};
+
template <int dim>
inline
void
-CellAccessor<dim>::clear_refine_flag () const {
+CellAccessor<dim>::clear_refine_flag () const
+{
Assert (used() && active(), ExcRefineCellNotActive());
tria->levels[present_level]->refine_flags[present_index] = false;
};
+
template <int dim>
inline
bool
-CellAccessor<dim>::coarsen_flag_set () const {
- Assert (used(), ExcCellNotUsed());
+CellAccessor<dim>::coarsen_flag_set () const
+{
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
// cells flagged for coarsening must be active
// (the #set_refine_flag# function checks this,
// but activity may change when refinement is
};
+
template <int dim>
inline
void
-CellAccessor<dim>::set_coarsen_flag () const {
+CellAccessor<dim>::set_coarsen_flag () const
+{
Assert (used() && active(), ExcRefineCellNotActive());
Assert (!refine_flag_set(), ExcCellFlaggedForRefinement());
};
+
template <int dim>
inline
void
-CellAccessor<dim>::clear_coarsen_flag () const {
+CellAccessor<dim>::clear_coarsen_flag () const
+{
Assert (used() && active(), ExcRefineCellNotActive());
tria->levels[present_level]->coarsen_flags[present_index] = false;
};
+
template <int dim>
inline
TriaIterator<dim,CellAccessor<dim> >
-CellAccessor<dim>::neighbor (const unsigned int i) const {
+CellAccessor<dim>::neighbor (const unsigned int i) const
+{
TriaIterator<dim,CellAccessor<dim> > q (tria, neighbor_level (i), neighbor_index (i));
#ifdef DEBUG
if (q.state() != past_the_end)
- Assert (q->used(), ExcUnusedCellAsNeighbor());
+ Assert (q->used(), typename TriaAccessor<dim>::ExcUnusedCellAsNeighbor());
#endif
return q;
};
+
template <int dim>
inline
TriaIterator<dim,CellAccessor<dim> >
-CellAccessor<dim>::child (const unsigned int i) const {
+CellAccessor<dim>::child (const unsigned int i) const
+{
TriaIterator<dim,CellAccessor<dim> > q (tria, present_level+1, child_index (i));
#ifdef DEBUG
if (q.state() != past_the_end)
- Assert (q->used(), ExcUnusedCellAsChild());
+ Assert (q->used(), typename TriaAccessor<dim>::ExcUnusedCellAsChild());
#endif
return q;
};
+
template <int dim>
inline
bool
-CellAccessor<dim>::active () const {
+CellAccessor<dim>::active () const
+{
return !has_children();
};
* used, the function is called
* once and generates all patches.
*/
- void DataOut<dim>::build_some_patches (Data data);
+ void build_some_patches (Data data);
};
void DoFObjectAccessor<1, dim>::set_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const unsigned int index) const
+
{
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ // since the exception classes are
+ // from a template dependent base
+ // class, we have to fully qualify
+ // them. to work around more
+ // trouble, typedef the template
+ // dependent base class to a
+ // non-template dependent name and
+ // use that to specify the
+ // qualified exception names
+ typedef DoFAccessor<dim> BaseClass;
+
+ Assert (dof_handler != 0,
+ typename BaseClass::ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename BaseClass::ExcInvalidObject());
Assert (vertex<2, ExcIndexRange (i,0,2));
Assert (i<dof_handler->selected_fe->dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_vertex));
template <int dim>
void DoFObjectAccessor<1, dim>::
distribute_local_to_global (const Vector<double> &local_source,
- Vector<double> &global_destination) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ Vector<double> &global_destination) const
+{
+ // since the exception classes are
+ // from a template dependent base
+ // class, we have to fully qualify
+ // them. to work around more
+ // trouble, typedef the template
+ // dependent base class to a
+ // non-template dependent name and
+ // use that to specify the
+ // qualified exception names
+ typedef DoFAccessor<dim> BaseClass;
+
+ Assert (dof_handler != 0,
+ typename BaseClass::ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename BaseClass::ExcInvalidObject());
Assert (local_source.size() == (2*dof_handler->get_fe().dofs_per_vertex +
dof_handler->get_fe().dofs_per_line),
- ExcVectorDoesNotMatch());
+ typename BaseClass::ExcVectorDoesNotMatch());
Assert (dof_handler->n_dofs() == global_destination.size(),
- ExcVectorDoesNotMatch());
+ typename BaseClass::ExcVectorDoesNotMatch());
const unsigned int n_dofs = local_source.size();
template <int dim>
void DoFObjectAccessor<1, dim>::
distribute_local_to_global (const FullMatrix<double> &local_source,
- SparseMatrix<double> &global_destination) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ SparseMatrix<double> &global_destination) const
+{
+ // since the exception classes are
+ // from a template dependent base
+ // class, we have to fully qualify
+ // them. to work around more
+ // trouble, typedef the template
+ // dependent base class to a
+ // non-template dependent name and
+ // use that to specify the
+ // qualified exception names
+ typedef DoFAccessor<dim> BaseClass;
+
+ Assert (dof_handler != 0,
+ typename BaseClass::ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename BaseClass::ExcInvalidObject());
Assert (local_source.m() == (2*dof_handler->get_fe().dofs_per_vertex +
dof_handler->get_fe().dofs_per_line),
- ExcVectorDoesNotMatch());
+ typename BaseClass::ExcVectorDoesNotMatch());
Assert (local_source.m() == local_source.n(),
- ExcMatrixDoesNotMatch());
+ typename BaseClass::ExcMatrixDoesNotMatch());
Assert (dof_handler->n_dofs() == global_destination.m(),
- ExcMatrixDoesNotMatch());
+ typename BaseClass::ExcMatrixDoesNotMatch());
Assert (global_destination.m() == global_destination.n(),
- ExcMatrixDoesNotMatch());
+ typename BaseClass::ExcMatrixDoesNotMatch());
const unsigned int n_dofs = local_source.m();
DoFAccessor<1>::ExcVectorDoesNotMatch());
Assert (values.size() == dof_handler->n_dofs(),
DoFAccessor<1>::ExcVectorDoesNotMatch());
- Assert (has_children() == false, ExcNotActive());
+ Assert (has_children() == false, DoFAccessor<1>::ExcNotActive());
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line;
DoFAccessor<1>::ExcVectorDoesNotMatch());
Assert (values.size() == dof_handler->n_dofs(),
DoFAccessor<1>::ExcVectorDoesNotMatch());
- Assert (has_children() == false, ExcNotActive());
+ Assert (has_children() == false, DoFAccessor<1>::ExcNotActive());
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line;
void DoFObjectAccessor<2, dim>::set_dof_index (const unsigned int i,
const unsigned int index) const
{
- Assert (dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->selected_fe->dofs_per_quad,
ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_quad));
const unsigned int i,
const unsigned int index) const
{
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
Assert (vertex<4, ExcIndexRange (i,0,4));
Assert (i<dof_handler->selected_fe->dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_vertex));
void DoFObjectAccessor<2, dim>::
distribute_local_to_global (const Vector<double> &local_source,
Vector<double> &global_destination) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
Assert (local_source.size() == (4*dof_handler->get_fe().dofs_per_vertex +
4*dof_handler->get_fe().dofs_per_line +
dof_handler->get_fe().dofs_per_quad),
- ExcVectorDoesNotMatch());
+ typename DoFAccessor<dim>::ExcVectorDoesNotMatch());
Assert (dof_handler->n_dofs() == global_destination.size(),
- ExcVectorDoesNotMatch());
+ typename DoFAccessor<dim>::ExcVectorDoesNotMatch());
const unsigned int n_dofs = local_source.size();
void DoFObjectAccessor<2, dim>::
distribute_local_to_global (const FullMatrix<double> &local_source,
SparseMatrix<double> &global_destination) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
Assert (local_source.m() == (4*dof_handler->get_fe().dofs_per_vertex +
4*dof_handler->get_fe().dofs_per_line +
dof_handler->get_fe().dofs_per_quad),
- ExcMatrixDoesNotMatch());
+ typename DoFAccessor<dim>::ExcMatrixDoesNotMatch());
Assert (local_source.m() == local_source.n(),
- ExcMatrixDoesNotMatch());
+ typename DoFAccessor<dim>::ExcMatrixDoesNotMatch());
Assert (dof_handler->n_dofs() == global_destination.m(),
- ExcMatrixDoesNotMatch());
+ typename DoFAccessor<dim>::ExcMatrixDoesNotMatch());
Assert (global_destination.m() == global_destination.n(),
- ExcMatrixDoesNotMatch());
+ typename DoFAccessor<dim>::ExcMatrixDoesNotMatch());
const unsigned int n_dofs = local_source.m();
{
Assert (dim==2, ExcInternalError());
- Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
Assert (local_values.size() == dof_handler->get_fe().dofs_per_cell,
- DoFAccessor<dim>::ExcVectorDoesNotMatch());
+ typename DoFAccessor<dim>::ExcVectorDoesNotMatch());
Assert (values.size() == dof_handler->n_dofs(),
- DoFAccessor<dim>::ExcVectorDoesNotMatch());
- Assert (has_children() == false, ExcNotActive());
+ typename DoFAccessor<dim>::ExcVectorDoesNotMatch());
+ Assert (has_children() == false, typename DoFAccessor<dim>::
+ ExcNotActive());
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line,
{
Assert (dim==2, ExcInternalError());
- Assert (dof_handler != 0, DoFAccessor<dim>::ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, DoFAccessor<dim>::ExcInvalidObject());
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
Assert (local_values.size() == dof_handler->get_fe().dofs_per_cell,
- DoFAccessor<dim>::ExcVectorDoesNotMatch());
+ typename DoFAccessor<dim>::ExcVectorDoesNotMatch());
Assert (values.size() == dof_handler->n_dofs(),
- DoFAccessor<dim>::ExcVectorDoesNotMatch());
- Assert (has_children() == false, ExcNotActive());
+ typename DoFAccessor<dim>::ExcVectorDoesNotMatch());
+ Assert (has_children() == false,
+ typename DoFAccessor<dim>::ExcNotActive());
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line,
void DoFObjectAccessor<3, dim>::set_dof_index (const unsigned int i,
const unsigned int index) const
{
- Assert (dof_handler != 0, ExcInvalidObject());
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
Assert (i<dof_handler->selected_fe->dofs_per_hex,
ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_hex));
const unsigned int i,
const unsigned int index) const
{
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
- Assert (vertex<8, ExcIndexRange (i,0,8));
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
+ Assert (vertex<8,
+ ExcIndexRange (i,0,8));
Assert (i<dof_handler->selected_fe->dofs_per_vertex,
ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_vertex));
void DoFObjectAccessor<3, dim>::
distribute_local_to_global (const Vector<double> &local_source,
Vector<double> &global_destination) const {
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
Assert (local_source.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 +
dof_handler->get_fe().dofs_per_hex),
- ExcVectorDoesNotMatch());
+ typename DoFAccessor<dim>::ExcVectorDoesNotMatch());
Assert (dof_handler->n_dofs() == global_destination.size(),
- ExcVectorDoesNotMatch());
+ typename DoFAccessor<dim>::ExcVectorDoesNotMatch());
const unsigned int n_dofs = local_source.size();
distribute_local_to_global (const FullMatrix<double> &local_source,
SparseMatrix<double> &global_destination) const
{
- Assert (dof_handler != 0, ExcInvalidObject());
- Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
+ Assert (dof_handler != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
+ Assert (dof_handler->selected_fe != 0,
+ typename DoFAccessor<dim>::ExcInvalidObject());
Assert (local_source.m() == (8*dof_handler->get_fe().dofs_per_vertex +
12*dof_handler->get_fe().dofs_per_line +
6*dof_handler->get_fe().dofs_per_quad +
dof_handler->get_fe().dofs_per_hex),
- ExcMatrixDoesNotMatch());
+ typename DoFAccessor<dim>::ExcMatrixDoesNotMatch());
Assert (local_source.m() == local_source.n(),
- ExcMatrixDoesNotMatch());
+ typename DoFAccessor<dim>::ExcMatrixDoesNotMatch());
Assert (dof_handler->n_dofs() == global_destination.m(),
- ExcMatrixDoesNotMatch());
+ typename DoFAccessor<dim>::ExcMatrixDoesNotMatch());
Assert (global_destination.m() == global_destination.n(),
- ExcMatrixDoesNotMatch());
+ typename DoFAccessor<dim>::ExcMatrixDoesNotMatch());
const unsigned int n_dofs = local_source.m();
DoFAccessor<3>::ExcVectorDoesNotMatch());
Assert (values.size() == dof_handler->n_dofs(),
DoFAccessor<3>::ExcVectorDoesNotMatch());
- Assert (has_children() == false, ExcNotActive());
+ Assert (has_children() == false,
+ DoFAccessor<3>::ExcNotActive());
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line,
{
Assert (dim==3, ExcInternalError());
- Assert (dof_handler != 0, DoFAccessor<3>::ExcInvalidObject());
- Assert (&dof_handler->get_fe() != 0, DoFAccessor<3>::ExcInvalidObject());
+ Assert (dof_handler != 0,
+ DoFAccessor<3>::ExcInvalidObject());
+ Assert (&dof_handler->get_fe() != 0,
+ DoFAccessor<3>::ExcInvalidObject());
Assert (local_values.size() == dof_handler->get_fe().dofs_per_cell,
DoFAccessor<3>::ExcVectorDoesNotMatch());
Assert (values.size() == dof_handler->n_dofs(),
DoFAccessor<3>::ExcVectorDoesNotMatch());
- Assert (has_children() == false, ExcNotActive());
+ Assert (has_children() == false,
+ DoFAccessor<3>::ExcNotActive());
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line,
vector<Point<dim> > &normal_vectors,
const bool compute_normal_vectors,
const FullMatrix<double> &shape_values_transform,
- const vector<vector<Tensor<1,dim> > > &shape_gradients_transform) const {
+ const vector<vector<Tensor<1,dim> > > &shape_gradients_transform) const
+{
Assert (jacobians.size() == unit_points.size(),
- ExcWrongFieldDimension(jacobians.size(), unit_points.size()));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension(jacobians.size(),
+ unit_points.size()));
Assert (q_points.size() == unit_points.size(),
- ExcWrongFieldDimension(q_points.size(), unit_points.size()));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension(q_points.size(),
+ unit_points.size()));
Assert (global_unit_points.size() == unit_points.size(),
- ExcWrongFieldDimension(global_unit_points.size(), unit_points.size()));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension(global_unit_points.size(),
+ unit_points.size()));
Assert (support_points.size() == dofs_per_face,
- ExcWrongFieldDimension(support_points.size(), dofs_per_face));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension(support_points.size(),
+ dofs_per_face));
// size not checked since not used
static vector<Point<dim> > dummy(0);
vector<Point<dim> > &normal_vectors,
const bool compute_normal_vectors,
const FullMatrix<double> &shape_values_transform,
- const vector<vector<Tensor<1,dim> > > &shape_gradients_transform) const {
+ const vector<vector<Tensor<1,dim> > > &shape_gradients_transform) const
+{
Assert (jacobians.size() == unit_points.size(),
- ExcWrongFieldDimension(jacobians.size(), unit_points.size()));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension(jacobians.size(),
+ unit_points.size()));
Assert (q_points.size() == unit_points.size(),
- ExcWrongFieldDimension(q_points.size(), unit_points.size()));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension(q_points.size(),
+ unit_points.size()));
Assert (global_unit_points.size() == unit_points.size(),
- ExcWrongFieldDimension(global_unit_points.size(), unit_points.size()));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension(global_unit_points.size(),
+ unit_points.size()));
static vector<Point<dim> > dummy(0); // size not checked since not used
fill_fe_values (cell, global_unit_points,
const FullMatrix<double> &shape_values_transform,
const vector<vector<Tensor<1,dim> > > &/*shape_grad_transform*/) const {
Assert (jacobians.size() == unit_points.size(),
- ExcWrongFieldDimension(jacobians.size(), unit_points.size()));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension(jacobians.size(),
+ unit_points.size()));
Assert (q_points.size() == unit_points.size(),
- ExcWrongFieldDimension(q_points.size(), unit_points.size()));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension(q_points.size(),
+ unit_points.size()));
Assert (support_points.size() == dofs_per_cell,
- ExcWrongFieldDimension(support_points.size(), dofs_per_cell));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension(support_points.size(),
+ dofs_per_cell));
unsigned int n_points=unit_points.size();
};
+
template<>
FEDG_Q4<3>::FEDG_Q4():
FEQ4<3>(1)
template <int dim>
void
FEDG_Q1<dim>::get_face_support_points (const typename DoFHandler<dim>::face_iterator &,
- vector<Point<dim> > &support_points) const {
+ vector<Point<dim> > &support_points) const
+{
Assert ((support_points.size() == 0),
- ExcWrongFieldDimension (support_points.size(),0));
+ FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),0));
};
+
template <int dim>
void
FEDG_Q2<dim>::get_face_support_points (const typename DoFHandler<dim>::face_iterator &,
- vector<Point<dim> > &support_points) const {
+ vector<Point<dim> > &support_points) const
+{
Assert ((support_points.size() == 0),
- ExcWrongFieldDimension (support_points.size(),0));
+ FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),0));
};
+
template <int dim>
void
FEDG_Q3<dim>::get_face_support_points (const typename DoFHandler<dim>::face_iterator &,
- vector<Point<dim> > &support_points) const {
+ vector<Point<dim> > &support_points) const
+{
Assert ((support_points.size() == 0),
- ExcWrongFieldDimension (support_points.size(),0));
+ FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),0));
};
+
template <int dim>
void
FEDG_Q4<dim>::get_face_support_points (const typename DoFHandler<dim>::face_iterator &,
- vector<Point<dim> > &support_points) const {
+ vector<Point<dim> > &support_points) const
+{
Assert ((support_points.size() == 0),
- ExcWrongFieldDimension (support_points.size(),0));
+ FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),0));
};
template <>
void
FEDG_Q0<1>::get_face_support_points (const DoFHandler<1>::face_iterator &,
- vector<Point<1> > &) const {
+ vector<Point<1> > &) const
+{
Assert (false, ExcInternalError());
};
#endif
+
template <int dim>
inline
double
};
+
template <int dim>
inline
Tensor<1,dim>
FEDG_Q0<dim>::shape_grad (const unsigned int i,
- const Point<dim>&) const
+ const Point<dim>&) const
{
Assert((i<dofs_per_cell), ExcIndexRange(i, 0, dofs_per_cell));
return Tensor<1,dim> ();
};
+
template <int dim>
inline
Tensor<2,dim>
FEDG_Q0<dim>::shape_grad_grad (const unsigned int i,
- const Point<dim> &) const
+ const Point<dim> &) const
{
Assert((i<dofs_per_cell), ExcIndexRange(i, 0, dofs_per_cell));
};
+
template <int dim>
void FEDG_Q0<dim>::get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
- FullMatrix<double> &local_mass_matrix) const {
+ FullMatrix<double> &local_mass_matrix) const
+{
Assert (local_mass_matrix.n() == dofs_per_cell,
- ExcWrongFieldDimension(local_mass_matrix.n(),dofs_per_cell));
+ FiniteElementBase<dim>::ExcWrongFieldDimension(local_mass_matrix.n(),
+ dofs_per_cell));
Assert (local_mass_matrix.m() == dofs_per_cell,
- ExcWrongFieldDimension(local_mass_matrix.m(),dofs_per_cell));
+ FiniteElementBase<dim>::ExcWrongFieldDimension(local_mass_matrix.m(),
+ dofs_per_cell));
local_mass_matrix(0,0) = cell->measure();
};
+
template <int dim>
void
-FEDG_Q0<dim>::get_unit_support_points (vector<Point<dim> > &unit_points) const {
+FEDG_Q0<dim>::get_unit_support_points (vector<Point<dim> > &unit_points) const
+{
Assert (unit_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
+ FiniteElementBase<dim>::ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
for (unsigned int d=0; d<dim; ++d)
unit_points[0](d) = 0.5;
};
+
template <int dim>
void
FEDG_Q0<dim>::get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
- vector<Point<dim> > &support_points) const {
+ vector<Point<dim> > &support_points) const
+{
Assert (support_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
+ FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
support_points[0] = cell->center();
};
+
template <int dim>
void
FEDG_Q0<dim>::get_face_support_points (const typename DoFHandler<dim>::face_iterator &,
- vector<Point<dim> > &support_points) const {
+ vector<Point<dim> > &support_points) const
+{
Assert ((support_points.size() == 0),
- ExcWrongFieldDimension (support_points.size(),0));
+ FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),0));
};
vector<Point<dim> > &support_points) const
{
Assert (support_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),
+ dofs_per_cell));
for (unsigned int vertex=0; vertex<GeometryInfo<dim>::vertices_per_cell; ++vertex)
support_points[vertex] = cell->vertex(vertex);
{
Assert ((support_points.size() == dofs_per_face) &&
(support_points.size() == GeometryInfo<dim>::vertices_per_face),
- ExcWrongFieldDimension (support_points.size(),
- GeometryInfo<dim>::vertices_per_face));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),
+ GeometryInfo<dim>::vertices_per_face));
for (unsigned int vertex=0; vertex<dofs_per_face; ++vertex)
support_points[vertex] = face->vertex(vertex);
vector<Point<dim> > &support_points) const
{
Assert (support_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),
+ dofs_per_cell));
for (unsigned int vertex=0; vertex<GeometryInfo<dim>::vertices_per_cell; ++vertex)
support_points[vertex] = cell->vertex(vertex);
{
Assert ((support_points.size() == dofs_per_face) &&
(support_points.size() == GeometryInfo<dim>::vertices_per_face),
- ExcWrongFieldDimension (support_points.size(),
- GeometryInfo<dim>::vertices_per_face));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),
+ GeometryInfo<dim>::vertices_per_face));
for (unsigned int vertex=0; vertex<dofs_per_face; ++vertex)
support_points[vertex] = face->vertex(vertex);
vector<Point<dim> > &support_points) const
{
Assert (support_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),
+ dofs_per_cell));
for (unsigned int vertex=0; vertex<GeometryInfo<dim>::vertices_per_cell; ++vertex)
support_points[vertex] = cell->vertex(vertex);
{
Assert ((support_points.size() == dofs_per_face) &&
(support_points.size() == GeometryInfo<dim>::vertices_per_face),
- ExcWrongFieldDimension (support_points.size(),
- GeometryInfo<dim>::vertices_per_face));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),
+ GeometryInfo<dim>::vertices_per_face));
for (unsigned int vertex=0; vertex<dofs_per_face; ++vertex)
support_points[vertex] = face->vertex(vertex);
FEQ1<dim>::get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
vector<Point<dim> > &support_points) const {
Assert (support_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),
+ dofs_per_cell));
for (unsigned int vertex=0; vertex<GeometryInfo<dim>::vertices_per_cell; ++vertex)
support_points[vertex] = cell->vertex(vertex);
vector<Point<dim> > &support_points) const {
Assert ((support_points.size() == dofs_per_face) &&
(support_points.size() == GeometryInfo<dim>::vertices_per_face),
+ typename FiniteElementBase<dim>::
ExcWrongFieldDimension (support_points.size(),
GeometryInfo<dim>::vertices_per_face));
vector<Point<dim> > &unit_support_points) const
{
Assert(unit_support_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (unit_support_points.size(), dofs_per_cell));
+ typename FiniteElementBase<dim>::
+ ExcWrongFieldDimension (unit_support_points.size(),
+ dofs_per_cell));
vector<Point<dim> > base_unit_support_points (base_element(0).dofs_per_cell);
unsigned int component = 0;
vector<Point<dim> > &support_points) const
{
Assert(support_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
+ typename FiniteElementBase<dim>::
+ ExcWrongFieldDimension (support_points.size(),
+ dofs_per_cell));
vector<Point<dim> > base_support_points (base_element(0).dofs_per_cell);
unsigned int component = 0;
vector<Point<dim> > & support_points) const
{
Assert (support_points.size() == dofs_per_face,
- ExcWrongFieldDimension (support_points.size(), dofs_per_face));
+ typename FiniteElementBase<dim>::
+ ExcWrongFieldDimension (support_points.size(),
+ dofs_per_face));
vector<Point<dim> > base_support_points (base_element(0).dofs_per_face);
unsigned int comp = 0;
FullMatrix<double> &local_mass_matrix) const
{
Assert (local_mass_matrix.n() == dofs_per_cell,
- ExcWrongFieldDimension(local_mass_matrix.n(),dofs_per_cell));
+ typename FiniteElementBase<dim>::
+ ExcWrongFieldDimension(local_mass_matrix.n(),
+ dofs_per_cell));
Assert (local_mass_matrix.m() == dofs_per_cell,
- ExcWrongFieldDimension(local_mass_matrix.m(),dofs_per_cell));
+ typename FiniteElementBase<dim>::
+ ExcWrongFieldDimension(local_mass_matrix.m(),
+ dofs_per_cell));
// track which component we are
// presently working with, since we
unit_quadrature_points(quadrature.get_points())
{
Assert ((update_flags & update_normal_vectors) == false,
- ExcInvalidUpdateFlag());
+ typename FEValuesBase<dim>::ExcInvalidUpdateFlag());
for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
for (unsigned int j=0; j<n_quadrature_points; ++j)
Assert (static_cast<const FiniteElementData<dim>&>(*fe)
==
static_cast<const FiniteElementData<dim>&>(cell->get_dof_handler().get_fe()),
- ExcFEDontMatch());
+ typename FEValuesBase<dim>::ExcFEDontMatch());
// fill jacobi matrices and real
// quadrature points
{
Assert (i<normal_vectors.size(), ExcIndexRange(i, 0, normal_vectors.size()));
Assert (update_flags & update_normal_vectors,
- ExcAccessToUninitializedField());
+ typename FEValuesBase<dim>::ExcAccessToUninitializedField());
return normal_vectors[i];
};
Assert (static_cast<const FiniteElementData<dim>&>(*fe)
==
static_cast<const FiniteElementData<dim>&>(cell->get_dof_handler().get_fe()),
- ExcFEDontMatch());
+ typename FEValuesBase<dim>::ExcFEDontMatch());
Assert (face_no < GeometryInfo<dim>::faces_per_cell,
ExcIndexRange (face_no, 0, GeometryInfo<dim>::faces_per_cell));
fe)
{
Assert ((update_flags & update_support_points) == false,
- ExcInvalidUpdateFlag());
+ typename FEValuesBase<dim>::ExcInvalidUpdateFlag());
unit_face_quadrature_points = quadrature.get_points();
weights = quadrature.get_weights ();
Assert (static_cast<const FiniteElementData<dim>&>(*fe)
==
static_cast<const FiniteElementData<dim>&>(cell->get_dof_handler().get_fe()),
- ExcFEDontMatch());
+ typename FEValuesBase<dim>::ExcFEDontMatch());
Assert (face_no < GeometryInfo<dim>::faces_per_cell,
ExcIndexRange (face_no, 0, GeometryInfo<dim>::faces_per_cell));
Assert (subface_no < GeometryInfo<dim>::subfaces_per_face,
const vector<vector<Tensor<1,dim> > > &shape_grad_transform) const
{
Assert ((!compute_jacobians) || (jacobians.size() == unit_points.size()),
- ExcWrongFieldDimension(jacobians.size(), unit_points.size()));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension(jacobians.size(),
+ unit_points.size()));
Assert ((!compute_jacobians_grad) || (jacobians_grad.size() == unit_points.size()),
- ExcWrongFieldDimension(jacobians_grad.size(), unit_points.size()));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension(jacobians_grad.size(),
+ unit_points.size()));
Assert ((!compute_q_points) || (q_points.size() == unit_points.size()),
- ExcWrongFieldDimension(q_points.size(), unit_points.size()));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension(q_points.size(),
+ unit_points.size()));
Assert ((!compute_support_points) || (support_points.size() == dofs_per_cell),
- ExcWrongFieldDimension(support_points.size(), dofs_per_cell));
+ typename FiniteElementBase<dim>::ExcWrongFieldDimension(support_points.size(),
+ dofs_per_cell));
unsigned int n_points=unit_points.size();
{
const unsigned int n_flag_levels=refine_flags.size();
- AssertThrow (out, ExcIO());
+ AssertThrow (out, typename Triangulation<dim>::ExcIO());
out << mn_persistent_tria_flags_begin << ' ' << n_flag_levels << endl;
out << mn_persistent_tria_flags_end << endl;
- AssertThrow (out, ExcIO());
+ AssertThrow (out, typename Triangulation<dim>::ExcIO());
}
void
PersistentTriangulation<dim>::read_flags(istream &in)
{
- Assert(refine_flags.size()==0 && coarsen_flags.size()==0, ExcTriaNotEmpty());
+ Assert(refine_flags.size()==0 && coarsen_flags.size()==0,
+ ExcTriaNotEmpty());
- AssertThrow (in, ExcIO());
+ AssertThrow (in, typename Triangulation<dim>::ExcIO());
unsigned int magic_number;
in >> magic_number;
- AssertThrow(magic_number==mn_persistent_tria_flags_begin, ExcGridReadError());
+ AssertThrow(magic_number==mn_persistent_tria_flags_begin,
+ typename Triangulation<dim>::ExcGridReadError());
unsigned int n_flag_levels;
in >> n_flag_levels;
}
in >> magic_number;
- AssertThrow(magic_number==mn_persistent_tria_flags_end, ExcGridReadError());
+ AssertThrow(magic_number==mn_persistent_tria_flags_end,
+ typename Triangulation<dim>::ExcGridReadError());
- AssertThrow (in, ExcIO());
+ AssertThrow (in, typename Triangulation<dim>::ExcIO());
}
/*------------------------ Functions: LineAccessor ---------------------------*/
template <int dim>
-void TriaObjectAccessor<1, dim>::set (const Line &line) const {
+void TriaObjectAccessor<1, dim>::set (const Line &line) const
+{
tria->levels[present_level]->lines.lines[present_index] = line;
};
+
template <int dim>
-int TriaObjectAccessor<1, dim>::vertex_index (const unsigned int i) const {
+int TriaObjectAccessor<1, dim>::vertex_index (const unsigned int i) const
+{
Assert (i<2, ExcIndexRange(i,0,2));
return tria->levels[present_level]->lines.lines[present_index].vertex (i);
};
+
template <int dim>
Point<dim> &
-TriaObjectAccessor<1, dim>::vertex (const unsigned int i) const {
+TriaObjectAccessor<1, dim>::vertex (const unsigned int i) const
+{
return tria->vertices[vertex_index(i)];
};
+
template <int dim>
-void TriaObjectAccessor<1, dim>::set_used_flag () const {
- Assert (state() == valid, ExcDereferenceInvalidObject());
+void TriaObjectAccessor<1, dim>::set_used_flag () const
+{
+ Assert (state() == valid,
+ typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
tria->levels[present_level]->lines.used[present_index] = true;
};
+
template <int dim>
-void TriaObjectAccessor<1, dim>::clear_used_flag () const {
- Assert (state() == valid, ExcDereferenceInvalidObject());
+void TriaObjectAccessor<1, dim>::clear_used_flag () const
+{
+ Assert (state() == valid,
+ typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
tria->levels[present_level]->lines.used[present_index] = false;
};
+
template <int dim>
-void TriaObjectAccessor<1, dim>::recursively_set_user_flag () const {
+void TriaObjectAccessor<1, dim>::recursively_set_user_flag () const
+{
set_user_flag ();
if (has_children())
};
+
template <int dim>
-void TriaObjectAccessor<1, dim>::recursively_clear_user_flag () const {
+void TriaObjectAccessor<1, dim>::recursively_clear_user_flag () const
+{
clear_user_flag ();
if (has_children())
};
+
template <int dim>
-void TriaObjectAccessor<1, dim>::set_user_pointer (void *p) const {
- Assert (used(), ExcCellNotUsed());
+void TriaObjectAccessor<1, dim>::set_user_pointer (void *p) const
+{
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
tria->levels[present_level]->lines.user_pointers[present_index] = p;
};
+
template <int dim>
-void TriaObjectAccessor<1, dim>::clear_user_pointer () const {
- Assert (used(), ExcCellNotUsed());
+void TriaObjectAccessor<1, dim>::clear_user_pointer () const
+{
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
tria->levels[present_level]->lines.user_pointers[present_index] = 0;
};
+
template <int dim>
-void * TriaObjectAccessor<1, dim>::user_pointer () const {
- Assert (used(), ExcCellNotUsed());
+void * TriaObjectAccessor<1, dim>::user_pointer () const
+{
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
return tria->levels[present_level]->lines.user_pointers[present_index];
};
+
template <int dim>
-void TriaObjectAccessor<1, dim>::set_children (const int index) const {
- Assert (used(), ExcCellNotUsed());
+void TriaObjectAccessor<1, dim>::set_children (const int index) const
+{
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
Assert ((index==-1) ||
- (!has_children() && (index>=0)), ExcCantSetChildren(index));
+ (!has_children() && (index>=0)),
+ typename TriaAccessor<dim>::ExcCantSetChildren(index));
tria->levels[present_level]->lines.children[present_index] = index;
};
+
template <int dim>
-void TriaObjectAccessor<1, dim>::clear_children () const {
+void TriaObjectAccessor<1, dim>::clear_children () const
+{
set_children (-1);
};
+
template <int dim>
-unsigned char TriaObjectAccessor<1, dim>::boundary_indicator () const {
- Assert (dim>=2, ExcNotUsefulForThisDimension());
- Assert (used(), ExcCellNotUsed());
+unsigned char TriaObjectAccessor<1, dim>::boundary_indicator () const
+{
+ Assert (dim>=2, typename TriaAccessor<dim>::ExcNotUsefulForThisDimension());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
return tria->levels[present_level]->lines.material_id[present_index];
};
+
template <int dim>
-void TriaObjectAccessor<1, dim>::set_boundary_indicator (unsigned char boundary_ind) const {
- Assert (dim>=2, ExcNotUsefulForThisDimension());
- Assert (used(), ExcCellNotUsed());
+void TriaObjectAccessor<1, dim>::set_boundary_indicator (unsigned char boundary_ind) const
+{
+ Assert (dim>=2, typename TriaAccessor<dim>::ExcNotUsefulForThisDimension());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
tria->levels[present_level]->lines.material_id[present_index] = boundary_ind;
};
+
template <int dim>
-bool TriaObjectAccessor<1, dim>::at_boundary () const {
+bool TriaObjectAccessor<1, dim>::at_boundary () const
+{
// error checking is done
// in boundary_indicator()
return (boundary_indicator() != 255);
};
+
template <int dim>
-double TriaObjectAccessor<1, dim>::diameter () const {
+double TriaObjectAccessor<1, dim>::diameter () const
+{
return sqrt((vertex(1)-vertex(0)).square());
};
+
template <int dim>
-Point<dim> TriaObjectAccessor<1, dim>::center () const {
+Point<dim> TriaObjectAccessor<1, dim>::center () const
+{
return (vertex(1)+vertex(0))/2.;
};
+
template <int dim>
-Point<dim> TriaObjectAccessor<1, dim>::barycenter () const {
+Point<dim> TriaObjectAccessor<1, dim>::barycenter () const
+{
return (vertex(1)+vertex(0))/2.;
};
+
template <int dim>
-double TriaObjectAccessor<1, dim>::measure () const {
+double TriaObjectAccessor<1, dim>::measure () const
+{
return sqrt((vertex(1)-vertex(0)).square());
};
+
template <int dim>
-unsigned int TriaObjectAccessor<1, dim>::number_of_children () const {
+unsigned int TriaObjectAccessor<1, dim>::number_of_children () const
+{
if (!has_children())
return 1;
else
/*------------------------ Functions: QuadAccessor ---------------------------*/
template <int dim>
-void TriaObjectAccessor<2, dim>::set (const Quad &quad) const {
+void TriaObjectAccessor<2, dim>::set (const Quad &quad) const
+{
tria->levels[present_level]->quads.quads[present_index] = quad;
};
+
template <int dim>
-int TriaObjectAccessor<2, dim>::vertex_index (const unsigned int corner) const {
+int TriaObjectAccessor<2, dim>::vertex_index (const unsigned int corner) const
+{
Assert (corner<4, ExcIndexRange(corner,0,4));
const int corner_convention[4] = { 0,0,1,1 };
};
+
template <int dim>
Point<dim> &
-TriaObjectAccessor<2, dim>::vertex (const unsigned int i) const {
+TriaObjectAccessor<2, dim>::vertex (const unsigned int i) const
+{
return tria->vertices[vertex_index(i)];
};
+
template <int dim>
void
-TriaObjectAccessor<2, dim>::set_used_flag () const {
- Assert (state() == valid, ExcDereferenceInvalidObject());
+TriaObjectAccessor<2, dim>::set_used_flag () const
+{
+ Assert (state() == valid, typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
tria->levels[present_level]->quads.used[present_index] = true;
};
+
template <int dim>
-void TriaObjectAccessor<2, dim>::clear_used_flag () const {
- Assert (state() == valid, ExcDereferenceInvalidObject());
+void TriaObjectAccessor<2, dim>::clear_used_flag () const
+{
+ Assert (state() == valid, typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
tria->levels[present_level]->quads.used[present_index] = false;
};
+
template <int dim>
-void TriaObjectAccessor<2, dim>::recursively_set_user_flag () const {
+void TriaObjectAccessor<2, dim>::recursively_set_user_flag () const
+{
set_user_flag ();
if (has_children())
};
+
template <int dim>
-void TriaObjectAccessor<2, dim>::recursively_clear_user_flag () const {
+void TriaObjectAccessor<2, dim>::recursively_clear_user_flag () const
+{
clear_user_flag ();
if (has_children())
};
+
template <int dim>
-void TriaObjectAccessor<2, dim>::set_user_pointer (void *p) const {
- Assert (used(), ExcCellNotUsed());
+void TriaObjectAccessor<2, dim>::set_user_pointer (void *p) const
+{
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
tria->levels[present_level]->quads.user_pointers[present_index] = p;
};
+
template <int dim>
-void TriaObjectAccessor<2, dim>::clear_user_pointer () const {
- Assert (used(), ExcCellNotUsed());
+void TriaObjectAccessor<2, dim>::clear_user_pointer () const
+{
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
tria->levels[present_level]->quads.user_pointers[present_index] = 0;
};
+
template <int dim>
-void * TriaObjectAccessor<2, dim>::user_pointer () const {
- Assert (used(), ExcCellNotUsed());
+void * TriaObjectAccessor<2, dim>::user_pointer () const
+{
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
return tria->levels[present_level]->quads.user_pointers[present_index];
};
+
template <int dim>
-void TriaObjectAccessor<2, dim>::set_children (const int index) const {
- Assert (used(), ExcCellNotUsed());
+void TriaObjectAccessor<2, dim>::set_children (const int index) const
+{
+ Assert (used(),
+ typename TriaAccessor<dim>::ExcCellNotUsed());
Assert ((index==-1) ||
- (!has_children() && (index>=0)), ExcCantSetChildren(index));
+ (!has_children() && (index>=0)),
+ typename TriaAccessor<dim>::ExcCantSetChildren(index));
tria->levels[present_level]->quads.children[present_index] = index;
};
+
template <int dim>
-void TriaObjectAccessor<2, dim>::clear_children () const {
+void TriaObjectAccessor<2, dim>::clear_children () const
+{
set_children (-1);
};
+
template <int dim>
-unsigned char TriaObjectAccessor<2, dim>::boundary_indicator () const {
- Assert (dim>=3, ExcNotUsefulForThisDimension());
- Assert (used(), ExcCellNotUsed());
+unsigned char TriaObjectAccessor<2, dim>::boundary_indicator () const
+{
+ Assert (dim>=3, typename TriaAccessor<dim>::ExcNotUsefulForThisDimension());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
return tria->levels[present_level]->quads.material_id[present_index];
};
+
template <int dim>
-void TriaObjectAccessor<2, dim>::set_boundary_indicator (unsigned char boundary_ind) const {
- Assert (dim>=3, ExcNotUsefulForThisDimension());
- Assert (used(), ExcCellNotUsed());
+void TriaObjectAccessor<2, dim>::set_boundary_indicator (unsigned char boundary_ind) const
+{
+ Assert (dim>=3, typename TriaAccessor<dim>::ExcNotUsefulForThisDimension());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
tria->levels[present_level]->quads.material_id[present_index] = boundary_ind;
};
+
template <int dim>
-bool TriaObjectAccessor<2, dim>::at_boundary () const {
+bool TriaObjectAccessor<2, dim>::at_boundary () const
+{
// error checking is done
// in boundary_indicator()
return (boundary_indicator() != 255);
};
+
template <int dim>
-double TriaObjectAccessor<2, dim>::diameter () const {
+double TriaObjectAccessor<2, dim>::diameter () const
+{
return sqrt(max((vertex(2)-vertex(0)).square(),
(vertex(3)-vertex(1)).square()));
};
+
template <int dim>
-Point<dim> TriaObjectAccessor<2, dim>::center () const {
+Point<dim> TriaObjectAccessor<2, dim>::center () const
+{
return (vertex(0)+vertex(1)+vertex(2)+vertex(3))/4.;
};
#if deal_II_dimension == 2
template <>
-Point<2> TriaObjectAccessor<2, 2>::barycenter () const {
+Point<2> TriaObjectAccessor<2, 2>::barycenter () const
+{
// the evaluation of the formulae
// is a bit tricky when done dimension
// independant, so we write this function
};
+
template <>
-double TriaObjectAccessor<2, 2>::measure () const {
+double TriaObjectAccessor<2, 2>::measure () const
+{
// the evaluation of the formulae
// is a bit tricky when done dimension
// independant, so we write this function
#if deal_II_dimension == 3
template <>
-Point<3> TriaObjectAccessor<2, 3>::barycenter () const {
+Point<3> TriaObjectAccessor<2, 3>::barycenter () const
+{
// the evaluation of the formulae
// is a bit tricky when done dimension
// independant, so we write this function
};
+
template <>
-double TriaObjectAccessor<2, 3>::measure () const {
+double TriaObjectAccessor<2, 3>::measure () const
+{
// the evaluation of the formulae
// is a bit tricky when done dimension
// independant, so we write this function
template <int dim>
-unsigned int TriaObjectAccessor<2, dim>::number_of_children () const {
+unsigned int TriaObjectAccessor<2, dim>::number_of_children () const
+{
if (!has_children())
return 1;
else
/*------------------------ Functions: TriaObjectAccessor ---------------------------*/
template <int dim>
-void TriaObjectAccessor<3, dim>::set (const Hexahedron &hex) const {
+void TriaObjectAccessor<3, dim>::set (const Hexahedron &hex) const
+{
tria->levels[present_level]->hexes.hexes[present_index] = hex;
};
+
template <int dim>
-int TriaObjectAccessor<3, dim>::vertex_index (const unsigned int corner) const {
+int TriaObjectAccessor<3, dim>::vertex_index (const unsigned int corner) const
+{
Assert (corner<8, ExcIndexRange(corner,0,8));
// get the corner indices by asking
};
+
template <int dim>
Point<dim> &
-TriaObjectAccessor<3, dim>::vertex (const unsigned int i) const {
+TriaObjectAccessor<3, dim>::vertex (const unsigned int i) const
+{
return tria->vertices[vertex_index(i)];
};
+
template <int dim>
-void TriaObjectAccessor<3, dim>::set_used_flag () const {
- Assert (state() == valid, ExcDereferenceInvalidObject());
+void TriaObjectAccessor<3, dim>::set_used_flag () const
+{
+ Assert (state() == valid, typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
tria->levels[present_level]->hexes.used[present_index] = true;
};
+
template <int dim>
-void TriaObjectAccessor<3, dim>::clear_used_flag () const {
- Assert (state() == valid, ExcDereferenceInvalidObject());
+void TriaObjectAccessor<3, dim>::clear_used_flag () const
+{
+ Assert (state() == valid, typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
tria->levels[present_level]->hexes.used[present_index] = false;
};
+
template <int dim>
-void TriaObjectAccessor<3, dim>::recursively_set_user_flag () const {
+void TriaObjectAccessor<3, dim>::recursively_set_user_flag () const
+{
set_user_flag ();
if (has_children())
};
+
template <int dim>
-void TriaObjectAccessor<3, dim>::recursively_clear_user_flag () const {
+void TriaObjectAccessor<3, dim>::recursively_clear_user_flag () const
+{
clear_user_flag ();
if (has_children())
};
+
template <int dim>
-void TriaObjectAccessor<3, dim>::set_user_pointer (void *p) const {
- Assert (used(), ExcCellNotUsed());
+void TriaObjectAccessor<3, dim>::set_user_pointer (void *p) const
+{
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
tria->levels[present_level]->hexes.user_pointers[present_index] = p;
};
+
template <int dim>
-void TriaObjectAccessor<3, dim>::clear_user_pointer () const {
- Assert (used(), ExcCellNotUsed());
+void TriaObjectAccessor<3, dim>::clear_user_pointer () const
+{
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
tria->levels[present_level]->hexes.user_pointers[present_index] = 0;
};
+
template <int dim>
-void * TriaObjectAccessor<3, dim>::user_pointer () const {
- Assert (used(), ExcCellNotUsed());
+void * TriaObjectAccessor<3, dim>::user_pointer () const
+{
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
return tria->levels[present_level]->hexes.user_pointers[present_index];
};
+
template <int dim>
-void TriaObjectAccessor<3, dim>::set_children (const int index) const {
- Assert (used(), ExcCellNotUsed());
+void TriaObjectAccessor<3, dim>::set_children (const int index) const
+{
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
Assert ((index==-1) ||
- (!has_children() && (index>=0)), ExcCantSetChildren(index));
+ (!has_children() && (index>=0)),
+ typename TriaAccessor<dim>::ExcCantSetChildren(index));
tria->levels[present_level]->hexes.children[present_index] = index;
};
+
template <int dim>
-void TriaObjectAccessor<3, dim>::clear_children () const {
+void TriaObjectAccessor<3, dim>::clear_children () const
+{
set_children (-1);
};
+
template <int dim>
-unsigned char TriaObjectAccessor<3, dim>::boundary_indicator () const {
- Assert (dim<4, ExcNotUsefulForThisDimension());
- Assert (used(), ExcCellNotUsed());
+unsigned char TriaObjectAccessor<3, dim>::boundary_indicator () const
+{
+ Assert (dim<4, typename TriaAccessor<dim>::ExcNotUsefulForThisDimension());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
return tria->levels[present_level]->hexes.material_id[present_index];
};
+
template <int dim>
-void TriaObjectAccessor<3, dim>::set_boundary_indicator (unsigned char boundary_ind) const {
- Assert (dim<4, ExcNotUsefulForThisDimension());
- Assert (used(), ExcCellNotUsed());
+void TriaObjectAccessor<3, dim>::set_boundary_indicator (unsigned char boundary_ind) const
+{
+ Assert (dim<4, typename TriaAccessor<dim>::ExcNotUsefulForThisDimension());
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
tria->levels[present_level]->hexes.material_id[present_index] = boundary_ind;
};
+
template <int dim>
-bool TriaObjectAccessor<3, dim>::at_boundary () const {
+bool TriaObjectAccessor<3, dim>::at_boundary () const
+{
// error checking is done
// in boundary_indicator()
return (boundary_indicator() != 255);
};
+
template <int dim>
-double TriaObjectAccessor<3, dim>::diameter () const {
+double TriaObjectAccessor<3, dim>::diameter () const
+{
return sqrt(max( max((vertex(6)-vertex(0)).square(),
(vertex(7)-vertex(1)).square()),
max((vertex(4)-vertex(2)).square(),
};
+
template <int dim>
-Point<dim> TriaObjectAccessor<3, dim>::center () const {
+Point<dim> TriaObjectAccessor<3, dim>::center () const
+{
return (vertex(0)+vertex(1)+vertex(2)+vertex(3)+
vertex(4)+vertex(5)+vertex(6)+vertex(7))/8.;
};
#if deal_II_dimension == 3
template <>
-Point<3> TriaObjectAccessor<3, 3>::barycenter () const {
+Point<3> TriaObjectAccessor<3, 3>::barycenter () const
+{
/*
Get the computation of the barycenter by this little Maple script. We
use the trilinear mapping of the unit hex to the real hex.
};
+
template <>
-double TriaObjectAccessor<3, 3>::measure () const {
+double TriaObjectAccessor<3, 3>::measure () const
+{
/*
Get the computation of the measure by the same little Maple script as above.
*/
#endif
+
template <int dim>
-unsigned int TriaObjectAccessor<3, dim>::number_of_children () const {
+unsigned int TriaObjectAccessor<3, dim>::number_of_children () const
+{
if (!has_children())
return 1;
else
#if deal_II_dimension == 1
template <>
-bool CellAccessor<1>::at_boundary () const {
+bool CellAccessor<1>::at_boundary () const
+{
return at_boundary(0) || at_boundary(1);
};
+
template <>
-unsigned char CellAccessor<1>::material_id () const {
+unsigned char CellAccessor<1>::material_id () const
+{
Assert (used(), ExcCellNotUsed());
return tria->levels[present_level]->lines.material_id[present_index];
};
+
template <>
-void CellAccessor<1>::set_material_id (const unsigned char mat_id) const {
+void CellAccessor<1>::set_material_id (const unsigned char mat_id) const
+{
Assert (used(), ExcCellNotUsed());
tria->levels[present_level]->lines.material_id[present_index]
= mat_id;
#if deal_II_dimension == 2
template <>
-bool CellAccessor<2>::at_boundary () const {
+bool CellAccessor<2>::at_boundary () const
+{
return at_boundary(0) || at_boundary(1) || at_boundary(2) || at_boundary(3);
};
+
template <>
-unsigned char CellAccessor<2>::material_id () const {
+unsigned char CellAccessor<2>::material_id () const
+{
Assert (used(), ExcCellNotUsed());
return tria->levels[present_level]->quads.material_id[present_index];
};
+
template <>
-void CellAccessor<2>::set_material_id (const unsigned char mat_id) const {
+void CellAccessor<2>::set_material_id (const unsigned char mat_id) const
+{
Assert (used(), ExcCellNotUsed());
tria->levels[present_level]->quads.material_id[present_index]
= mat_id;
#if deal_II_dimension == 3
template <>
-bool CellAccessor<3>::at_boundary () const {
+bool CellAccessor<3>::at_boundary () const
+{
return (at_boundary(0) || at_boundary(1) ||
at_boundary(2) || at_boundary(3) ||
at_boundary(4) || at_boundary(5));
};
+
template <>
-unsigned char CellAccessor<3>::material_id () const {
+unsigned char CellAccessor<3>::material_id () const
+{
Assert (used(), ExcCellNotUsed());
return tria->levels[present_level]->hexes.material_id[present_index];
};
+
template <>
-void CellAccessor<3>::set_material_id (const unsigned char mat_id) const {
+void CellAccessor<3>::set_material_id (const unsigned char mat_id) const
+{
Assert (used(), ExcCellNotUsed());
tria->levels[present_level]->hexes.material_id[present_index]
= mat_id;
template <int dim>
void CellAccessor<dim>::set_neighbor (const unsigned int i,
- const TriaIterator<dim,CellAccessor<dim> > &pointer) const {
- Assert (i<GeometryInfo<dim>::faces_per_cell, ExcInvalidNeighbor(i));
+ const TriaIterator<dim,CellAccessor<dim> > &pointer) const
+{
+ Assert (i<GeometryInfo<dim>::faces_per_cell,
+ typename TriaAccessor<dim>::ExcInvalidNeighbor(i));
if (pointer.state() == valid)
{
};
+
template <int dim>
unsigned int CellAccessor<dim>::neighbor_of_neighbor (const unsigned int neighbor) const
{
// make sure that the neighbor is
// not on a coarser level
Assert (neighbor_level(neighbor) == present_level,
- ExcNeighborIsCoarser());
+ typename TriaAccessor<dim>::ExcNeighborIsCoarser());
Assert (neighbor < GeometryInfo<dim>::faces_per_cell,
- ExcInvalidNeighbor(neighbor));
+ typename TriaAccessor<dim>::ExcInvalidNeighbor(neighbor));
const TriaIterator<dim,CellAccessor<dim> > neighbor_cell = this->neighbor(neighbor);
};
+
template <int dim>
-bool CellAccessor<dim>::at_boundary (const unsigned int i) const {
- Assert (used(), ExcCellNotUsed());
+bool CellAccessor<dim>::at_boundary (const unsigned int i) const
+{
+ Assert (used(), typename TriaAccessor<dim>::ExcCellNotUsed());
Assert (i<GeometryInfo<dim>::faces_per_cell,
ExcIndexRange (i,0,GeometryInfo<dim>::faces_per_cell));
};
+
// explicit instantiations
template class TriaAccessor<deal_II_dimension>;
template class TriaObjectAccessor<1, deal_II_dimension>;
Point<dim>
StraightBoundary<dim>::get_new_point_on_quad (const typename Triangulation<dim>::quad_iterator &) const
{
- Assert (false, ExcPureVirtualFunctionCalled());
+ Assert (false, typename Boundary<dim>::ExcPureVirtualFunctionCalled());
return Point<dim>();
};
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line;
- vector<number>::iterator next_dof_value=dof_values.begin();
+ typename vector<number>::iterator next_dof_value=dof_values.begin();
for (unsigned int vertex=0; vertex<2; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
*next_dof_value++ = values(mg_vertex_dof_index(vertex,d));
const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex,
dofs_per_line = dof_handler->get_fe().dofs_per_line,
dofs_per_quad = dof_handler->get_fe().dofs_per_quad;
- vector<number>::iterator next_dof_value=dof_values.begin();
+ typename vector<number>::iterator next_dof_value=dof_values.begin();
for (unsigned int vertex=0; vertex<4; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
*next_dof_value++ = values(mg_vertex_dof_index(vertex,d));
dofs_per_line = dof_handler->get_fe().dofs_per_line,
dofs_per_quad = dof_handler->get_fe().dofs_per_quad,
dofs_per_hex = dof_handler->get_fe().dofs_per_hex;
- vector<number>::iterator next_dof_value=dof_values.begin();
+ typename vector<number>::iterator next_dof_value=dof_values.begin();
for (unsigned int vertex=0; vertex<8; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
*next_dof_value++ = values(mg_vertex_dof_index(vertex,d));
// in the docs
map<unsigned int, double> boundary_value_list;
- for (FunctionMap::const_iterator dirichlet = dirichlet_bc.begin() ;
+ for (typename FunctionMap::const_iterator dirichlet = dirichlet_bc.begin() ;
dirichlet != dirichlet_bc.end() ; ++dirichlet)
VectorTools::interpolate_boundary_values (*dof_handler,
dirichlet->first,
vector<string> names;
// collect the names of dof
// and cell data
- for (vector<DataEntry>::const_iterator d=dof_data.begin(); d!=dof_data.end(); ++d)
+ for (typename vector<DataEntry>::const_iterator d=dof_data.begin();
+ d!=dof_data.end(); ++d)
for (unsigned int i=0; i<d->names.size(); ++i)
names.push_back (d->names[i]);
- for (vector<DataEntry>::const_iterator d=cell_data.begin(); d!=cell_data.end(); ++d)
+ for (typename vector<DataEntry>::const_iterator d=cell_data.begin();
+ d!=cell_data.end(); ++d)
{
Assert (d->names.size() == 1, ExcInternalError());
names.push_back (d->names[0]);
const unsigned int n_q_points = patch_points.n_quadrature_points;
unsigned int cell_number = 0;
- vector<DataOutBase::Patch<dim> >::iterator patch = patches.begin();
+ typename vector<DataOutBase::Patch<dim> >::iterator patch = patches.begin();
DoFHandler<dim>::cell_iterator cell=first_cell();
// get first cell in this thread
void DataOut<dim>::build_patches (const unsigned int n_subdivisions,
const unsigned int n_threads_)
{
- Assert (dofs != 0, ExcNoDoFHandlerSelected());
+ Assert (dofs != 0, typename DataOut_DoFData<dim>::ExcNoDoFHandlerSelected());
#ifdef DEAL_II_USE_MT
const unsigned int n_threads = n_threads_;
//
// this is to prevent serious waste of
// memory
- for (vector<DataVector>::const_iterator i=dof_data.begin(); i!=dof_data.end(); ++i)
+ for (typename vector<DataVector>::const_iterator i=dof_data.begin();
+ i!=dof_data.end(); ++i)
Assert (i->data.size() == 0,
ExcDataNotCleared ());
- for (vector<DataVector>::const_iterator i=cell_data.begin(); i!=cell_data.end(); ++i)
+ for (typename vector<DataVector>::const_iterator i=cell_data.begin();
+ i!=cell_data.end(); ++i)
Assert (i->data.size() == 0,
ExcDataNotCleared ());
// used twice
for (vector<string>::const_iterator name=names.begin(); name!=names.end(); ++name)
{
- for (vector<DataVector>::const_iterator data_set=dof_data.begin();
+ for (typename vector<DataVector>::const_iterator data_set=dof_data.begin();
data_set!=dof_data.end(); ++data_set)
for (unsigned int i=0; i<data_set->names.size(); ++i)
Assert (*name != data_set->names[i], ExcNameAlreadyUsed(*name));
- for (vector<DataVector>::const_iterator data_set=cell_data.begin();
+ for (typename vector<DataVector>::const_iterator data_set=cell_data.begin();
data_set!=cell_data.end(); ++data_set)
for (unsigned int i=0; i<data_set->names.size(); ++i)
Assert (*name != data_set->names[i], ExcNameAlreadyUsed(*name));
if (vec.size() == dof_handler->n_dofs())
{
- vector<DataVector>::iterator data_vector=dof_data.begin();
+ typename vector<DataVector>::iterator data_vector=dof_data.begin();
for (; data_vector!=dof_data.end(); ++data_vector)
if (data_vector->names == names)
{
}
else
{
- vector<DataVector>::iterator data_vector=cell_data.begin();
+ typename vector<DataVector>::iterator data_vector=cell_data.begin();
for (; data_vector!=cell_data.end(); ++data_vector)
if (data_vector->names == names)
{
// now loop over all cells and
// actually create the patches
- vector<DataOutBase::Patch<dim+1> >::iterator patch = &patches[patches.size()-n_patches];
- unsigned int cell_number = 0;
- for (DoFHandler<dim>::active_cell_iterator cell=dof_handler->begin_active();
+ typename vector<DataOutBase::Patch<dim+1> >::iterator patch = &patches[patches.size()-n_patches];
+ unsigned int cell_number = 0;
+ for (typename DoFHandler<dim>::active_cell_iterator cell=dof_handler->begin_active();
cell != dof_handler->end(); ++cell, ++patch, ++cell_number)
{
Assert (patch != patches.end(), ExcInternalError());
{
// release lock on dof handler
dof_handler = 0;
- for (vector<DataVector>::iterator i=dof_data.begin(); i!=dof_data.end(); ++i)
+ for (typename vector<DataVector>::iterator i=dof_data.begin();
+ i!=dof_data.end(); ++i)
i->data.reinit (0);
- for (vector<DataVector>::iterator i=cell_data.begin(); i!=cell_data.end(); ++i)
+ for (typename vector<DataVector>::iterator i=cell_data.begin();
+ i!=cell_data.end(); ++i)
i->data.reinit (0);
};
vector<string> DataOutStack<dim>::get_dataset_names () const
{
vector<string> names;
- for (vector<DataVector>::const_iterator dataset=dof_data.begin();
+ for (typename vector<DataVector>::const_iterator dataset=dof_data.begin();
dataset!=dof_data.end(); ++dataset)
names.insert (names.end(), dataset->names.begin(), dataset->names.end());
- for (vector<DataVector>::const_iterator dataset=cell_data.begin();
+ for (typename vector<DataVector>::const_iterator dataset=cell_data.begin();
dataset!=cell_data.end(); ++dataset)
names.insert (names.end(), dataset->names.begin(), dataset->names.end());
// now loop over all active
// neighbors and collect the
// data we need
- vector<DoFHandler<dim>::active_cell_iterator>::const_iterator
+ typename vector<DoFHandler<dim>::active_cell_iterator>::const_iterator
neighbor_ptr = active_neighbors.begin();
for (; neighbor_ptr!=active_neighbors.end(); ++neighbor_ptr)
{
Assert (neumann_bc.find(255) == neumann_bc.end(),
ExcInvalidBoundaryIndicator());
- for (FunctionMap::const_iterator i=neumann_bc.begin(); i!=neumann_bc.end(); ++i)
+ for (typename FunctionMap::const_iterator i=neumann_bc.begin(); i!=neumann_bc.end(); ++i)
Assert (i->second->n_components == n_components, ExcInvalidBoundaryFunction());
// the last cell, often needed
// now loop over all active
// neighbors and collect the
// data we need
- vector<DoFHandler<dim>::active_cell_iterator>::const_iterator
+ typename vector<DoFHandler<dim>::active_cell_iterator>::const_iterator
neighbor_ptr = active_neighbors.begin();
for (; neighbor_ptr!=active_neighbors.end(); ++neighbor_ptr)
{
// obtain a reasonable view on the
// solution, we rescale the z-axis
// by a factor of four.
- DataOut<dim>::EpsFlags eps_flags;
+ typename DataOut<dim>::EpsFlags eps_flags;
eps_flags.z_scaling = 4;
DataOut<dim> data_out;
#include <fstream>
+
+// in strict ANSI C mode, the following constants are not defined by
+// default, so we do it ourselves
+#ifndef M_PI
+# define M_PI 3.14159265358979323846
+#endif
+
+
+
template <int dim>
class AdvectionProblem
{
output_results (cycle);
};
- DataOut<dim>::EpsFlags eps_flags;
+ typename DataOut<dim>::EpsFlags eps_flags;
eps_flags.z_scaling = 4;
DataOut<dim> data_out;
//TODO: Find better breakdown criterion (G)
- if (fabs(alpha) > 1.e10) return ReturnState(breakdown);
+ if (fabs(alpha) > 1.e10)
+ return typename Solver<VECTOR>::ReturnState(breakdown);
s.equ(1., r, -alpha, v);
precondition(z,s);
step = 0;
- ReturnState state = breakdown;
+ typename Solver<VECTOR>::ReturnState state = breakdown;
do
{
step = 0;
- ReturnState state = breakdown;
+ typename Solver<VECTOR>::ReturnState state = breakdown;
do
{
return state;
};
+
+
template<class VECTOR>
template<class MATRIX, class Preconditioner>
typename Solver<VECTOR>::ReturnState
res = A.residual(v, q, b);
if (control().check(step, res) == SolverControl::success)
- return ReturnState(success);
+ return success;
p = v;
//TODO: Find a really good breakdown criterion
// The absolute one detects breakdown instead of convergence
if (fabs(sigma) < additional_data.breakdown)
- return ReturnState(breakdown);
+ return breakdown;
// Step 3
alpha = rho/sigma;
//deallog << "alpha:" << alpha << endl;
res = sqrt((it+1)*tau);
state = control().check(step,res);
if (state == SolverControl::success)
- return ReturnState(success);
+ return success;
else if (state == SolverControl::failure)
- return ReturnState(exceeded);
+ return exceeded;
// Step 6
if (fabs(rho) < additional_data.breakdown)
- return ReturnState(breakdown);
+ return breakdown;
// Step 7
rho_old = rho;
precondition(q,v);
p.sadd(beta,v);
precondition(q,p);
}
- return ReturnState(exceeded);
+ return exceeded;
}
GrowingVectorMemory<Vector>::GrowingVectorMemory(const unsigned int initial_size)
: pool(initial_size)
{
- for (vector<entry_type>::iterator i=pool.begin();i != pool.end()
- ;++i)
+ for (typename vector<entry_type>::iterator i=pool.begin();
+ i != pool.end();
+ ++i)
{
i->first = false;
i->second = new Vector;
}
+
template<typename Vector>
GrowingVectorMemory<Vector>::~GrowingVectorMemory()
{
unsigned int n = 0;
- for (vector<entry_type>::iterator i=pool.begin();i != pool.end() ;++i)
+ for (typename vector<entry_type>::iterator i=pool.begin();
+ i != pool.end();
+ ++i)
{
if (i->first == true)
++n;
}
+
template<typename Vector>
Vector*
GrowingVectorMemory<Vector>::alloc()
{
++n_alloc;
- for (vector<entry_type>::iterator i=pool.begin();i != pool.end() ;++i)
+ for (typename vector<entry_type>::iterator i=pool.begin();
+ i != pool.end();
+ ++i)
{
if (i->first == false)
{
}
+
template<typename Vector>
void
GrowingVectorMemory<Vector>::free(const Vector* const v)
{
- for (vector<entry_type>::iterator i=pool.begin();i != pool.end() ;++i)
+ for (typename vector<entry_type>::iterator i=pool.begin();i != pool.end() ;++i)
{
if (v == (i->second))
{
return;
}
}
- Assert(false, ExcNotAllocatedHere());
+ Assert(false, typename VectorMemory<Vector>::ExcNotAllocatedHere());
}
void PoissonEquation<dim>::assemble (FullMatrix<double> &,
const FEValues<dim> &,
const DoFHandler<dim>::cell_iterator &) const {
- Assert (false, ExcPureVirtualFunctionCalled());
+ Assert (false, typename Equation<dim>::ExcPureVirtualFunctionCalled());
};
void PoissonEquation<dim>::assemble (Vector<double> &,
const FEValues<dim> &,
const DoFHandler<dim>::cell_iterator &) const {
- Assert (false, ExcPureVirtualFunctionCalled());
+ Assert (false, typename Equation<dim>::ExcPureVirtualFunctionCalled());
};
void PoissonEquation<dim>::assemble (FullMatrix<double> &,
const FEValues<dim> &,
const DoFHandler<dim>::cell_iterator &) const {
- Assert (false, ExcPureVirtualFunctionCalled());
+ Assert (false, typename Equation<dim>::ExcPureVirtualFunctionCalled());
};
void PoissonEquation<dim>::assemble (Vector<double> &,
const FEValues<dim> &,
const DoFHandler<dim>::cell_iterator &) const {
- Assert (false, ExcPureVirtualFunctionCalled());
+ Assert (false, typename Equation<dim>::ExcPureVirtualFunctionCalled());
};
solve ();
output_results (cycle);
- DataOut<dim>::EpsFlags eps_flags;
+ typename DataOut<dim>::EpsFlags eps_flags;
eps_flags.z_scaling = 4;
DataOut<dim> data_out;
void PoissonEquation<dim>::assemble (FullMatrix<double> &,
const FEValues<dim> &,
const DoFHandler<dim>::cell_iterator &) const {
- Assert (false, ExcPureVirtualFunctionCalled());
+ Assert (false, typename Equation<dim>::ExcPureVirtualFunctionCalled());
};
void PoissonEquation<dim>::assemble (Vector<double> &,
const FEValues<dim> &,
const DoFHandler<dim>::cell_iterator &) const {
- Assert (false, ExcPureVirtualFunctionCalled());
+ Assert (false, typename Equation<dim>::ExcPureVirtualFunctionCalled());
};
void PoissonEquation<dim>::assemble (FullMatrix<double> &,
const FEValues<dim> &,
const DoFHandler<dim>::cell_iterator &) const {
- Assert (false, ExcPureVirtualFunctionCalled());
+ Assert (false, typename Equation<dim>::ExcPureVirtualFunctionCalled());
};
void PoissonEquation<dim>::assemble (Vector<double> &,
const FEValues<dim> &,
const DoFHandler<dim>::cell_iterator &) const {
- Assert (false, ExcPureVirtualFunctionCalled());
+ Assert (false, typename Equation<dim>::ExcPureVirtualFunctionCalled());
};
virtual void solve_primal_problem ();
virtual string branch_signature () const;
virtual void wake_up (const unsigned int wakeup_level);
+ virtual void end_sweep ()
+ {
+ TimeStep_Wave<dim>::end_sweep();
+ };
+ virtual void sleep (const unsigned int sleep_level)
+ {
+ TimeStep_Wave<dim>::sleep (sleep_level);
+ };
+
private:
void assemble_vectors (Vector<double> &right_hand_side1,
virtual string branch_signature () const;
virtual void wake_up (const unsigned int wakeup_level);
+ virtual void end_sweep ()
+ {
+ TimeStep_Wave<dim>::end_sweep();
+ };
+ virtual void sleep (const unsigned int sleep_level)
+ {
+ TimeStep_Wave<dim>::sleep (sleep_level);
+ };
+
+
private:
void assemble_vectors (Vector<double> &right_hand_side1,
Vector<double> &right_hand_side2);
const unsigned int n_q_points = quadrature_face->n_quadrature_points;
ofstream out((base_file_name + ".seismic").c_str());
- AssertThrow (out, ExcIO());
+ AssertThrow (out, typename EvaluationBase<dim>::ExcIO());
DoFHandler<dim>::active_cell_iterator cell = dof->begin_active(),
endc = dof->end();
<< endl
<< endl;
};
- AssertThrow (out, ExcIO());
+ AssertThrow (out, typename EvaluationBase<dim>::ExcIO());
out.close ();
if (time!=0)
solver_steps1 = solve (system_matrix, u, tmp_u_bar),
solver_steps2 = solve (system_matrix, v, tmp_v_bar);
- statistic_data = StatisticData (tria->n_active_cells(),
- dof_handler->n_dofs(),
- solver_steps1, solver_steps2,
- compute_energy ());
+ statistic_data = typename TimeStep_Wave<dim>::StatisticData (tria->n_active_cells(),
+ dof_handler->n_dofs(),
+ solver_steps1, solver_steps2,
+ compute_energy ());
}
else
- statistic_data = StatisticData (tria->n_active_cells(),
- dof_handler->n_dofs(),
- 0, 0,
- make_pair (0.0, 0.0));
+ statistic_data = typename TimeStep_Wave<dim>::StatisticData (tria->n_active_cells(),
+ dof_handler->n_dofs(),
+ 0, 0,
+ make_pair (0.0, 0.0));
deallog << "." << endl;
};
const unsigned int solver_steps2 = solve (system_matrix, u, right_hand_side2);
- statistic_data = StatisticData (tria->n_active_cells(),
- dof_handler->n_dofs(),
- solver_steps1,
- solver_steps2,
- compute_energy ());
+ statistic_data = typename TimeStep_Wave<dim>::StatisticData (tria->n_active_cells(),
+ dof_handler->n_dofs(),
+ solver_steps1,
+ solver_steps2,
+ compute_energy ());
deallog << "." << endl;
};
= static_cast<const TimeStepBase_Wave<dim>*>(next_timestep)->get_timestep_dual();
Assert (previous_time_level.tria->n_cells(0) == tria->n_cells(0),
- ExcCoarsestGridsDiffer());
+ typename TimeStep_Wave<dim>::ExcCoarsestGridsDiffer());
// convenience typedef
typedef DoFHandler<dim>::cell_iterator cell_iterator;
const WaveParameters<dim> ¶meters)
{
out << "# Primal problem:" << endl;
- TimeStep_Primal<dim>::StatisticData::write_descriptions (out);
+ typename TimeStep_Primal<dim>::StatisticData xp;
+ xp.write_descriptions (out);
out << "# Dual problem:" << endl;
- TimeStep_Dual<dim>::StatisticData::write_descriptions (out);
+ typename TimeStep_Dual<dim>::StatisticData xd;
+ xd.write_descriptions (out);
out << "# Error estimation:" << endl;
TimeStep_ErrorEstimation<dim>::StatisticData::write_descriptions (out);
deallog << "[o]";
DataOut<dim> out;
- DataOut<dim>::OutputFormat output_format
+ typename DataOut<dim>::OutputFormat output_format
= DataOut<dim>::parse_output_format (parameters.output_format);
string data_filename = (parameters.output_directory +
// set energy to zero since we
// don't want to assemble the matrices
// needed for this
- statistic_data = StatisticData (tria->n_active_cells(),
- dof_handler->n_dofs(),
- 0,
- 0,
- make_pair (0.0, 0.0));
+ statistic_data = typename TimeStep_Wave<dim>::StatisticData (tria->n_active_cells(),
+ dof_handler->n_dofs(),
+ 0,
+ 0,
+ make_pair (0.0, 0.0));
deallog << "." << endl;
};
const unsigned int solver_steps2 = solve (system_matrix, v, right_hand_side2);
- statistic_data = StatisticData (tria->n_active_cells(),
- dof_handler->n_dofs(),
- solver_steps1,
- solver_steps2,
- compute_energy ());
+ statistic_data = typename TimeStep_Wave<dim>::StatisticData (tria->n_active_cells(),
+ dof_handler->n_dofs(),
+ solver_steps1,
+ solver_steps2,
+ compute_energy ());
deallog << "." << endl;
};
= static_cast<const TimeStepBase_Wave<dim>*>(previous_timestep)->get_timestep_primal();
Assert (previous_time_level.tria->n_cells(0) == tria->n_cells(0),
- ExcCoarsestGridsDiffer());
+ typename TimeStep_Wave<dim>::ExcCoarsestGridsDiffer());
// convenience typedef
typedef DoFHandler<dim>::cell_iterator cell_iterator;