AC_MSG_RESULT("no")
$3
])
+)
+
+
+
+dnl IBM xlC 5.0 from the VisualAge C++ pack has a bug with the following
+dnl code. We can work around it if we insert code like "using namespace std;"
+dnl in the right place, but we'd like to do so only if absolutely necessary.
+dnl Check whether the compiler which we are using has this bug.
+dnl
+dnl Usage: DEAL_II_CHECK_IBM_XLC_ERROR
+dnl
+AC_DEFUN(DEAL_II_CHECK_IBM_XLC_ERROR, dnl
+ AC_MSG_CHECKING(for std::vector bug)
+ AC_LANG_CPLUSPLUS
+ CXXFLAGS="$CXXFLAGSG"
+ AC_TRY_COMPILE(
+ [
+ namespace std {
+ template <class _Ty> class allocator {};
+ template<class _Ty, class _Ax = allocator<_Ty> > class vector{};
+ }
+
+ struct X {};
+ template <int dim> void g (const std::vector<X> &x);
+
+ void f () {
+ std::vector<X> x;
+ g<1> (x);
+ };
+ ],
+ [],
+ [
+ AC_MSG_RESULT(no)
+ ],
+ [
+ AC_MSG_RESULT(yes. trying to work around)
+ AC_DEFINE(XLC_WORK_AROUND_STD_BUG)
+ ])
+)
+
+
+dnl gcc2.95 doesn't have the std::iterator class, but the standard requires it, so
+dnl check whether we have to work around it
+dnl
+dnl Usage: DEAL_II_HAVE_STD_ITERATOR
+dnl
+AC_DEFUN(DEAL_II_HAVE_STD_ITERATOR, dnl
+ AC_MSG_CHECKING(for std::iterator class)
+ AC_LANG_CPLUSPLUS
+ CXXFLAGS="$CXXFLAGSG"
+ AC_TRY_COMPILE(
+ [
+#include <iterator>
+ class MyIterator : public std::iterator<std::bidirectional_iterator_tag,int>
+ {};
+ ],
+ [],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_STD_ITERATOR_CLASS)
+ ],
+ [
+ AC_MSG_RESULT(no)
+ ])
)
\ No newline at end of file
lib/libbase.a: $(forward-declarations) $(o-files)
- @echo =====base=============debug======$(MT)== Linking library: $@
+ @echo =====base=============optimized==$(MT)== Linking library: $@
@ar ruv $@ $(o-files)
lib/libbase.g.a: $(forward-declarations) $(go-files)
- @echo =====base=============optimized==$(MT)== Linking library: $@
+ @echo =====base=============debug======$(MT)== Linking library: $@
@ar ruv $@ $(go-files)
* on the parameters.
*/
template <int dim, int spacedim>
- static void write_ucd (const std::vector<Patch<dim,spacedim> > &patches,
+ static void write_ucd (const typename std::vector<Patch<dim,spacedim> > &patches,
const std::vector<std::string> &data_names,
const UcdFlags &flags,
std::ostream &out);
* on the parameters.
*/
template <int dim, int spacedim>
- static void write_gnuplot (const std::vector<Patch<dim,spacedim> > &patches,
+ static void write_gnuplot (const typename std::vector<Patch<dim,spacedim> > &patches,
const std::vector<std::string> &data_names,
const GnuplotFlags &flags,
std::ostream &out);
* on the parameters.
*/
template <int dim, int spacedim>
- static void write_povray (const std::vector<Patch<dim,spacedim> > &patches,
+ static void write_povray (const typename std::vector<Patch<dim,spacedim> > &patches,
const std::vector<std::string> &data_names,
const PovrayFlags &flags,
std::ostream &out);
* on the parameters.
*/
template <int dim, int spacedim>
- static void write_eps (const std::vector<Patch<dim,spacedim> > &patches,
+ static void write_eps (const typename std::vector<Patch<dim,spacedim> > &patches,
const std::vector<std::string> &data_names,
const EpsFlags &flags,
std::ostream &out);
* on the parameters.
*/
template <int dim, int spacedim>
- static void write_gmv (const std::vector<Patch<dim,spacedim> > &patches,
+ static void write_gmv (const typename std::vector<Patch<dim,spacedim> > &patches,
const std::vector<std::string> &data_names,
const GmvFlags &flags,
std::ostream &out);
*/
template <int dim, int spacedim>
static void
- write_gmv_reorder_data_vectors (const std::vector<Patch<dim,spacedim> > &patches,
+ write_gmv_reorder_data_vectors (const typename std::vector<Patch<dim,spacedim> > &patches,
std::vector<std::vector<double> > &data_vectors);
};
* allow the output functions to
* know what they shall print.
*/
- virtual const std::vector<DataOutBase::Patch<dim,spacedim> > &
+ virtual const typename std::vector<typename DataOutBase::Patch<dim,spacedim> > &
get_patches () const = 0;
/**
#define __deal2__exceptions_h
+#include <iosfwd>
#include <iostream>
-#include <exception>
#include <cstdlib>
#ifndef __GNUC__
* right size, i.e. the same
* size as the @p{points} array.
*/
- virtual void value_list (const std::vector<Point<dim> > &points,
+ virtual void value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
* the same number of components
* as this function has.
*/
- virtual void vector_value_list (const std::vector<Point<dim> > &points,
+ virtual void vector_value_list (const typename std::vector<Point<dim> > &points,
std::vector<Vector<double> > &values) const;
/**
* function at the given point.
*/
virtual void vector_gradient (const Point<dim> &p,
- std::vector<Tensor<1,dim> > &gradients) const;
+ typename std::vector<Tensor<1,dim> > &gradients) const;
/**
* Set @p{gradients} to the
* right size, i.e. the same
* size as the @p{points} array.
*/
- virtual void gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+ virtual void gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int component = 0) const;
/**
* over the different components
* of the function.
*/
- virtual void vector_gradient_list (const std::vector<Point<dim> > &points,
- std::vector<std::vector<Tensor<1,dim> > > &gradients) const;
+ virtual void vector_gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<typename std::vector<Tensor<1,dim> > > &gradients) const;
/**
* Compute the Laplacian of a
* Compute the Laplacian of one
* component at a set of points.
*/
- virtual void laplacian_list (const std::vector<Point<dim> > &points,
+ virtual void laplacian_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
* Compute the Laplacians of all
* components at a set of points.
*/
- virtual void vector_laplacian_list (const std::vector<Point<dim> > &points,
+ virtual void vector_laplacian_list (const typename std::vector<Point<dim> > &points,
std::vector<Vector<double> > &values) const;
/**
* the same size as the @p{points}
* array.
*/
- virtual void value_list (const std::vector<Point<dim> > &points,
+ virtual void value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
* the same size as the @p{points}
* array.
*/
- virtual void vector_value_list (const std::vector<Point<dim> > &points,
+ virtual void vector_value_list (const typename std::vector<Point<dim> > &points,
std::vector<Vector<double> > &values) const;
/**
* for all components.
*/
virtual void vector_gradient (const Point<dim> &p,
- std::vector<Tensor<1,dim> > &gradients) const;
+ typename std::vector<Tensor<1,dim> > &gradients) const;
/**
* Set @p{gradients} to the gradients of
* already has the right size, i.e.
* the same size as the @p{points} array.
*/
- virtual void gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+ virtual void gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int component = 0) const;
/**
* over the different components
* of the function.
*/
- virtual void vector_gradient_list (const std::vector<Point<dim> > &points,
- std::vector<std::vector<Tensor<1,dim> > > &gradients) const;
+ virtual void vector_gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<typename std::vector<Tensor<1,dim> > > &gradients) const;
};
* the same size as the @p{points}
* array.
*/
- virtual void value_list (const std::vector<Point<dim> > &points,
+ virtual void value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
* the same size as the @p{points}
* array.
*/
- virtual void vector_value_list (const std::vector<Point<dim> > &points,
+ virtual void vector_value_list (const typename std::vector<Point<dim> > &points,
std::vector<Vector<double> > &values) const;
/**
* the same size as the @p{points}
* array.
*/
- virtual void vector_value_list (const std::vector<Point<dim> > &points,
+ virtual void vector_value_list (const typename std::vector<Point<dim> > &points,
std::vector<Vector<double> > &values) const;
/**
/**
* Function values at multiple points.
*/
- virtual void value_list (const std::vector<Point<dim> > &points,
- std::vector<double> &values,
- const unsigned int component = 0) const;
+ virtual void value_list (const typename std::vector<Point<dim> > &points,
+ std::vector<double> &values,
+ const unsigned int component = 0) const;
/**
* Determine an estimate for
/**
* Function values at multiple points.
*/
- virtual void value_list (const std::vector<Point<dim> > &points,
+ virtual void value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
/**
Gradients at multiple points.
*/
- virtual void gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+ virtual void gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int component = 0) const;
/**
/**
* Laplacian of the function at multiple points.
*/
- virtual void laplacian_list (const std::vector<Point<dim> > &points,
+ virtual void laplacian_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
};
/**
* Function values at multiple points.
*/
- virtual void value_list (const std::vector<Point<dim> > &points,
+ virtual void value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
/**
Gradients at multiple points.
*/
- virtual void gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+ virtual void gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int component = 0) const;
/**
/**
* Laplacian of the function at multiple points.
*/
- virtual void laplacian_list (const std::vector<Point<dim> > &points,
+ virtual void laplacian_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
};
/**
* Values at multiple points.
*/
- virtual void value_list (const std::vector<Point<dim> > &points,
+ virtual void value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
/**
* Gradients at multiple points.
*/
- virtual void gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+ virtual void gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int component = 0) const;
/**
/**
* Laplacian at multiple points.
*/
- virtual void laplacian_list (const std::vector<Point<dim> > &points,
+ virtual void laplacian_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
private:
/**
* Values at multiple points.
*/
- virtual void value_list (const std::vector<Point<dim> > &points,
+ virtual void value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
/**
* Gradients at multiple points.
*/
- virtual void gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+ virtual void gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int component = 0) const;
/**
/**
* Laplacian at multiple points.
*/
- virtual void laplacian_list (const std::vector<Point<dim> > &points,
+ virtual void laplacian_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
};
/**
* Values at multiple points.
*/
- virtual void value_list (const std::vector<Point<dim> > &points,
+ virtual void value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
/**
* Gradients at multiple points.
*/
- virtual void gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+ virtual void gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int component = 0) const;
/**
/**
* Laplacian at multiple points.
*/
- virtual void laplacian_list (const std::vector<Point<dim> > &points,
+ virtual void laplacian_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
};
/**
* Function values at multiple points.
*/
- virtual void value_list (const std::vector<Point<dim> > &points,
+ virtual void value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
/**
Gradients at multiple points.
*/
- virtual void gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+ virtual void gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int component = 0) const;
/**
/**
* Laplacian of the function at multiple points.
*/
- virtual void laplacian_list (const std::vector<Point<dim> > &points,
+ virtual void laplacian_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component = 0) const;
* vectors of bools.
*/
template <typename T>
- unsigned int memory_consumption (const std::vector<T> &v);
+ unsigned int memory_consumption (const typename std::vector<T> &v);
/**
* Estimate the amount of memory
* for a vector of pointers.
*/
template <typename T>
- unsigned int memory_consumption (const std::vector<T *> &v);
+ unsigned int memory_consumption (const typename std::vector<T *> &v);
+
+ /**
+ * Specialization of the
+ * determination of the memory
+ * consumption of a vector, here
+ * for a vector of strings. This
+ * function is not necessary from a
+ * struct C++ viewpoint, since it
+ * could be generated, but is
+ * necessary for compatibility with
+ * IBM's xlC 5.0 compiler, and
+ * doesn't harm for other compilers
+ * as well.
+ */
+ unsigned int memory_consumption (const std::vector<std::string> &v);
+
/**
* Determine an estimate of the
* consumed by a pair of values.
*/
template <typename A, typename B>
- unsigned int memory_consumption (const std::pair<A,B> &p);
+ unsigned int memory_consumption (const typename std::pair<A,B> &p);
/**
* Return the amount of memory
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+ using namespace std;
+#endif
+
template <typename T>
- unsigned int memory_consumption (const std::vector<T> &v)
+ unsigned int memory_consumption (const typename std::vector<T> &v)
{
unsigned int mem = sizeof(std::vector<T>);
const unsigned int n = v.size();
template <typename T>
inline
- unsigned int memory_consumption (const std::vector<T *> &v)
+ unsigned int memory_consumption (const typename std::vector<T *> &v)
{
return (v.capacity() * sizeof(T *) +
sizeof(v));
template <typename A, typename B>
inline
- unsigned int memory_consumption (const std::pair<A,B> &p)
+ unsigned int memory_consumption (const typename std::pair<A,B> &p)
{
return (memory_consumption(p.first) +
memory_consumption(p.second));
unsigned int memory_consumption () const;
private:
- /**
- * Declare what a multiple entry
- * is: a variant * entry (in
- * curly braces @p{{}}) or an
- * array (in double curly braces
- * @p{{{}}}).
- */
- enum MultipleEntryType
- {
- variant, array
- };
/**
* An object in the list of entries with
class Entry
{
public:
+ /**
+ * Declare what a multiple entry
+ * is: a variant * entry (in
+ * curly braces @p{{}}) or an
+ * array (in double curly braces
+ * @p{{{}}}).
+ */
+ enum MultipleEntryType
+ {
+ variant, array
+ };
+
/**
* Constructor
*/
};
+/**
+ * Output operator for points. Print the elements consecutively,
+ * with a space in between.
+ */
+template <int dim>
+inline
+std::ostream & operator << (std::ostream &out, const Point<dim> &p)
+{
+ for (unsigned int i=0; i<dim-1; ++i)
+ out << p[i] << ' ';
+ out << p[dim-1];
+
+ return out;
+};
+
+
+
+/**
+ * Output operator for points of dimension 1. This is implemented
+ * specialized from the general template in order to avoid a compiler
+ * warning that the loop is empty.
+ */
+inline
+std::ostream & operator << (std::ostream &out, const Point<1> &p)
+{
+ out << p[0];
+
+ return out;
+};
#endif
/**
* Constructor from given vectors.
*/
- Quadrature (const std::vector<Point<dim> > &points,
+ Quadrature (const typename std::vector<Point<dim> > &points,
const std::vector<double> &weights);
/**
* Return a reference to the whole array of
* quadrature points.
*/
- const std::vector<Point<dim> > & get_points () const;
+ const typename std::vector<Point<dim> > & get_points () const;
/**
* Return the weight of the @p{i}th
* List of quadrature points. To be filled
* by the constructors of derived classes.
*/
- std::vector<Point<dim> > quadrature_points;
+ typename std::vector<Point<dim> > quadrature_points;
/**
* List of weights of the quadrature points.
*/
static void project_to_face (const Quadrature<dim-1> &quadrature,
const unsigned int face_no,
- std::vector<Point<dim> > &q_points);
+ typename std::vector<Point<dim> > &q_points);
/**
* Projection to all faces.
* over all faces at the same time.
*/
static void project_to_faces (const Quadrature<dim-1> &quadrature,
- std::vector<Point<dim> > &q_points);
+ typename std::vector<Point<dim> > &q_points);
/**
* Compute the quadrature points on the
static void project_to_subface (const Quadrature<dim-1> &quadrature,
const unsigned int face_no,
const unsigned int subface_no,
- std::vector<Point<dim> > &q_points);
+ typename std::vector<Point<dim> > &q_points);
/**
* Projection to all child faces.
* then by subface
*/
static void project_to_subfaces (const Quadrature<dim-1> &quadrature,
- std::vector<Point<dim> > &q_points);
+ typename std::vector<Point<dim> > &q_points);
};
* the right size, i.e. the same
* size as the @p{points} array.
*/
- virtual void value_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<rank,dim> > &values) const;
+ virtual void value_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<rank,dim> > &values) const;
/**
* Return the gradient of the
* the right size, i.e. the same
* size as the @p{points} array.
*/
- virtual void gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<rank+1,dim> > &gradients) const;
+ virtual void gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<rank+1,dim> > &gradients) const;
/**
* Exception
// first row
add_value(rate_key, std::string("-"));
for (unsigned int i=1; i<n; ++i)
- add_value(rate_key, log(values[i-1]/values[i])/log(2));
+ add_value(rate_key, log(values[i-1]/values[i])/log(2.0));
break;
default:
ExcNotImplemented();
#include <set>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
+
template <int dim, int spacedim>
DataOutBase::Patch<dim,spacedim>::Patch () :
n_subdivisions (1)
template <int dim, int spacedim>
-void DataOutBase::write_ucd (const std::vector<Patch<dim,spacedim> > &patches,
+void DataOutBase::write_ucd (const typename std::vector<Patch<dim,spacedim> > &patches,
const std::vector<std::string> &data_names,
const UcdFlags &flags,
std::ostream &out)
template <int dim, int spacedim>
-void DataOutBase::write_gnuplot (const std::vector<Patch<dim,spacedim> > &patches,
+void DataOutBase::write_gnuplot (const typename std::vector<Patch<dim,spacedim> > &patches,
const std::vector<std::string> &data_names,
const GnuplotFlags &/*flags*/,
std::ostream &out)
template <int dim, int spacedim>
-void DataOutBase::write_povray (const std::vector<Patch<dim,spacedim> > &patches,
+void DataOutBase::write_povray (const typename std::vector<Patch<dim,spacedim> > &patches,
const std::vector<std::string> &data_names,
const PovrayFlags &flags,
std::ostream &out)
<< ver[dl](0) << ","
<< patch->data(0,dl) << ","
<< ver[dl](1) << ">, <"
- << nrml[dl] << ">," << std::endl
- << " \t<"
+ << nrml[dl] << ">," << std::endl;
+ out << " \t<"
<< ver[dl+n_subdivisions+1](0) << ","
<< patch->data(0,dl+n_subdivisions+1) << ","
<< ver[dl+n_subdivisions+1](1) << ">, <"
- << nrml[dl+n_subdivisions+1] << ">," << std::endl
- << "\t<"
+ << nrml[dl+n_subdivisions+1] << ">," << std::endl;
+ out << "\t<"
<< ver[dl+n_subdivisions+2](0) << ","
<< patch->data(0,dl+n_subdivisions+2) << ","
<< ver[dl+n_subdivisions+2](1) << ">, <"
<< ver[dl](0) << ","
<< patch->data(0,dl) << ","
<< ver[dl](1) << ">, <"
- << nrml[dl] << ">," << std::endl
- << "\t<"
+ << nrml[dl] << ">," << std::endl;
+ out << "\t<"
<< ver[dl+n_subdivisions+2](0) << ","
<< patch->data(0,dl+n_subdivisions+2) << ","
<< ver[dl+n_subdivisions+2](1) << ">, <"
- << nrml[dl+n_subdivisions+2] << ">," << std::endl
- << "\t<"
+ << nrml[dl+n_subdivisions+2] << ">," << std::endl;
+ out << "\t<"
<< ver[dl+1](0) << ","
<< patch->data(0,dl+1) << ","
<< ver[dl+1](1) << ">, <"
out << "triangle {" << std::endl << "\t<"
<< ver[dl](0) << ","
<< patch->data(0,dl) << ","
- << ver[dl](1) << ">," << std::endl
- << "\t<"
+ << ver[dl](1) << ">," << std::endl;
+ out << "\t<"
<< ver[dl+n_subdivisions+1](0) << ","
<< patch->data(0,dl+n_subdivisions+1) << ","
- << ver[dl+n_subdivisions+1](1) << ">," << std::endl
- << "\t<"
+ << ver[dl+n_subdivisions+1](1) << ">," << std::endl;
+ out << "\t<"
<< ver[dl+n_subdivisions+2](0) << ","
<< patch->data(0,dl+n_subdivisions+2) << ","
<< ver[dl+n_subdivisions+2](1) << ">}" << std::endl;
out << "triangle {" << std::endl << "\t<"
<< ver[dl](0) << ","
<< patch->data(0,dl) << ","
- << ver[dl](1) << ">," << std::endl
- << "\t<"
+ << ver[dl](1) << ">," << std::endl;
+ out << "\t<"
<< ver[dl+n_subdivisions+2](0) << ","
<< patch->data(0,dl+n_subdivisions+2) << ","
- << ver[dl+n_subdivisions+2](1) << ">," << std::endl
- << "\t<"
+ << ver[dl+n_subdivisions+2](1) << ">," << std::endl;
+ out << "\t<"
<< ver[dl+1](0) << ","
<< patch->data(0,dl+1) << ","
<< ver[dl+1](1) << ">}" << std::endl;
template <int dim, int spacedim>
-void DataOutBase::write_eps (const std::vector<Patch<dim,spacedim> > &patches,
+void DataOutBase::write_eps (const typename std::vector<Patch<dim,spacedim> > &patches,
const std::vector<std::string> &/*data_names*/,
const EpsFlags &flags,
std::ostream &out)
template <int dim, int spacedim>
-void DataOutBase::write_gmv (const std::vector<Patch<dim,spacedim> > &patches,
+void DataOutBase::write_gmv (const typename std::vector<Patch<dim,spacedim> > &patches,
const std::vector<std::string> &data_names,
const GmvFlags &/*flags*/,
std::ostream &out)
// d>spacedim. write zeros instead
{
const unsigned int n_points
- = static_cast<unsigned int>(pow (n_subdivisions+1, dim));
+ = static_cast<unsigned int>(pow (static_cast<double>(n_subdivisions+1), dim));
for (unsigned int i=0; i<n_points; ++i)
out << "0 ";
};
template <int dim, int spacedim>
void
-DataOutBase::write_gmv_reorder_data_vectors (const std::vector<Patch<dim,spacedim> > &patches,
+DataOutBase::write_gmv_reorder_data_vectors (const typename std::vector<Patch<dim,spacedim> > &patches,
std::vector<std::vector<double> > &data_vectors)
{
// unlike in the main function, we
void DataOutInterface<dim,spacedim>::write_ucd (std::ostream &out) const
{
DataOutBase::write_ucd (get_patches(), get_dataset_names(),
- ucd_flags, out);
+ ucd_flags, out);
};
template <int dim, int spacedim>
-DataOutInterface<dim,spacedim>::OutputFormat
+typename DataOutInterface<dim,spacedim>::OutputFormat
DataOutInterface<dim,spacedim>::parse_output_format (const std::string &format_name)
{
if (format_name == "ucd")
};
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
template <int dim>
-void Function<dim>::value_list (const std::vector<Point<dim> > &points,
- std::vector<double> &values,
- const unsigned int component) const
+void Function<dim>::value_list (const typename std::vector<Point<dim> > &points,
+ std::vector<double> &values,
+ const unsigned int component) const
{
// check whether component is in
// the valid range is up to the
template <int dim>
-void Function<dim>::vector_value_list (const std::vector<Point<dim> > &points,
+void Function<dim>::vector_value_list (const typename std::vector<Point<dim> > &points,
std::vector<Vector<double> > &values) const
{
// check whether component is in
template <int dim>
void Function<dim>::vector_gradient (const Point<dim> &,
- std::vector<Tensor<1,dim> > &) const
+ typename std::vector<Tensor<1,dim> > &) const
{
Assert (false, ExcPureFunctionCalled());
};
template <int dim>
-void Function<dim>::gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+void Function<dim>::gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int component) const
{
Assert (gradients.size() == points.size(),
template <int dim>
-void Function<dim>::vector_gradient_list (const std::vector<Point<dim> > &points,
- std::vector<std::vector<Tensor<1,dim> > > &gradients) const
+void Function<dim>::vector_gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<std::vector<Tensor<1,dim> > > &gradients) const
{
Assert (gradients.size() == points.size(),
ExcDimensionMismatch(gradients.size(), points.size()));
template <int dim>
-void Function<dim>::laplacian_list (const std::vector<Point<dim> > &points,
+void Function<dim>::laplacian_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &laplacians,
const unsigned int component) const
{
template <int dim>
-void Function<dim>::vector_laplacian_list (const std::vector<Point<dim> > &points,
+void Function<dim>::vector_laplacian_list (const typename std::vector<Point<dim> > &points,
std::vector<Vector<double> > &laplacians) const
{
// check whether component is in
template <int dim>
-void ZeroFunction<dim>::value_list (const std::vector<Point<dim> > &points,
+void ZeroFunction<dim>::value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int /*component*/) const {
Assert (values.size() == points.size(),
template <int dim>
-void ZeroFunction<dim>::vector_value_list (const std::vector<Point<dim> > &points,
+void ZeroFunction<dim>::vector_value_list (const typename std::vector<Point<dim> > &points,
std::vector<Vector<double> > &values) const
{
Assert (values.size() == points.size(),
template <int dim>
void ZeroFunction<dim>::vector_gradient (const Point<dim> &,
- std::vector<Tensor<1,dim> > &gradients) const
+ typename std::vector<Tensor<1,dim> > &gradients) const
{
Assert (gradients.size() == n_components,
ExcDimensionMismatch(gradients.size(), n_components));
template <int dim>
-void ZeroFunction<dim>::gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+void ZeroFunction<dim>::gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int /*component*/) const
{
Assert (gradients.size() == points.size(),
template <int dim>
-void ZeroFunction<dim>::vector_gradient_list (const std::vector<Point<dim> > &points,
- std::vector<std::vector<Tensor<1,dim> > > &gradients) const
+void ZeroFunction<dim>::vector_gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<typename std::vector<Tensor<1,dim> > > &gradients) const
{
Assert (gradients.size() == points.size(),
ExcDimensionMismatch(gradients.size(), points.size()));
template <int dim>
-void ConstantFunction<dim>::value_list (const std::vector<Point<dim> > &points,
+void ConstantFunction<dim>::value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int /*component*/) const
{
template <int dim>
-void ConstantFunction<dim>::vector_value_list (const std::vector<Point<dim> > &points,
+void ConstantFunction<dim>::vector_value_list (const typename std::vector<Point<dim> > &points,
std::vector<Vector<double> > &values) const
{
Assert (values.size() == points.size(),
template <int dim>
-void ComponentSelectFunction<dim>::vector_value_list (const std::vector<Point<dim> > &points,
+void ComponentSelectFunction<dim>::vector_value_list (const typename std::vector<Point<dim> > &points,
std::vector<Vector<double> > &values) const
{
Assert (values.size() == points.size(),
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
template <int dim>
void
-FunctionDerivative<dim>::value_list (const std::vector<Point<dim> > &points,
+FunctionDerivative<dim>::value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int component) const
{
};
-template FunctionDerivative<1>;
-template FunctionDerivative<2>;
-template FunctionDerivative<3>;
+template class FunctionDerivative<1>;
+template class FunctionDerivative<2>;
+template class FunctionDerivative<3>;
}
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
template<int dim>
void
-SquareFunction<dim>::value_list (const std::vector<Point<dim> > &points,
+SquareFunction<dim>::value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int) const
{
template<int dim>
void
-SquareFunction<dim>::laplacian_list (const std::vector<Point<dim> > &points,
+SquareFunction<dim>::laplacian_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int) const
{
template<int dim>
void
-SquareFunction<dim>::gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+SquareFunction<dim>::gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int) const
{
Assert (gradients.size() == points.size(),
template<int dim>
void
-Q1WedgeFunction<dim>::value_list (const std::vector<Point<dim> > &points,
+Q1WedgeFunction<dim>::value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int) const
{
template<int dim>
void
-Q1WedgeFunction<dim>::laplacian_list (const std::vector<Point<dim> > &points,
+Q1WedgeFunction<dim>::laplacian_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int) const
{
template<int dim>
void
-Q1WedgeFunction<dim>::gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+Q1WedgeFunction<dim>::gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int) const
{
Assert (gradients.size() == points.size(),
template<int dim>
void
-PillowFunction<dim>::value_list (const std::vector<Point<dim> > &points,
+PillowFunction<dim>::value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int) const
{
template<int dim>
void
-PillowFunction<dim>::laplacian_list (const std::vector<Point<dim> > &points,
+PillowFunction<dim>::laplacian_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int) const
{
template<int dim>
void
-PillowFunction<dim>::gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+PillowFunction<dim>::gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int) const
{
Assert (gradients.size() == points.size(),
template<int dim>
void
-CosineFunction<dim>::value_list (const std::vector<Point<dim> > &points,
+CosineFunction<dim>::value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int) const
{
template<int dim>
void
-CosineFunction<dim>::laplacian_list (const std::vector<Point<dim> > &points,
+CosineFunction<dim>::laplacian_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int) const
{
template<int dim>
void
-CosineFunction<dim>::gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+CosineFunction<dim>::gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int) const
{
Assert (gradients.size() == points.size(),
template<int dim>
void
-ExpFunction<dim>::value_list (const std::vector<Point<dim> > &points,
+ExpFunction<dim>::value_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int) const
{
template<int dim>
void
-ExpFunction<dim>::laplacian_list (const std::vector<Point<dim> > &points,
+ExpFunction<dim>::laplacian_list (const typename std::vector<Point<dim> > &points,
std::vector<double> &values,
const unsigned int) const
{
template<int dim>
void
-ExpFunction<dim>::gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+ExpFunction<dim>::gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int) const
{
Assert (gradients.size() == points.size(),
template<int dim>
void
-JumpFunction<dim>::value_list (const std::vector<Point<dim> > &p,
+JumpFunction<dim>::value_list (const typename std::vector<Point<dim> > &p,
std::vector<double> &values,
const unsigned int) const
{
template<int dim>
void
-JumpFunction<dim>::laplacian_list (const std::vector<Point<dim> > &p,
+JumpFunction<dim>::laplacian_list (const typename std::vector<Point<dim> > &p,
std::vector<double> &values,
const unsigned int) const
{
template<int dim>
void
-JumpFunction<dim>::gradient_list (const std::vector<Point<dim> > &p,
- std::vector<Tensor<1,dim> > &gradients,
+JumpFunction<dim>::gradient_list (const typename std::vector<Point<dim> > &p,
+ typename std::vector<Tensor<1,dim> > &gradients,
const unsigned int) const
{
Assert (gradients.size() == p.size(),
};
-template SquareFunction<1>;
-template SquareFunction<2>;
-template SquareFunction<3>;
-template Q1WedgeFunction<1>;
-template Q1WedgeFunction<2>;
-template Q1WedgeFunction<3>;
-template PillowFunction<1>;
-template PillowFunction<2>;
-template PillowFunction<3>;
-template CosineFunction<1>;
-template CosineFunction<2>;
-template CosineFunction<3>;
-template ExpFunction<1>;
-template ExpFunction<2>;
-template ExpFunction<3>;
-template JumpFunction<1>;
-template JumpFunction<2>;
-template JumpFunction<3>;
+template class SquareFunction<1>;
+template class SquareFunction<2>;
+template class SquareFunction<3>;
+template class Q1WedgeFunction<1>;
+template class Q1WedgeFunction<2>;
+template class Q1WedgeFunction<3>;
+template class PillowFunction<1>;
+template class PillowFunction<2>;
+template class PillowFunction<3>;
+template class CosineFunction<1>;
+template class CosineFunction<2>;
+template class CosineFunction<3>;
+template class ExpFunction<1>;
+template class ExpFunction<2>;
+template class ExpFunction<3>;
+template class JumpFunction<1>;
+template class JumpFunction<2>;
+template class JumpFunction<3>;
// finally calculate number of branches
n_branches = 1;
for (unsigned int i=0; i<multiple_choices.size(); ++i)
- if (multiple_choices[i].type == variant)
+ if (multiple_choices[i].type == Entry::variant)
n_branches *= multiple_choices[i].different_values.size();
// check whether array entries have the correct
// number of entries
for (unsigned int i=0; i<multiple_choices.size(); ++i)
- if (multiple_choices[i].type == array)
+ if (multiple_choices[i].type == Entry::array)
if (multiple_choices[i].different_values.size() != n_branches)
std::cerr << " The entry value" << std::endl
<< " " << multiple_choices[i].entry_value << std::endl
Section* pd = get_present_defaults_subsection ();
int selection = (run_no/possibilities) % choice->different_values.size();
std::string entry_value;
- if (choice->type == variant)
+ if (choice->type == Entry::variant)
entry_value = choice->different_values[selection];
else
{
subsection_path.swap (choice->subsection_path);
// move ahead if it was a variant entry
- if (choice->type == variant)
+ if (choice->type == Entry::variant)
possibilities *= choice->different_values.size();
};
// entry ({...}) or an array ({{...}})
if ((entry_value.find("{{") != std::string::npos) &&
(entry_value.find("}}") != std::string::npos))
- type = array;
+ type = Entry::array;
else
- type = variant;
+ type = Entry::variant;
};
template <>
Quadrature<0>::Quadrature (const unsigned int)
+ : n_quadrature_points(0)
{};
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
template <int dim>
-Quadrature<dim>::Quadrature (const std::vector<Point<dim> > &points,
+Quadrature<dim>::Quadrature (const typename std::vector<Point<dim> > &points,
const std::vector<double> &weights)
: n_quadrature_points(points.size()),
quadrature_points(points),
template <>
Quadrature<1>::Quadrature (const Quadrature<0> &,
- const Quadrature<1> &)
+ const Quadrature<1> &) :
+ n_quadrature_points (0)
{
Assert (false, ExcInternalError());
};
template <int dim>
-const std::vector<Point<dim> > & Quadrature<dim>::get_points () const
+const typename std::vector<Point<dim> > & Quadrature<dim>::get_points () const
{
return quadrature_points;
};
template <int dim>
void
-QProjector<dim>::project_to_faces (const Quadrature<dim-1> &quadrature,
- std::vector<Point<dim> > &q_points)
+QProjector<dim>::project_to_faces (const Quadrature<dim-1> &quadrature,
+ typename std::vector<Point<dim> > &q_points)
{
unsigned int npt = quadrature.n_quadrature_points;
unsigned int nf = GeometryInfo<dim>::faces_per_cell;
template <int dim>
void
-QProjector<dim>::project_to_subfaces (const Quadrature<dim-1> &quadrature,
- std::vector<Point<dim> > &q_points)
+QProjector<dim>::project_to_subfaces (const Quadrature<dim-1> &quadrature,
+ typename std::vector<Point<dim> > &q_points)
{
unsigned int npt = quadrature.n_quadrature_points;
unsigned int nf = GeometryInfo<dim>::faces_per_cell;
};
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
template <int rank, int dim>
void
-TensorFunction<rank, dim>::value_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<rank,dim> > &values) const
+TensorFunction<rank, dim>::value_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<rank,dim> > &values) const
{
Assert (values.size() == points.size(),
ExcDimensionMismatch(values.size(), points.size()));
template <int rank, int dim>
void
-TensorFunction<rank, dim>::gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<rank+1,dim> > &gradients) const
+TensorFunction<rank, dim>::gradient_list (const typename std::vector<Point<dim> > &points,
+ typename std::vector<Tensor<rank+1,dim> > &gradients) const
{
Assert (gradients.size() == points.size(),
ExcDimensionMismatch(gradients.size(), points.size()));
-dnl Find the right C++ compiler. This modifies the following
-dnl variables: CXX, GXX, CXXFLAGS
+dnl Find the right C++ compiler. Note that for historical reasons, the
+dnl compiler name and version is in the name GXX_VERSION, even if the
+dnl compiler is not GCC.
AC_PROG_CXX
-AC_PATH_PROG(CXX,$CXX)
+AC_PATH_PROG(CXX,$CXX)
if test "$GXX" = yes ; then
# find out the right version
GXX_VERSION_STRING=`($CXX -v 2>&1) | grep "gcc version"`
;;
esac
else
- AC_MSG_ERROR(No configuration options for this C++ compiler
- supported at present)
- exit 1
+
+ dnl Check for IBM xlC. For some reasons, depending on some environment variables,
+ dnl moon position, and other reasons unknown to me, the compiler displays
+ dnl different names in the first line of output, so check various possibilities
+ is_ibm_xlc="`($CXX 2>&1) | egrep 'VisualAge C++|C Set ++|C for AIX Compiler'`"
+ if test "x$is_ibm_xlc" != "x" ; then
+ dnl Ah, this is IBM's C++ compiler. Unfortunately, we don't presently
+ dnl know how to check the version number, so assume that is sufficiently
+ dnl high...
+ AC_MSG_RESULT(compiler is IBM xlC)
+ GXX_VERSION=ibm_xlc
+ else
+ AC_MSG_ERROR(No configuration options for this C++ compiler
+ supported at present)
+ exit 1
+ fi
fi
AC_SUBST(GXX_VERSION)
case "$GXX_VERSION" in
egcs1.1 | gcc2.95)
- CXXFLAGSG="$CXXFLAGSG -Wmissing-declarations -Wbad-function-cast -Wtraditional -Wnested-externs"
+ CXXFLAGSG="$CXXFLAGSG -DDEBUG -Wmissing-declarations -Wbad-function-cast -Wtraditional -Wnested-externs"
CXXFLAGSO="$CXXFLAGSO -fnonnull-objects"
;;
esac
else
- dnl Other compiler
- AC_MSG_ERROR(No compiler options for this C++ compiler
- specified at present)
- exit 1
+
+ if test "x$GXX_VERSION" = "xibm_xlc" ; then
+ CXXFLAGSG="$CXXFLAGS -g -check=bounds -info=all -qrtti=all"
+ CXXFLAGSO="$CXXFLAGS -O2 -w -qansialias -qrtti=all"
+ else
+
+ dnl Other compiler
+ AC_MSG_ERROR(No compiler options for this C++ compiler
+ specified at present)
+ exit 1
+ fi
fi
AC_SUBST(CXXFLAGSG)
DEAL_II_CHECK_ASSERT_THROW(debug, $CXXFLAGSG, CXXFLAGSG="-DDISABLE_ASSERT_THROW $CXXFLAGSG")
DEAL_II_CHECK_ASSERT_THROW(optimized, $CXXFLAGSO, CXXFLAGSO="-DDISABLE_ASSERT_THROW $CXXFLAGSO")
+dnl IBM's xlC compiler has a problem with some kind of code that does not
+dnl "using namespace std;" Try to work around if necessary
+DEAL_II_CHECK_IBM_XLC_ERROR
+dnl See whether we can use the std::iterator class
+DEAL_II_HAVE_STD_ITERATOR
dnl -------------------------------------------------------------
dnl - remove -ansi from compiler flags again, since ACE yields hundreds of
dnl error messages with this flag
if test "$enablemultithreading" = yes ; then
- DEAL_II_GET_THREAD_FLAGS
- DEAL_II_THREAD_CPPFLAGS
+ if test "$GXX" = yes ; then
+ DEAL_II_GET_THREAD_FLAGS
+ DEAL_II_THREAD_CPPFLAGS
- AC_DEFINE(__USE_MALLOC)
- AC_DEFINE(_REENTRANT)
+ AC_DEFINE(__USE_MALLOC)
+ AC_DEFINE(_REENTRANT)
- CXXFLAGSG="`echo $CXXFLAGSG | perl -pi -e 's/-ansi//g;'`"
+ CXXFLAGSG="`echo $CXXFLAGSG | perl -pi -e 's/-ansi//g;'`"
+ else
+ if test "x$GXX_VERSION" = "xibm_xlc" ; then
+ CXXFLAGSG = "$CXXFLAGSG -threaded"
+ CXXFLAGSO = "$CXXFLAGSO -threaded"
+ else
+ dnl Other compiler
+ AC_MSG_ERROR(No threading compiler options for this C++ compiler
+ specified at present)
+ exit 1
+ fi
+ fi
fi
template <int celldim, int dim>
class DoFObjectAccessor_Inheritance
{
+ public:
/**
* Declaration of the @p{typedef}.
* See the full documentation for
template <int dim>
class DoFObjectAccessor_Inheritance<dim,dim>
{
+ public:
/**
* Declaration of the @p{typedef}.
* See the full documentation for
template<int celldim, int dim>
class DoFObjectAccessor : public DoFAccessor<dim>,
public TriaObjectAccessor<celldim,dim>
-{ public:
+{
+ public:
/**
* Data type passed by the iterator class.
*/
};
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
template <int dim>
inline
void
* for each boundary indicator, which is
* guaranteed by the @p{map} data type.
*/
- typedef std::map<unsigned char,const Function<dim>*> FunctionMap;
+ typedef typename std::map<unsigned char,const Function<dim>*> FunctionMap;
/**
* When the arrays holding the
* @p{levels[]} tree of the @ref{Triangulation}
* objects.
*/
- std::vector<DoFLevel<dim>*> levels;
+ typename std::vector<DoFLevel<dim>*> levels;
/**
* Store the number of dofs created last
* @p{p_real} on the real cell
* @p{cell} and returns @p{p_real}.
*/
- virtual Point<dim> transform_unit_to_real_cell (const DoFHandler<dim>::cell_iterator cell,
- const Point<dim> &p) const = 0;
+ virtual
+ Point<dim>
+ transform_unit_to_real_cell (const typename DoFHandler<dim>::cell_iterator &cell,
+ const Point<dim> &p) const = 0;
/**
* Transforms the point @p{p} on
* @p{p_unit} on the unit cell
* @p{cell} and returns @p{p_unit}.
*/
- virtual Point<dim> transform_real_to_unit_cell (const DoFHandler<dim>::cell_iterator cell,
- const Point<dim> &p) const = 0;
+ virtual
+ Point<dim>
+ transform_real_to_unit_cell (const typename DoFHandler<dim>::cell_iterator &cell,
+ const Point<dim> &p) const = 0;
/**
* Return the value of the
* not be used by users unless
* absolutely needed.
*/
- virtual void fill_fe_values (const DoFHandler<dim>::cell_iterator &cell,
- const std::vector<Point<dim> > &unit_points,
- std::vector<Tensor<2,dim> > &jacobians,
+ virtual void fill_fe_values (const typename DoFHandler<dim>::cell_iterator &cell,
+ const typename std::vector<Point<dim> > &unit_points,
+ typename std::vector<Tensor<2,dim> > &jacobians,
const bool compute_jacobians,
- std::vector<Tensor<3,dim> > &jacobians_grad,
+ typename std::vector<Tensor<3,dim> > &jacobians_grad,
const bool compute_jacobians_grad,
- std::vector<Point<dim> > &support_points,
+ typename std::vector<Point<dim> > &support_points,
const bool compute_support_points,
- std::vector<Point<dim> > &q_points,
+ typename std::vector<Point<dim> > &q_points,
const bool compute_q_points,
const FullMatrix<double> &shape_values_transform,
- const std::vector<std::vector<Tensor<1,dim> > > &shape_grads_transform) const;
+ const typename std::vector<typename std::vector<Tensor<1,dim> > > &shape_grads_transform) const;
/**
* Do the same thing that the
* and should not be used by users unless
* absolutely needed.
*/
- virtual void fill_fe_face_values (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void fill_fe_face_values (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
- const std::vector<Point<dim-1> > &unit_points,
- const std::vector<Point<dim> > &global_unit_points,
- std::vector<Tensor<2,dim> > &jacobians,
+ const typename std::vector<Point<dim-1> > &unit_points,
+ const typename std::vector<Point<dim> > &global_unit_points,
+ typename std::vector<Tensor<2,dim> > &jacobians,
const bool compute_jacobians,
- std::vector<Tensor<3,dim> > &jacobians_grad,
+ typename std::vector<Tensor<3,dim> > &jacobians_grad,
const bool compute_jacobians_grad,
- std::vector<Point<dim> > &support_points,
+ typename std::vector<Point<dim> > &support_points,
const bool compute_support_points,
- std::vector<Point<dim> > &q_points,
+ typename std::vector<Point<dim> > &q_points,
const bool compute_q_points,
std::vector<double> &face_jacobi_determinants,
const bool compute_face_jacobians,
- std::vector<Point<dim> > &normal_vectors,
+ typename std::vector<Point<dim> > &normal_vectors,
const bool compute_normal_vectors,
const FullMatrix<double> &shape_values_transform,
- const std::vector<std::vector<Tensor<1,dim> > > &shape_grads_transform) const;
+ const typename std::vector<typename std::vector<Tensor<1,dim> > > &shape_grads_transform) const;
/**
* This function does almost the
* should not be used by users
* unless absolutely needed.
*/
- virtual void fill_fe_subface_values (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void fill_fe_subface_values (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
const unsigned int subface_no,
- const std::vector<Point<dim-1> > &unit_points,
- const std::vector<Point<dim> > &global_unit_points,
- std::vector<Tensor<2,dim> > &jacobians,
+ const typename std::vector<Point<dim-1> > &unit_points,
+ const typename std::vector<Point<dim> > &global_unit_points,
+ typename std::vector<Tensor<2,dim> > &jacobians,
const bool compute_jacobians,
- std::vector<Tensor<3,dim> > &jacobians_grad,
+ typename std::vector<Tensor<3,dim> > &jacobians_grad,
const bool compute_jacobians_grad,
- std::vector<Point<dim> > &q_points,
+ typename std::vector<Point<dim> > &q_points,
const bool compute_q_points,
std::vector<double> &face_jacobi_determinants,
const bool compute_face_jacobians,
- std::vector<Point<dim> > &normal_vectors,
+ typename std::vector<Point<dim> > &normal_vectors,
const bool compute_normal_vectors,
const FullMatrix<double> &shape_values_transform,
- const std::vector<std::vector<Tensor<1,dim> > > &shape_grads_transform) const;
+ const typename std::vector<typename std::vector<Tensor<1,dim> > > &shape_grads_transform) const;
/**
* Return the support points of
* dimensions, an overwritten
* function has to be provided.
*/
- virtual void get_unit_support_points (std::vector<Point<dim> > &unit_points) const;
+ virtual void get_unit_support_points (typename std::vector<Point<dim> > &unit_points) const;
/**
* Compute the off-points of the
* object of which a pointer is
* stored by the triangulation.
*/
- virtual void get_support_points (const DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Compute the off-points of the
* to the @p{get_support_points}
* function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const =0;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const =0;
/**
* This is the second separated function
* refer to the @p{get_support_points}
* function.
*/
- virtual void get_face_jacobians (const DoFHandler<dim>::face_iterator &face,
- const std::vector<Point<dim-1> > &unit_points,
+ virtual void get_face_jacobians (const typename DoFHandler<dim>::face_iterator &face,
+ const typename std::vector<Point<dim-1> > &unit_points,
std::vector<double> &face_jacobi_determinants) const =0;
/**
* not be called for faces at the
* boundary.
*/
- virtual void get_subface_jacobians (const DoFHandler<dim>::face_iterator &face,
+ virtual void get_subface_jacobians (const typename DoFHandler<dim>::face_iterator &face,
const unsigned int subface_no,
- const std::vector<Point<dim-1> > &unit_points,
+ const typename std::vector<Point<dim-1> > &unit_points,
std::vector<double> &face_jacobi_determinants) const =0;
/**
* to the @p{get_support_points}
* function.
*/
- virtual void get_normal_vectors (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_normal_vectors (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<Point<dim> > &normal_vectors) const =0;
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<Point<dim> > &normal_vectors) const =0;
/**
* Does the same as the above function,
* must not be called for faces at the
* boundary.
*/
- virtual void get_normal_vectors (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_normal_vectors (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
const unsigned int subface_no,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<Point<dim> > &normal_vectors) const =0;
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<Point<dim> > &normal_vectors) const =0;
/**
* Fill in the given matrix with
* to the @p{get_support_points}
* function.
*/
- virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_local_mass_matrix (const typename DoFHandler<dim>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const =0;
/**
* @p{p_real} on the real cell
* @p{cell} and returns @p{p_real}.
*/
- virtual Point<dim> transform_unit_to_real_cell (const DoFHandler<dim>::cell_iterator cell,
+ virtual Point<dim> transform_unit_to_real_cell (const typename DoFHandler<dim>::cell_iterator &cell,
const Point<dim> &p) const;
/**
* @p{p_unit} on the unit cell
* @p{cell} and returns @p{p_unit}.
*/
- virtual Point<dim> transform_real_to_unit_cell (const DoFHandler<dim>::cell_iterator cell,
+ virtual Point<dim> transform_real_to_unit_cell (const typename DoFHandler<dim>::cell_iterator &cell,
const Point<dim> &p) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_unit_support_points (std::vector<Point<dim> > &support_points) const;
+ virtual void get_unit_support_points (typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_support_points (const DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_local_mass_matrix (const typename DoFHandler<dim>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const;
/**
* In two spatial dimensions, this function
* simply returns the length of the face.
*/
- virtual void get_face_jacobians (const DoFHandler<dim>::face_iterator &face,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<double> &face_jacobi_determinants) const;
+ virtual void get_face_jacobians (const typename DoFHandler<dim>::face_iterator &face,
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<double> &face_jacobi_determinants) const;
/**
* Refer to the base class for detailed
* simply returns half the length of the
* whole face.
*/
- virtual void get_subface_jacobians (const DoFHandler<dim>::face_iterator &face,
+ virtual void get_subface_jacobians (const typename DoFHandler<dim>::face_iterator &face,
const unsigned int subface_no,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<double> &face_jacobi_determinants) const;
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<double> &face_jacobi_determinants) const;
/**
* Return the normal vectors to the
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_normal_vectors (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_normal_vectors (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<Point<dim> > &normal_vectors) const;
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<Point<dim> > &normal_vectors) const;
/**
* Return the normal vectors to the
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_normal_vectors (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_normal_vectors (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
const unsigned int subface_no,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<Point<dim> > &normal_vectors) const;
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<Point<dim> > &normal_vectors) const;
/**
* Refer to the base class for detailed
* For higher dimensional finite elements
* we use multilinear mappings.
*/
- virtual void fill_fe_values (const DoFHandler<dim>::cell_iterator &cell,
- const std::vector<Point<dim> > &unit_points,
- std::vector<Tensor<2,dim> > &jacobians,
+ virtual void fill_fe_values (const typename DoFHandler<dim>::cell_iterator &cell,
+ const typename std::vector<Point<dim> > &unit_points,
+ typename std::vector<Tensor<2,dim> > &jacobians,
const bool compute_jacobians,
- std::vector<Tensor<3,dim> > &jacobians_grad,
+ typename std::vector<Tensor<3,dim> > &jacobians_grad,
const bool compute_jacobians_grad,
- std::vector<Point<dim> > &support_points,
+ typename std::vector<Point<dim> > &support_points,
const bool compute_support_points,
- std::vector<Point<dim> > &q_points,
+ typename std::vector<Point<dim> > &q_points,
const bool compute_q_points,
const FullMatrix<double> &shape_values_transform,
- const std::vector<std::vector<Tensor<1,dim> > > &shape_grad_transform) const;
+ const typename std::vector<typename std::vector<Tensor<1,dim> > > &shape_grad_transform) const;
DeclException0 (ExcNotUseful);
};
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_unit_support_points (std::vector<Point<dim> > &support_points) const;
+ virtual void get_unit_support_points (typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_support_points (const DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_local_mass_matrix (const typename DoFHandler<dim>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const;
};
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const;
};
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const;
};
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const;
};
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const;
};
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_unit_support_points (std::vector<Point<dim> > &support_points) const;
+ virtual void get_unit_support_points (typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_support_points (const DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* costs. The specified exception
* is thrown instead.
*/
- virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_local_mass_matrix (const typename DoFHandler<dim>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const;
private:
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_unit_support_points (std::vector<Point<dim> > &support_points) const;
+ virtual void get_unit_support_points (typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_support_points (const DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* costs. The specified exception
* is thrown instead.
*/
- virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_local_mass_matrix (const typename DoFHandler<dim>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const;
private:
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_unit_support_points (std::vector<Point<dim> > &support_points) const;
+ virtual void get_unit_support_points (typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_support_points (const DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* costs. The specified exception
* is thrown instead.
*/
- virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_local_mass_matrix (const typename DoFHandler<dim>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const;
private:
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_unit_support_points (std::vector<Point<dim> > &support_points) const;
+ virtual void get_unit_support_points (typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_support_points (const DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* costs. The specified exception
* is thrown instead.
*/
- virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_local_mass_matrix (const typename DoFHandler<dim>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const;
private:
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_unit_support_points (std::vector<Point<dim> > &support_points) const;
+ virtual void get_unit_support_points (typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_support_points (const DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* costs. The specified exception
* is thrown instead.
*/
- virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_local_mass_matrix (const typename DoFHandler<dim>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const;
private:
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_unit_support_points (std::vector<Point<dim> > &support_points) const;
+ virtual void get_unit_support_points (typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_support_points (const DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* costs. The specified exception
* is thrown instead.
*/
- virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_local_mass_matrix (const typename DoFHandler<dim>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const;
private:
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_unit_support_points (std::vector<Point<dim> > &support_points) const;
+ virtual void get_unit_support_points (typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_support_points (const DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* costs. The specified exception
* is thrown instead.
*/
- virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_local_mass_matrix (const typename DoFHandler<dim>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const;
private:
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_unit_support_points (std::vector<Point<dim> > &support_points) const;
+ virtual void get_unit_support_points (typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_support_points (const DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* costs. The specified exception
* is thrown instead.
*/
- virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_local_mass_matrix (const typename DoFHandler<dim>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const;
private:
* For the ordering of shape functions
* refer to the @p{shape_value} function.
*/
- virtual void get_unit_support_points (std::vector<Point<dim> > &support_points) const;
+ virtual void get_unit_support_points (typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* For the ordering of shape functions
* refer to the @p{shape_value} function.
*/
- virtual void get_support_points (const DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_face_support_points (const DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const;
+ virtual void get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
+ typename std::vector<Point<dim> > &support_points) const;
/**
* Fill the local mass matrix. The elements
* Refer to the base class for more
* information on this function.
*/
- virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_local_mass_matrix (const typename DoFHandler<dim>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const;
/**
* the @p{transform} function of
* @p{base_element(0)}.
*/
- virtual Point<dim> transform_unit_to_real_cell (const DoFHandler<dim>::cell_iterator cell,
+ virtual Point<dim> transform_unit_to_real_cell (const typename DoFHandler<dim>::cell_iterator &cell,
const Point<dim> &p) const;
/**
* the @p{transform} function of
* @p{base_element(0)}.
*/
- virtual Point<dim> transform_real_to_unit_cell (const DoFHandler<dim>::cell_iterator cell,
+ virtual Point<dim> transform_real_to_unit_cell (const typename DoFHandler<dim>::cell_iterator &cell,
const Point<dim> &p) const;
/**
* function simply passes down to the
* underlying object.
*/
- virtual void get_face_jacobians (const DoFHandler<dim>::face_iterator &face,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<double> &face_jacobi_determinants) const;
+ virtual void get_face_jacobians (const typename DoFHandler<dim>::face_iterator &face,
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<double> &face_jacobi_determinants) const;
/**
* Refer to the base class for detailed
* function simply passes down to the
* underlying object.
*/
- virtual void get_subface_jacobians (const DoFHandler<dim>::face_iterator &face,
+ virtual void get_subface_jacobians (const typename DoFHandler<dim>::face_iterator &face,
const unsigned int subface_no,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<double> &face_jacobi_determinants) const;
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<double> &face_jacobi_determinants) const;
/**
* Return the normal vectors to the
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_normal_vectors (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_normal_vectors (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<Point<dim> > &normal_vectors) const;
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<Point<dim> > &normal_vectors) const;
/**
* Return the normal vectors to the
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_normal_vectors (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_normal_vectors (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
const unsigned int subface_no,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<Point<dim> > &normal_vectors) const;
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<Point<dim> > &normal_vectors) const;
/**
* Implementation of the
* corresponding function of
* @p{FiniteElement}.
*/
- virtual void fill_fe_values (const DoFHandler<dim>::cell_iterator &cell,
- const std::vector<Point<dim> > &unit_points,
- std::vector<Tensor<2,dim> > &jacobians,
+ virtual void fill_fe_values (const typename DoFHandler<dim>::cell_iterator &cell,
+ const typename std::vector<Point<dim> > &unit_points,
+ typename std::vector<Tensor<2,dim> > &jacobians,
const bool compute_jacobians,
- std::vector<Tensor<3,dim> > &jacobians_grad,
+ typename std::vector<Tensor<3,dim> > &jacobians_grad,
const bool compute_jacobians_grad,
- std::vector<Point<dim> > &support_points,
+ typename std::vector<Point<dim> > &support_points,
const bool compute_support_points,
- std::vector<Point<dim> > &q_points,
+ typename std::vector<Point<dim> > &q_points,
const bool compute_q_points,
const FullMatrix<double> &shape_values_transform,
- const std::vector<std::vector<Tensor<1,dim> > > &shape_grad_transform) const;
+ const typename std::vector<typename std::vector<Tensor<1,dim> > > &shape_grad_transform) const;
/**
* Number of different base
* Pairs of multiplicity and
* element type.
*/
- typedef std::pair<const FiniteElement<dim> *, unsigned int> ElementPair;
+ typedef typename std::pair<const FiniteElement<dim> *, unsigned int> ElementPair;
/**
* Pointer to underlying finite
* created by the constructor and
* constant afterwards.
*/
- std::vector<ElementPair> base_elements;
+ typename std::vector<ElementPair> base_elements;
/**
*/
template <class InputVector, typename number>
void get_function_values (const InputVector &fe_function,
- std::vector<number> &values) const;
+ typename std::vector<number> &values) const;
/**
* Access to vector valued finite
*/
template <class InputVector, typename number>
void get_function_values (const InputVector &fe_function,
- std::vector<Vector<number> > &values) const;
+ typename std::vector<Vector<number> > &values) const;
/**
* Return the gradient of the @p{i}th shape
* For the format of this matrix, see the
* documentation for the matrix itself.
*/
- const std::vector<std::vector<Tensor<1,dim> > > & get_shape_grads () const;
+ const typename std::vector<typename std::vector<Tensor<1,dim> > > & get_shape_grads () const;
/**
* Return the gradients of the finite
*/
template <class InputVector>
void get_function_grads (const InputVector &fe_function,
- std::vector<Tensor<1,dim> > &gradients) const;
+ typename std::vector<Tensor<1,dim> > &gradients) const;
/**
* Return the gradients of the finite
*/
template <class InputVector>
void get_function_grads (const InputVector &fe_function,
- std::vector<std::vector<Tensor<1,dim> > > &gradients) const;
+ typename std::vector<typename std::vector<Tensor<1,dim> > > &gradients) const;
/**
* Return the 2nd derivatives of
* documentation for the matrix
* itself.
*/
- const std::vector<std::vector<Tensor<2,dim> > > & get_shape_2nd_derivatives () const;
+ const typename std::vector<typename std::vector<Tensor<2,dim> > > & get_shape_2nd_derivatives () const;
/**
* Return the tensor of second
*/
template <class InputVector>
void get_function_2nd_derivatives (const InputVector &fe_function,
- std::vector<Tensor<2,dim> > &second_derivatives) const;
+ typename std::vector<Tensor<2,dim> > &second_derivatives) const;
/**
*/
template <class InputVector>
void get_function_2nd_derivatives (const InputVector &fe_function,
- std::vector<std::vector<Tensor<2,dim> > > &second_derivatives) const;
+ typename std::vector<typename std::vector<Tensor<2,dim> > > &second_derivatives) const;
/**
* Return the position of the @p{i}th
* Return a pointer to the vector of
* quadrature points.
*/
- const std::vector<Point<dim> > & get_quadrature_points () const;
+ const typename std::vector<Point<dim> > & get_quadrature_points () const;
/**
* Return the point in real space where
* denoting the location of the trial
* functions.
*/
- const std::vector<Point<dim> > & get_support_points () const;
+ const typename std::vector<Point<dim> > & get_support_points () const;
/**
* Return the Jacobi determinant times
/**
* Return the present cell.
*/
- const DoFHandler<dim>::cell_iterator & get_cell() const;
+ const typename DoFHandler<dim>::cell_iterator & get_cell() const;
/**
* Determine an estimate for the
* gradients on the real element, rather
* than on the reference element.
*/
- std::vector<std::vector<Tensor<1,dim> > > shape_gradients;
+ typename std::vector<typename std::vector<Tensor<1,dim> > > shape_gradients;
/**
* Store the 2nd derivatives of the shape
* gradients on the real element, rather
* than on the reference element.
*/
- std::vector<std::vector<Tensor<2,dim> > > shape_2nd_derivatives;
+ typename std::vector<typename std::vector<Tensor<2,dim> > > shape_2nd_derivatives;
/**
* Store an array of the weights of the
* real element, rather than on the
* reference element.
*/
- std::vector<Point<dim> > quadrature_points;
+ typename std::vector<Point<dim> > quadrature_points;
/**
* Array of points denoting the off-point
* on the unit cell, so no function is
* provided for this).
*/
- std::vector<Point<dim> > support_points;
+ typename std::vector<Point<dim> > support_points;
/**
* Store the jacobi matrices at the
* transformation of the gradients to the
* real cell.
*/
- std::vector<Tensor<2,dim> > jacobi_matrices;
+ typename std::vector<Tensor<2,dim> > jacobi_matrices;
/**
* Store the derivatives of the jacobi
* The same general remarks apply as for
* @p{jacobi_matrices}.
*/
- std::vector<Tensor<3,dim> > jacobi_matrices_grad;
+ typename std::vector<Tensor<3,dim> > jacobi_matrices_grad;
/**
* Store the values of the basis functions
* to the @p{get_function_*} functions
* safer.
*/
- DoFHandler<dim>::cell_iterator present_cell;
+ typename DoFHandler<dim>::cell_iterator present_cell;
/**
* Store the finite element for later use.
* of the object and contains the gradients
* on the reference element.
*/
- std::vector<std::vector<Tensor<1,dim> > > unit_shape_gradients;
+ typename std::vector<typename std::vector<Tensor<1,dim> > > unit_shape_gradients;
/**
* Store the 2nd derivatives of the shape
* of the object and contains the
* derivatives on the reference element.
*/
- std::vector<std::vector<Tensor<2,dim> > > unit_shape_2nd_derivatives;
+ typename std::vector<typename std::vector<Tensor<2,dim> > > unit_shape_2nd_derivatives;
/**
* Gradients of the basis
* Analogous to the @p{shape_values_transform}
* array of the base class.
*/
- std::vector<std::vector<Tensor<1,dim> > > unit_shape_gradients_transform;
+ typename std::vector<typename std::vector<Tensor<1,dim> > > unit_shape_gradients_transform;
/**
* Array of quadrature points in the unit
* construction and contains the quadrature
* points on the reference element.
*/
- std::vector<Point<dim> > unit_quadrature_points;
+ typename std::vector<Point<dim> > unit_quadrature_points;
};
* vectors to the cell at the
* quadrature points.
*/
- const std::vector<Point<dim> > & get_normal_vectors () const;
+ const typename std::vector<Point<dim> > & get_normal_vectors () const;
/**
* Return the present
* face.
*/
- DoFHandler<dim>::face_iterator get_face() const;
+ typename DoFHandler<dim>::face_iterator get_face() const;
/**
* Determine an estimate for the
* subface, with indices like that:
* @p{unit_shape_gradients[face][dof][q_point]}
*/
- std::vector<std::vector<std::vector<Tensor<1,dim> > > > unit_shape_gradients;
+ typename std::vector<typename std::vector<typename std::vector<Tensor<1,dim> > > > unit_shape_gradients;
/**
* Store the 2nd derivatives of the shape
* of the object and contains the
* derivatives on the reference element.
*/
- std::vector<std::vector<std::vector<Tensor<2,dim> > > > unit_shape_2nd_derivatives;
+ typename std::vector<typename std::vector<typename std::vector<Tensor<2,dim> > > > unit_shape_2nd_derivatives;
/**
* Gradients of the basis
* Analogous to the @p{shape_values_transform}
* array of the base class.
*/
- std::vector<std::vector<std::vector<Tensor<1,dim> > > > unit_shape_gradients_transform;
+ typename std::vector<typename std::vector<typename std::vector<Tensor<1,dim> > > > unit_shape_gradients_transform;
/**
* Array of quadrature points on the
* alike field of the quadrature formula
* passed upon construction.
*/
- std::vector<Point<dim-1> > unit_face_quadrature_points;
+ typename std::vector<Point<dim-1> > unit_face_quadrature_points;
/**
* Array of quadrature points in the unit
* those on the unit face, but are stored
* as coordinates on the unit cell.
*/
- std::vector<std::vector<Point<dim> > > unit_quadrature_points;
+ typename std::vector<typename std::vector<Point<dim> > > unit_quadrature_points;
/**
* List of values denoting the determinant
* quadrature points. This field is filled
* in by the finite element class.
*/
- std::vector<Point<dim> > normal_vectors;
+ typename std::vector<Point<dim> > normal_vectors;
/**
* Stores the face or subface,
* function was called. Is used
* by the @p{get_face} function.
*/
- DoFHandler<dim>::face_iterator present_face;
+ typename DoFHandler<dim>::face_iterator present_face;
};
template <int dim>
inline
-const std::vector<std::vector<Tensor<1,dim> > > &
+const typename std::vector<typename std::vector<Tensor<1,dim> > > &
FEValuesBase<dim>::get_shape_grads () const
{
Assert (update_flags & update_gradients, ExcAccessToUninitializedField());
template <int dim>
inline
-const std::vector<std::vector<Tensor<2,dim> > > &
+const typename std::vector<typename std::vector<Tensor<2,dim> > > &
FEValuesBase<dim>::get_shape_2nd_derivatives () const
{
Assert (update_flags & update_second_derivatives, ExcAccessToUninitializedField());
template <int dim>
inline
-const std::vector<Point<dim> > &
+const typename std::vector<Point<dim> > &
FEValuesBase<dim>::get_quadrature_points () const
{
Assert (update_flags & update_q_points, ExcAccessToUninitializedField());
template <int dim>
inline
-const std::vector<Point<dim> > &
+const typename std::vector<Point<dim> > &
FEValuesBase<dim>::get_support_points () const
{
Assert (update_flags & update_support_points, ExcAccessToUninitializedField());
template <int dim>
inline
-const DoFHandler<dim>::cell_iterator &
+const typename DoFHandler<dim>::cell_iterator &
FEValuesBase<dim>::get_cell() const
{
return present_cell;
template <int dim>
inline
-const std::vector<Point<dim> > &
+const typename std::vector<Point<dim> > &
FEFaceValuesBase<dim>::get_normal_vectors () const
{
Assert (update_flags & update_normal_vectors,
};
+
template <int dim>
inline
-DoFHandler<dim>::face_iterator
-FEFaceValuesBase<dim>::get_face() const {
+typename DoFHandler<dim>::face_iterator
+FEFaceValuesBase<dim>::get_face() const
+{
return present_face;
};
* @p{p_real} on the real cell
* @p{cell} and returns @p{p_real}.
*/
- virtual Point<dim> transform_unit_to_real_cell (const DoFHandler<dim>::cell_iterator cell,
+ virtual Point<dim> transform_unit_to_real_cell (const typename DoFHandler<dim>::cell_iterator &cell,
const Point<dim> &p) const;
/**
* @p{p_unit} on the unit cell
* @p{cell} and returns @p{p_unit}.
*/
- virtual Point<dim> transform_real_to_unit_cell (const DoFHandler<dim>::cell_iterator cell,
+ virtual Point<dim> transform_real_to_unit_cell (const typename DoFHandler<dim>::cell_iterator &cell,
const Point<dim> &p) const;
/**
* In two spatial dimensions, this function
* simply returns the length of the face.
*/
- virtual void get_face_jacobians (const DoFHandler<dim>::face_iterator &face,
- const std::vector<Point<dim-1> > &unit_points,
+ virtual void get_face_jacobians (const typename DoFHandler<dim>::face_iterator &face,
+ const typename std::vector<Point<dim-1> > &unit_points,
std::vector<double> &face_jacobi_determinants) const;
/**
* simply returns half the length of the
* whole face.
*/
- virtual void get_subface_jacobians (const DoFHandler<dim>::face_iterator &face,
+ virtual void get_subface_jacobians (const typename DoFHandler<dim>::face_iterator &face,
const unsigned int subface_no,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<double> &face_jacobi_determinants) const;
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<double> &face_jacobi_determinants) const;
/**
* Return the normal vectors to the
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_normal_vectors (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_normal_vectors (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<Point<dim> > &normal_vectors) const;
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<Point<dim> > &normal_vectors) const;
/**
* Return the normal vectors to the
* Refer to the base class for detailed
* information on this function.
*/
- virtual void get_normal_vectors (const DoFHandler<dim>::cell_iterator &cell,
+ virtual void get_normal_vectors (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
const unsigned int subface_no,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<Point<dim> > &normal_vectors) const;
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<Point<dim> > &normal_vectors) const;
/**
* Refer to the base class for detailed
* For higher dimensional finite elements
* we use multilinear mappings.
*/
- virtual void fill_fe_values (const DoFHandler<dim>::cell_iterator &cell,
- const std::vector<Point<dim> > &unit_points,
- std::vector<Tensor<2,dim> > &jacobians,
+ virtual void fill_fe_values (const typename DoFHandler<dim>::cell_iterator &cell,
+ const typename std::vector<Point<dim> > &unit_points,
+ typename std::vector<Tensor<2,dim> > &jacobians,
const bool compute_jacobians,
- std::vector<Tensor<3,dim> > &jacobians_grad,
+ typename std::vector<Tensor<3,dim> > &jacobians_grad,
const bool compute_jacobians_grad,
- std::vector<Point<dim> > &support_points,
+ typename std::vector<Point<dim> > &support_points,
const bool compute_support_points,
- std::vector<Point<dim> > &q_points,
+ typename std::vector<Point<dim> > &q_points,
const bool compute_q_points,
const FullMatrix<double> &shape_values_transform,
- const std::vector<std::vector<Tensor<1,dim> > > &shape_grad_transform) const;
+ const typename std::vector<typename std::vector<Tensor<1,dim> > > &shape_grad_transform) const;
/**
* Compute the gradients of the jacobian
* and real cell at the given
* points on the unit cell.
*/
- static void compute_jacobian_gradients (const DoFHandler<dim>::cell_iterator &cell,
- const std::vector<Point<dim> > &unit_points,
- std::vector<Tensor<3,dim> > &jacobians);
+ static void compute_jacobian_gradients (const typename DoFHandler<dim>::cell_iterator &cell,
+ const typename std::vector<Point<dim> > &unit_points,
+ typename std::vector<Tensor<3,dim> > &jacobians);
/**
*
* @author Wolfgang Bangerth, Guido Kanschat, 1998, 1999
*/
-template <int _dim>
+template <int dim_>
struct GeometryInfo
{
/**
* Present dimension. Does not
* look useful, but might be.
*/
- static const unsigned int dim = _dim;
+ static const unsigned int dim = dim_;
/**
* Number of children a cell has.
*/
- static const unsigned int children_per_cell = (1<<_dim);
+ static const unsigned int children_per_cell = (1<<dim_);
/**
* Number of faces a cell has.
*/
- static const unsigned int faces_per_cell = 2*_dim;
+ static const unsigned int faces_per_cell = 2*dim_;
/**
* Number of children each face has
* when the adjacent cell is refined.
*/
- static const unsigned int subfaces_per_face = GeometryInfo<_dim-1>::children_per_cell;
+ static const unsigned int subfaces_per_face = GeometryInfo<dim_-1>::children_per_cell;
/**
* Number of vertices a cell has.
*/
- static const unsigned int vertices_per_cell = (1<<_dim);
+ static const unsigned int vertices_per_cell = (1<<dim_);
/**
* Number of vertices each face has.
* @p{for (i=0; i<vertices_per_face; ++i)},
* at least if @p{i} is an @p{unsigned int}.
*/
- static const unsigned int vertices_per_face = GeometryInfo<_dim-1>::vertices_per_cell;
+ static const unsigned int vertices_per_face = GeometryInfo<dim_-1>::vertices_per_cell;
/**
* Number of lines each face has.
*/
- static const unsigned int lines_per_face = GeometryInfo<_dim-1>::lines_per_cell;
+ static const unsigned int lines_per_face = GeometryInfo<dim_-1>::lines_per_cell;
/**
* Number of quads on each face.
*/
- static const unsigned int quads_per_face = GeometryInfo<_dim-1>::quads_per_cell;
+ static const unsigned int quads_per_face = GeometryInfo<dim_-1>::quads_per_cell;
/**
* Number of lines of a cell.
* hypercube and the copy by
* lines.
*/
- static const unsigned int lines_per_cell = (2*GeometryInfo<dim-1>::lines_per_cell
- + GeometryInfo<dim-1>::vertices_per_cell);
+ static const unsigned int lines_per_cell = (2*GeometryInfo<dim_-1>::lines_per_cell
+ + GeometryInfo<dim_-1>::vertices_per_cell);
/**
* Number of quadrilaterals of a cell.
*
* Computation is analogous to @p{lines_per_cell}.
*/
- static const unsigned int quads_per_cell = (2*GeometryInfo<dim-1>::quads_per_cell
- + GeometryInfo<dim-1>::lines_per_cell);
+ static const unsigned int quads_per_cell = (2*GeometryInfo<dim_-1>::quads_per_cell
+ + GeometryInfo<dim_-1>::lines_per_cell);
/**
* Number of hexahedra of a cell.
* important for more than three
* dimensions!
*/
- static const unsigned int hexes_per_cell = (2*GeometryInfo<dim-1>::hexes_per_cell
- + GeometryInfo<dim-1>::quads_per_cell);
+ static const unsigned int hexes_per_cell = (2*GeometryInfo<dim_-1>::hexes_per_cell
+ + GeometryInfo<dim_-1>::quads_per_cell);
/**
* List of numbers which is
*/
static unsigned int child_cell_on_face (unsigned int face,
unsigned int subface);
-
};
* have to eliminate unused
* vertices beforehand.
*/
- static void delete_unused_vertices (std::vector<Point<dim> > &vertices,
- std::vector<CellData<dim> > &cells,
- SubCellData &subcelldata);
+ static void delete_unused_vertices (typename std::vector<Point<dim> > &vertices,
+ typename std::vector<CellData<dim> > &cells,
+ SubCellData &subcelldata);
/**
* This function can write the
* without further ado by the
* user.
*/
- static void debug_output_grid (const std::vector<CellData<dim> > &cells,
- const std::vector<Point<dim> > &vertices,
- std::ostream &out);
+ static void debug_output_grid (const typename std::vector<CellData<dim> > &cells,
+ const typename std::vector<Point<dim> > &vertices,
+ std::ostream &out);
};
* general documentation of this
* class.
*/
- static void reorder_cells (std::vector<CellData<dim> > &original_cells);
+ static void reorder_cells (typename std::vector<CellData<dim> > &original_cells);
private:
* @p{adjacent_cells} field
* of the inserted faces.
*/
- void insert_faces (std::map<Face,FaceData > &global_faces);
+ void insert_faces (typename std::map<Face,FaceData > &global_faces);
/**
* Find out the neighbors of the
{
/**
* Indices of the vertices of
- * this face.
+ * this face. The size of the array
+ * is equal to
+ * @p{GeometryInfo<dim>::vertices_per_face}.
*/
- unsigned int vertices[GeometryInfo<dim>::vertices_per_face];
+ unsigned int vertices[1<<(dim-1)];
/**
* Comparison operator. Use
* as recursive calls but rather
* as eliminated tail-recursion.
*/
- static void track_back (std::vector<Cell> &cells,
- RotationStack &rotation_states,
- const unsigned int track_back_to_cell);
+ static void track_back (typename std::vector<Cell> &cells,
+ RotationStack &rotation_states,
+ const unsigned int track_back_to_cell);
- static bool try_rotate_single_neighbors (std::vector<Cell> &cells,
- RotationStack &rotation_states);
+ static bool try_rotate_single_neighbors (typename std::vector<Cell> &cells,
+ RotationStack &rotation_states);
/**
* This is the main function that
* between original cells and
* presorted cells.
*/
- static void find_reordering (std::vector<Cell> &cells,
- std::vector<CellData<dim> > &original_cells,
- const std::vector<unsigned int> &new_cell_numbers);
+ static void find_reordering (typename std::vector<Cell> &cells,
+ typename std::vector<CellData<dim> > &original_cells,
+ const std::vector<unsigned int> &new_cell_numbers);
/**
* Preorder the incoming cells by
*/
static
std::vector<unsigned int>
- presort_cells (std::vector<Cell> &cells,
- std::map<Face,FaceData> &faces);
+ presort_cells (typename std::vector<Cell> &cells,
+ typename std::map<Face,FaceData> &faces);
+
+ /**
+ * By the resolution of Defect
+ * Report 45 to the ISO C++ 1998
+ * standard, nested classes
+ * automatically have access to
+ * members of the enclosing
+ * class. Nevertheless, some
+ * compilers don't implement this
+ * resolution yet, so we have to
+ * make them @p{friend}, which
+ * doesn't hurt on the other
+ * compilers as well.
+ */
+ friend class Cell;
+ friend class Face;
+ friend class FaceData;
};
#ifndef __deal2__intergrid_map_h
#define __deal2__intergrid_map_h
-template <class T> class SmartPointer;
+#include <base/smartpointer.h>
+
/**
* This class provides a map between two grids which are derived from
* The actual data. Hold one iterator
* for each cell on each level.
*/
- std::vector<std::vector<cell_iterator> > mapping;
+ typename std::vector<typename std::vector<cell_iterator> > mapping;
/**
* Store a pointer to the source grid.
* is not useful in the context of this
* class.
*/
- virtual void create_triangulation (const std::vector<Point<dim> > &vertices,
- const std::vector<CellData<dim> > &cells,
- const SubCellData &subcelldata);
+ virtual void create_triangulation (const typename std::vector<Point<dim> > &vertices,
+ const typename std::vector<CellData<dim> > &cells,
+ const SubCellData &subcelldata);
/**
* Writes all refine and coarsen
* and the @ref{GridIn} and
* @ref{GridReordering} class.
*/
- virtual void create_triangulation (const std::vector<Point<dim> > &vertices,
- const std::vector<CellData<dim> > &cells,
- const SubCellData &subcelldata);
+ virtual void create_triangulation (const typename std::vector<Point<dim> > &vertices,
+ const typename std::vector<CellData<dim> > &cells,
+ const SubCellData &subcelldata);
/**
* Distort the grid by randomly
*
* Usage is like @p{levels[3]->quads}.
*/
- std::vector<TriangulationLevel<dim>*> levels;
+ typename std::vector<TriangulationLevel<dim>*> levels;
/**
* Array of the vertices of this
* triangulation.
*/
- std::vector<Point<dim> > vertices;
+ typename std::vector<Point<dim> > vertices;
/**
* Array storing a bit-pattern which
template <>
inline
TriaIterator<1,TriaObjectAccessor<0, 1> >
-CellAccessor<1>::face (const unsigned int) const {
- Assert (false, ExcNotUsefulForThisDimension());
+CellAccessor<1>::face (const unsigned int) const
+{
+ Assert (false, TriaAccessor<1>::ExcNotUsefulForThisDimension());
return TriaIterator<1,TriaObjectAccessor<0, 1> >();
};
+
template <>
inline
Triangulation<2>::face_iterator
-CellAccessor<2>::face (const unsigned int i) const {
+CellAccessor<2>::face (const unsigned int i) const
+{
return line(i);
};
+
template <>
inline
Triangulation<3>::face_iterator
-CellAccessor<3>::face (const unsigned int i) const {
- return quad(i);
+CellAccessor<3>::face (const unsigned int i) const
+{
+ return this->quad(i);
};
+
template <int dim>
inline
int
-CellAccessor<dim>::neighbor_index (const unsigned int i) const {
+CellAccessor<dim>::neighbor_index (const unsigned int i) const
+{
Assert (i<GeometryInfo<dim>::faces_per_cell,
typename TriaAccessor<dim>::ExcInvalidNeighbor(i));
return tria->levels[present_level]->
* @author Wolfgang Bangerth, 1998
*/
template <int dim, typename Accessor>
-class TriaRawIterator : public std::bidirectional_iterator<Accessor,int>
+class TriaRawIterator :
+#ifdef HAVE_STD_ITERATOR_CLASS
+ public std::iterator<std::bidirectional_iterator_tag,int>
+#else
+ bidirectional_iterator<Accessor,int>
+#endif
{
public:
/**
#include <base/subscriptor.h>
#include <base/smartpointer.h>
#include <lac/vector.h>
+#include <lac/sparsity_pattern.h>
#include <vector>
/**
* Array of the objects to be held.
*/
- std::vector<Object> objects;
+ typename std::vector<Object> objects;
};
* numbers which start from zero on each
* level.
*/
- std::vector<DoFLevel<dim>*> mg_levels;
+ typename std::vector<DoFLevel<dim>*> mg_levels;
/**
* For each vertex there is a list of
* on the different levels it lives on and
* which are these levels.
*/
- std::vector<MGVertexDoFs> mg_vertex_dofs;
+ typename std::vector<MGVertexDoFs> mg_vertex_dofs;
/**
* Vectors storing the number of degrees of
/*---------------------------- problem_assembler.h ---------------------------*/
#include <base/exceptions.h>
+#include <lac/full_matrix.h>
+#include <lac/vector.h>
#include <dofs/dof_handler.h>
#include <dofs/dof_accessor.h>
#include <fe/fe_values.h>
virtual void assemble (FullMatrix<double> &cell_matrix,
Vector<double> &rhs,
const FEValues<dim> &fe_values,
- const DoFHandler<dim>::cell_iterator &cell) const;
+ const typename DoFHandler<dim>::cell_iterator &cell) const;
/**
* Virtual function which only assembles
*/
virtual void assemble (FullMatrix<double> &cell_matrix,
const FEValues<dim> &fe_values,
- const DoFHandler<dim>::cell_iterator &cell) const;
+ const typename DoFHandler<dim>::cell_iterator &cell) const;
/**
* Virtual function which only assembles
*/
virtual void assemble (Vector<double> &rhs,
const FEValues<dim> &fe_values,
- const DoFHandler<dim>::cell_iterator &cell) const;
+ const typename DoFHandler<dim>::cell_iterator &cell) const;
/**
* Return number of equations for this
* See the general documentation of this
* class for more detail.
*/
- typedef std::map<unsigned char,const Function<dim>*> FunctionMap;
+ typedef typename std::map<unsigned char,const Function<dim>*> FunctionMap;
/**
* Typdedef an iterator which assembles
* matrices and vectors.
* List of data elements with vectors of
* values for each degree of freedom.
*/
- std::vector<DataEntry> dof_data;
+ typename std::vector<DataEntry> dof_data;
/**
* List of data elements with vectors of
* values for each cell.
*/
- std::vector<DataEntry> cell_data;
+ typename std::vector<DataEntry> cell_data;
/**
* This is a list of patches that is
* in the output routines of the base
* classes.
*/
- std::vector<DataOutBase::Patch<patch_dim,patch_space_dim> > patches;
+ typename std::vector<DataOutBase::Patch<patch_dim,patch_space_dim> > patches;
/**
* Function by which the base
* what patches they shall write
* to a file.
*/
- virtual const std::vector<DataOutBase::Patch<patch_dim,patch_space_dim> > &
+ virtual const typename std::vector<typename DataOutBase::Patch<patch_dim,patch_space_dim> > &
get_patches () const;
/**
* aliased to a name that is
* better to type.
*/
- typedef std::pair<typename DoFHandler<dim>::cell_iterator,unsigned int> FaceDescriptor;
+ typedef typename std::pair<typename DoFHandler<dim>::cell_iterator,unsigned int> FaceDescriptor;
/**
#include <base/data_out_base.h>
#include <base/smartpointer.h>
+#include <lac/vector.h>
#include <string>
#include <vector>
* List of patches of all past and
* present parameter value data sets.
*/
- std::vector<DataOutBase::Patch<dim+1> > patches;
+ typename std::vector<DataOutBase::Patch<dim+1> > patches;
/**
* Structure holding data vectors
/**
* List of DoF data vectors.
*/
- std::vector<DataVector> dof_data;
+ typename std::vector<DataVector> dof_data;
/**
* List of cell data vectors.
*/
- std::vector<DataVector> cell_data;
+ typename std::vector<DataVector> cell_data;
/**
* This is the function through
* the base class @ref{DataOutBase}) to
* the actual output function.
*/
- virtual const std::vector<DataOutBase::Patch<dim+1> > & get_patches () const;
+ virtual const typename std::vector<typename DataOutBase::Patch<dim+1> > & get_patches () const;
/**
template <int dim>
static void
cell_wise_dg (DoFHandler<dim> &dof_handler,
- const std::vector<typename DoFHandler<dim>::cell_iterator> &cell_order);
+ const typename std::vector<typename DoFHandler<dim>::cell_iterator> &cell_order);
/**
*/
template <int dim>
static void
- cell_wise_dg (MGDoFHandler<dim> &dof_handler,
- const unsigned int level,
- const std::vector<typename MGDoFHandler<dim>::cell_iterator> &cell_order);
+ cell_wise_dg (MGDoFHandler<dim> &dof_handler,
+ const unsigned int level,
+ const typename std::vector<typename MGDoFHandler<dim>::cell_iterator> &cell_order);
/**
* for each boundary indicator, which is
* guaranteed by the @p{map} data type.
*/
- typedef std::map<unsigned char,const Function<dim>*> FunctionMap;
+ typedef typename std::map<unsigned char,const Function<dim>*> FunctionMap;
/**
* general documentation of this
* class for more information.
*/
- typedef std::map<typename DoFHandler<dim>::face_iterator,std::vector<double> > FaceIntegrals;
+ typedef typename std::map<typename DoFHandler<dim>::face_iterator,std::vector<double> > FaceIntegrals;
/**
* Redeclare an active cell iterator.
* This is simply for convenience.
*/
- typedef DoFHandler<dim>::active_cell_iterator active_cell_iterator;
+ typedef typename DoFHandler<dim>::active_cell_iterator active_cell_iterator;
/**
* index of the solution
* vector.
*/
- std::vector<std::vector<std::vector<Tensor<1,dim> > > > psi;
+ typename std::vector<typename std::vector<typename std::vector<Tensor<1,dim> > > > psi;
/**
* The same vector for a neighbor cell
*/
- std::vector<std::vector<std::vector<Tensor<1,dim> > > > neighbor_psi;
+ typename std::vector<typename std::vector<typename std::vector<Tensor<1,dim> > > > neighbor_psi;
/**
* The normal vectors of the finite
* element function on one face
*/
- std::vector<Point<dim> > normal_vectors;
+ typename std::vector<Point<dim> > normal_vectors;
/**
* Two arrays needed for the
const unsigned int face_no,
FEFaceValues<dim> &fe_face_values,
FESubfaceValues<dim> &fe_subface_values);
+
+ /**
+ * By the resolution of Defect
+ * Report 45 to the ISO C++ 1998
+ * standard, nested classes
+ * automatically have access to
+ * members of the enclosing
+ * class. Nevertheless, some
+ * compilers don't implement this
+ * resolution yet, so we have to
+ * make them @p{friend}, which
+ * doesn't hurt on the other
+ * compilers as well.
+ */
+ friend class Data;
};
* on this.
*/
template <typename number>
- void evaluate (const std::vector<Vector<number> > &values,
- const std::vector<double> &y_values,
- const unsigned int n_intervals,
- const IntervalSpacing interval_spacing = linear);
+ void evaluate (const typename std::vector<Vector<number> > &values,
+ const std::vector<double> &y_values,
+ const unsigned int n_intervals,
+ const IntervalSpacing interval_spacing = linear);
/**
* This function is only a wrapper
* See the general documentation of this
* class for more detail.
*/
- typedef std::map<unsigned char,const Function<dim>*> FunctionMap;
+ typedef typename std::map<unsigned char,const Function<dim>*> FunctionMap;
/**
* Assemble the mass matrix. If no
* onto the new (refined and/or
* coarsenend) grid.
*/
- void prepare_for_coarsening_and_refinement (const std::vector<Vector<number> > &all_in);
+ void prepare_for_coarsening_and_refinement (const typename std::vector<Vector<number> > &all_in);
/**
* Same as previous function
* several functions can be
* performed in one step.
*/
- void interpolate (const std::vector<Vector<number> >&all_in,
- std::vector<Vector<number> > &all_out) const;
+ void interpolate (const typename std::vector<Vector<number> >&all_in,
+ typename std::vector<Vector<number> > &all_out) const;
/**
* Same as the previous function.
unsigned int memory_consumption () const;
std::vector<unsigned int> *indices_ptr;
- std::vector<Vector<number> > *dof_values_ptr;
+ typename std::vector<Vector<number> > *dof_values_ptr;
};
/**
* collecting all these structures in a vector
* helps avoiding fraqmentation of the memory.
*/
- std::vector<Pointerstruct> all_pointerstructs;
+ typename std::vector<Pointerstruct> all_pointerstructs;
/**
* Is used for
* of all cells that'll be coarsened
* will be stored in this vector.
*/
- std::vector<std::vector<Vector<number> > > dof_values_on_cell;
+ typename std::vector<std::vector<Vector<number> > > dof_values_on_cell;
};
*/
template <int dim>
static void project_boundary_values (const DoFHandler<dim> &dof,
- const std::map<unsigned char,const Function<dim>*> &boundary_function,
+ const typename std::map<unsigned char,const Function<dim>*> &boundary_function,
const Quadrature<dim-1> &q,
std::map<unsigned int,double> &boundary_values);
//---------------------------- dof_accessor.cc ---------------------------
+#include <lac/vector.h>
+#include <lac/block_vector.h>
+#include <lac/sparse_matrix.h>
+
#include <dofs/dof_accessor.h>
#include <dofs/dof_accessor.templates.h>
#include <dofs/dof_handler.h>
#include <grid/tria_iterator.templates.h>
#include <fe/fe.h>
-#include <lac/vector.h>
-#include <lac/block_vector.h>
-#include <lac/sparse_matrix.h>
-
#include <vector>
DoFAccessor<dim>::ExcVectorDoesNotMatch());
if (!has_children())
- // if this cell has no children: simply
+ // if this cell has no children: simply
// set the values on this cell
set_dof_values (local_values, values);
else
#include <algorithm>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
+
template <int dim>
const unsigned int DoFHandler<dim>::invalid_dof_index;
#include <algorithm>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
template <int dim>
void DoFRenumbering::Cuthill_McKee (DoFHandler<dim> &dof_handler,
const bool reversed_numbering,
template <int dim>
void
DoFRenumbering::cell_wise_dg (DoFHandler<dim>& dof,
- const std::vector<typename DoFHandler<dim>::cell_iterator>& cells)
+ const typename std::vector<typename DoFHandler<dim>::cell_iterator>& cells)
{
Assert(cells.size() == dof.get_tria().n_active_cells(),
ExcDimensionMismatch(cells.size(),
void
DoFRenumbering::cell_wise_dg (MGDoFHandler<dim>& dof,
unsigned int level,
- const std::vector<typename MGDoFHandler<dim>::cell_iterator>& cells)
+ const typename std::vector<typename MGDoFHandler<dim>::cell_iterator>& cells)
{
Assert(cells.size() == dof.get_tria().n_cells(level),
ExcDimensionMismatch(cells.size(),
}
-// for whatever reason, the random_shuffle function used below needs
-// lrand48 to be declared (rather than do so itself. however,
-// inclusion of <cstdlib> or <stdlib.h> does not help, so we declare
-// that function ourselves
-extern "C" long int lrand48 (void) throw();
-
-
template <int dim>
void
DoFRenumbering::random (DoFHandler<dim> &dof_handler)
#include <algorithm>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
+
template <int dim, class SparsityPattern>
void
DoFTools::make_sparsity_pattern (const DoFHandler<dim> &dof,
template <int dim>
void DoFTools::make_boundary_sparsity_pattern (const DoFHandler<dim>& dof,
- const DoFHandler<dim>::FunctionMap &boundary_indicators,
+ const typename DoFHandler<dim>::FunctionMap &boundary_indicators,
const std::vector<unsigned int> &dof_to_boundary_mapping,
SparsityPattern &sparsity)
{
#endif
-
#if deal_II_dimension == 2
template <>
#include <dofs/dof_accessor.h>
#include <grid/tria_boundary.h>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
+
/*------------------------------- FiniteElementData ----------------------*/
template <int dim>
-FiniteElementData<dim>::FiniteElementData ()
+FiniteElementData<dim>::FiniteElementData () :
+ dofs_per_vertex(static_cast<unsigned int>(-1)),
+ dofs_per_line(static_cast<unsigned int>(-1)),
+ dofs_per_quad(static_cast<unsigned int>(-1)),
+ dofs_per_hex(static_cast<unsigned int>(-1)),
+ first_line_index(static_cast<unsigned int>(-1)),
+ first_quad_index(static_cast<unsigned int>(-1)),
+ first_hex_index(static_cast<unsigned int>(-1)),
+ first_face_line_index(static_cast<unsigned int>(-1)),
+ first_face_quad_index(static_cast<unsigned int>(-1)),
+ dofs_per_face(static_cast<unsigned int>(-1)),
+ dofs_per_cell(static_cast<unsigned int>(-1)),
+ transform_functions(static_cast<unsigned int>(-1)),
+ components(static_cast<unsigned int>(-1))
{
Assert (false, ExcNotImplemented());
};
/*------------------------------- FiniteElementBase ----------------------*/
+
template <int dim>
FiniteElementBase<dim>::FiniteElementBase (const FiniteElementData<dim> &fe_data,
const std::vector<bool> &restriction_is_additive_flags) :
template <int dim>
-void FiniteElement<dim>::fill_fe_values (const DoFHandler<dim>::cell_iterator &,
- const std::vector<Point<dim> > &,
- std::vector<Tensor<2,dim> > &,
+void FiniteElement<dim>::fill_fe_values (const typename DoFHandler<dim>::cell_iterator &,
+ const typename std::vector<Point<dim> > &,
+ typename std::vector<Tensor<2,dim> > &,
const bool,
- std::vector<Tensor<3,dim> > &,
+ typename std::vector<Tensor<3,dim> > &,
const bool,
- std::vector<Point<dim> > &,
+ typename std::vector<Point<dim> > &,
const bool,
- std::vector<Point<dim> > &,
+ typename std::vector<Point<dim> > &,
const bool,
const FullMatrix<double> &,
- const std::vector<std::vector<Tensor<1,dim> > > &) const {
+ const typename std::vector<typename std::vector<Tensor<1,dim> > > &) const {
Assert (false, ExcPureFunctionCalled());
};
template <int dim>
-void FiniteElement<dim>::fill_fe_face_values (const DoFHandler<dim>::cell_iterator &cell,
+void FiniteElement<dim>::fill_fe_face_values (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
- const std::vector<Point<dim-1> > &unit_points,
- const std::vector<Point<dim> > &global_unit_points,
- std::vector<Tensor<2,dim> > &jacobians,
+ const typename std::vector<Point<dim-1> > &unit_points,
+ const typename std::vector<Point<dim> > &global_unit_points,
+ typename std::vector<Tensor<2,dim> > &jacobians,
const bool compute_jacobians,
- std::vector<Tensor<3,dim> > &jacobians_grad,
+ typename std::vector<Tensor<3,dim> > &jacobians_grad,
const bool compute_jacobians_grad,
- std::vector<Point<dim> > &support_points,
+ typename std::vector<Point<dim> > &support_points,
const bool compute_support_points,
- std::vector<Point<dim> > &q_points,
+ typename std::vector<Point<dim> > &q_points,
const bool compute_q_points,
std::vector<double> &face_jacobi_determinants,
const bool compute_face_jacobians,
- std::vector<Point<dim> > &normal_vectors,
+ typename std::vector<Point<dim> > &normal_vectors,
const bool compute_normal_vectors,
const FullMatrix<double> &shape_values_transform,
- const std::vector<std::vector<Tensor<1,dim> > > &shape_gradients_transform) const
+ const typename std::vector<typename std::vector<Tensor<1,dim> > > &shape_gradients_transform) const
{
Assert (jacobians.size() == unit_points.size(),
typename FiniteElementBase<dim>::ExcWrongFieldDimension(jacobians.size(),
template <int dim>
-void FiniteElement<dim>::fill_fe_subface_values (const DoFHandler<dim>::cell_iterator &cell,
+void FiniteElement<dim>::fill_fe_subface_values (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
const unsigned int subface_no,
- const std::vector<Point<dim-1> > &unit_points,
- const std::vector<Point<dim> > &global_unit_points,
- std::vector<Tensor<2,dim> > &jacobians,
+ const typename std::vector<Point<dim-1> > &unit_points,
+ const typename std::vector<Point<dim> > &global_unit_points,
+ typename std::vector<Tensor<2,dim> > &jacobians,
const bool compute_jacobians,
- std::vector<Tensor<3,dim> > &jacobians_grad,
+ typename std::vector<Tensor<3,dim> > &jacobians_grad,
const bool compute_jacobians_grad,
- std::vector<Point<dim> > &q_points,
+ typename std::vector<Point<dim> > &q_points,
const bool compute_q_points,
std::vector<double> &face_jacobi_determinants,
const bool compute_face_jacobians,
- std::vector<Point<dim> > &normal_vectors,
+ typename std::vector<Point<dim> > &normal_vectors,
const bool compute_normal_vectors,
const FullMatrix<double> &shape_values_transform,
- const std::vector<std::vector<Tensor<1,dim> > > &shape_gradients_transform) const
+ const typename std::vector<std::vector<Tensor<1,dim> > > &shape_gradients_transform) const
{
Assert (jacobians.size() == unit_points.size(),
typename FiniteElementBase<dim>::ExcWrongFieldDimension(jacobians.size(),
template <int dim>
void
-FiniteElement<dim>::get_unit_support_points (std::vector<Point<dim> > &) const
+FiniteElement<dim>::get_unit_support_points (typename std::vector<Point<dim> > &) const
{
Assert (false, ExcPureFunctionCalled());
};
template <int dim>
void
-FiniteElement<dim>::get_support_points (const DoFHandler<dim>::cell_iterator &,
- std::vector<Point<dim> > &) const
+FiniteElement<dim>::get_support_points (const typename DoFHandler<dim>::cell_iterator &,
+ typename std::vector<Point<dim> > &) const
{
Assert (false, ExcPureFunctionCalled());
};
#include <fe/fe_lib.criss_cross.h>
+#include <grid/tria.h>
#include <grid/tria_iterator.h>
#include <dofs/dof_accessor.h>
#include <grid/geometry_info.h>
#include <cmath>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
/*-----------------------------------2d------------------------------------
Maple script to automate some of the error-prone computations on
template <>
void FECrissCross<2>::get_unit_support_points (std::vector<Point<2> > &unit_points) const {
Assert(unit_points.size()==dofs_per_cell,
+ FiniteElementBase<2>::
ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
unit_points[0] = Point<2> (0,0);
const unsigned int dim = 2;
Assert (support_points.size() == dofs_per_cell,
+ FiniteElementBase<2>::
ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
// copy vertices
Assert ((support_points.size() == dofs_per_face) &&
(support_points.size() == GeometryInfo<dim>::vertices_per_face),
+ FiniteElementBase<2>::
ExcWrongFieldDimension (support_points.size(),
GeometryInfo<dim>::vertices_per_face));
void FECrissCross<2>::get_local_mass_matrix (const DoFHandler<2>::cell_iterator &cell,
FullMatrix<double> &mass_matrix) const {
Assert (mass_matrix.n() == dofs_per_cell,
+ FiniteElementBase<2>::
ExcWrongFieldDimension(mass_matrix.n(),dofs_per_cell));
Assert (mass_matrix.m() == dofs_per_cell,
+ FiniteElementBase<2>::
ExcWrongFieldDimension(mass_matrix.m(),dofs_per_cell));
const double x[4] = { cell->vertex(0)(0),
// more or less copied from the linear
// finite element
Assert (unit_points.size() == face_jacobians.size(),
+ FiniteElementBase<2>::
ExcWrongFieldDimension (unit_points.size(), face_jacobians.size()));
// a linear mapping for a single line
// more or less copied from the linear
// finite element
Assert (unit_points.size() == face_jacobians.size(),
- ExcWrongFieldDimension (unit_points.size(), face_jacobians.size()));
+ FiniteElementBase<2>::ExcWrongFieldDimension (unit_points.size(),
+ face_jacobians.size()));
Assert (face->at_boundary() == false,
- ExcBoundaryFaceUsed ());
+ FiniteElement<2>::ExcBoundaryFaceUsed ());
// a linear mapping for a single line
// produces particularly simple
// more or less copied from the linear
// finite element
Assert (unit_points.size() == normal_vectors.size(),
+ FiniteElementBase<2>::
ExcWrongFieldDimension (unit_points.size(), normal_vectors.size()));
const DoFHandler<2>::face_iterator face = cell->face(face_no);
// subface have the same direction as that
// for the face
Assert (unit_points.size() == normal_vectors.size(),
- ExcWrongFieldDimension (unit_points.size(), normal_vectors.size()));
+ FiniteElementBase<2>::ExcWrongFieldDimension (unit_points.size(), normal_vectors.size()));
Assert (cell->face(face_no)->at_boundary() == false,
- ExcBoundaryFaceUsed ());
+ FiniteElement<2>::ExcBoundaryFaceUsed ());
const DoFHandler<2>::face_iterator face = cell->face(face_no);
// compute direction of line
template <int dim>
-void FECrissCross<dim>::fill_fe_values (const DoFHandler<dim>::cell_iterator &cell,
- const std::vector<Point<dim> > &unit_points,
- std::vector<Tensor<2,dim> > &jacobians,
+void FECrissCross<dim>::fill_fe_values (const typename DoFHandler<dim>::cell_iterator &cell,
+ const typename std::vector<Point<dim> > &unit_points,
+ typename std::vector<Tensor<2,dim> > &jacobians,
const bool compute_jacobians,
- std::vector<Tensor<3,dim> > &jacobians_grad,
+ typename std::vector<Tensor<3,dim> > &jacobians_grad,
const bool compute_jacobians_grad,
- std::vector<Point<dim> > &support_points,
+ typename std::vector<Point<dim> > &support_points,
const bool compute_support_points,
- std::vector<Point<dim> > &q_points,
+ typename std::vector<Point<dim> > &q_points,
const bool compute_q_points,
const FullMatrix<double> &shape_values_transform,
- const std::vector<std::vector<Tensor<1,dim> > > &/*shape_grad_transform*/) const {
+ const typename std::vector<typename std::vector<Tensor<1,dim> > > &/*shape_grad_transform*/) const {
Assert (jacobians.size() == unit_points.size(),
typename FiniteElementBase<dim>::ExcWrongFieldDimension(jacobians.size(),
unit_points.size()));
template <int dim>
Point<dim>
-FECrissCross<dim>::transform_unit_to_real_cell (const typename DoFHandler<dim>::cell_iterator,
+FECrissCross<dim>::transform_unit_to_real_cell (const typename DoFHandler<dim>::cell_iterator &,
const Point<dim> &) const
{
Assert (false, ExcNotImplemented());
template <int dim>
Point<dim>
-FECrissCross<dim>::transform_real_to_unit_cell (const typename DoFHandler<dim>::cell_iterator,
+FECrissCross<dim>::transform_real_to_unit_cell (const typename DoFHandler<dim>::cell_iterator &,
const Point<dim> &) const
{
Assert (false, ExcNotImplemented());
#include <fe/fe_lib.lagrange.h>
+#include <grid/tria.h>
#include <grid/tria_iterator.h>
#include <dofs/dof_accessor.h>
#include <grid/geometry_info.h>
void FEQ3<2>::get_local_mass_matrix (const DoFHandler<2>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const {
Assert (local_mass_matrix.n() == dofs_per_cell,
- ExcWrongFieldDimension(local_mass_matrix.n(),dofs_per_cell));
+ FiniteElementBase<2>::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<2>::ExcWrongFieldDimension(local_mass_matrix.m(),dofs_per_cell));
const double x[4] = { cell->vertex(0)(0),
cell->vertex(1)(0),
which is sufficient since $det J$ is a bilinear function.
*/
Assert ((-x[0]+x[1])*(-y[0]+y[3])-(-x[0]+x[3])*(-y[0]+y[1]), // xi=eta=0
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
Assert ((x[2]-x[3])*(-y[0]+y[3])-(-x[0]+x[3])*(y[2]-y[3]), // xi=0, eta=1
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
Assert ((x[2]-x[3])*(-y[1]+y[2])-(-x[1]+x[2])*(y[2]-y[3]), // xi=eta=1
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
Assert ((-x[0]+x[1])*(-y[1]+y[2])-(-x[1]+x[2])*(-y[0]+y[1]), // xi=1, eta=0
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
const double t1 = x[0]-x[1]+x[2]-x[3];
const double t2 = -y[0]+y[1];
template <>
void FEQ3<2>::get_unit_support_points (std::vector<Point<2> > &unit_points) const {
Assert (unit_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
+ FiniteElementBase<2>::ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
unit_points[0] = Point<2>(0,0);
unit_points[1] = Point<2>(1,0);
void FEQ3<2>::get_support_points (const DoFHandler<2>::cell_iterator &cell,
std::vector<Point<2> > &support_points) const {
Assert (support_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
+ FiniteElementBase<2>::ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
const double x[4] = { cell->vertex(0)(0),
cell->vertex(1)(0),
void FEQ3<2>::get_face_support_points (const DoFHandler<2>::face_iterator &face,
std::vector<Point<2> > &support_points) const {
Assert (support_points.size() == dofs_per_face,
- ExcWrongFieldDimension (support_points.size(), dofs_per_face));
+ FiniteElementBase<2>::ExcWrongFieldDimension (support_points.size(), dofs_per_face));
for (unsigned int vertex=0; vertex<2; ++vertex)
support_points[vertex] = face->vertex(vertex);
FullMatrix<double> &local_mass_matrix) const
{
Assert (local_mass_matrix.n() == dofs_per_cell,
- ExcWrongFieldDimension(local_mass_matrix.n(),dofs_per_cell));
+ FiniteElementBase<3>::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<3>::ExcWrongFieldDimension(local_mass_matrix.m(),dofs_per_cell));
throw ExcComputationNotUseful(3);
};
void FEQ3<3>::get_unit_support_points (std::vector<Point<3> > &unit_points) const
{
Assert (unit_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
+ FiniteElementBase<3>::ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
unit_points[0] = Point<3>(0, 0, 0);
unit_points[1] = Point<3>(1, 0, 0);
unit_points[2] = Point<3>(1, 0, 1);
std::vector<Point<3> > &support_points) const
{
Assert (support_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
+ FiniteElementBase<3>::ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
const Point<3> vertices[8] = { cell->vertex(0),
cell->vertex(1),
std::vector<Point<3> > &support_points) const
{
Assert (support_points.size() == dofs_per_face,
- ExcWrongFieldDimension (support_points.size(), dofs_per_face));
+ FiniteElementBase<3>::ExcWrongFieldDimension (support_points.size(), dofs_per_face));
for (unsigned int vertex=0; vertex<2; ++vertex)
support_points[vertex] = face->vertex(vertex);
//---------------------------- fe_lib.dg.cc ---------------------------
-#include<fe/fe_lib.dg.h>
+#include <fe/fe_lib.dg.h>
+#include <grid/tria.h>
+
+
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
#if deal_II_dimension == 1
template <int dim>
void
FEDG_Q1<dim>::get_face_support_points (const typename DoFHandler<dim>::face_iterator &,
- std::vector<Point<dim> > &support_points) const
+ typename std::vector<Point<dim> > &support_points) const
{
Assert ((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 &,
- std::vector<Point<dim> > &support_points) const
+ typename std::vector<Point<dim> > &support_points) const
{
Assert ((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 &,
- std::vector<Point<dim> > &support_points) const
+ typename std::vector<Point<dim> > &support_points) const
{
Assert ((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 &,
- std::vector<Point<dim> > &support_points) const
+ typename std::vector<Point<dim> > &support_points) const
{
Assert ((support_points.size() == 0),
FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),0));
#include <fe/fe_lib.dg.h>
+#include <grid/tria.h>
#include <grid/tria_iterator.h>
#include <dofs/dof_accessor.h>
#include <grid/geometry_info.h>
#include <algorithm>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
+
template <int dim>
FEDG_Q0<dim>::FEDG_Q0 () :
template <int dim>
-void FEDG_Q0<dim>::get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
+void FEDG_Q0<dim>::get_local_mass_matrix (const typename DoFHandler<dim>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const
{
Assert (local_mass_matrix.n() == dofs_per_cell,
template <int dim>
void
-FEDG_Q0<dim>::get_unit_support_points (std::vector<Point<dim> > &unit_points) const
+FEDG_Q0<dim>::get_unit_support_points (typename std::vector<Point<dim> > &unit_points) const
{
Assert (unit_points.size() == dofs_per_cell,
FiniteElementBase<dim>::ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
template <int dim>
void
FEDG_Q0<dim>::get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const
+ typename std::vector<Point<dim> > &support_points) const
{
Assert (support_points.size() == dofs_per_cell,
FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
template <int dim>
void
FEDG_Q0<dim>::get_face_support_points (const typename DoFHandler<dim>::face_iterator &,
- std::vector<Point<dim> > &support_points) const
+ typename std::vector<Point<dim> > &support_points) const
{
Assert ((support_points.size() == 0),
FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),0));
#include <fe/fe_lib.dgp.h>
+#include <grid/tria.h>
#include <grid/tria_iterator.h>
#include <dofs/dof_accessor.h>
#include <grid/geometry_info.h>
#include <algorithm>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
+
+
// declare explicit specializations before use:
template <> void FEDG_P1<deal_II_dimension>::initialize_matrices ();
{
Assert(false, ExcNotImplemented ());
Assert (local_mass_matrix.n() == dofs_per_cell,
- ExcWrongFieldDimension(local_mass_matrix.n(),dofs_per_cell));
+ FiniteElementBase<2>::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<2>::ExcWrongFieldDimension(local_mass_matrix.m(),
+ dofs_per_cell));
};
void FEDG_P1<2>::get_unit_support_points (std::vector<Point<2> > &unit_points) const
{
Assert (unit_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
+ FiniteElementBase<2>::ExcWrongFieldDimension (unit_points.size(),
+ dofs_per_cell));
unit_points[0] = Point<2> (.5,.5);
unit_points[1] = Point<2> (1,0);
FullMatrix<double> &local_mass_matrix) const
{
Assert (local_mass_matrix.n() == dofs_per_cell,
- ExcWrongFieldDimension(local_mass_matrix.n(),dofs_per_cell));
+ FiniteElementBase<3>::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<3>::ExcWrongFieldDimension(local_mass_matrix.m(),
+ dofs_per_cell));
throw ExcComputationNotUseful(3);
};
void FEDG_P1<3>::get_unit_support_points (std::vector<Point<3> > &unit_points) const
{
Assert (unit_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
+ FiniteElementBase<3>::ExcWrongFieldDimension (unit_points.size(),
+ dofs_per_cell));
unit_points[0] = Point<3> (.5,.5,.5);
unit_points[1] = Point<3> (1,0,0);
template <int dim>
void
FEDG_P1<dim>::get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const
+ typename std::vector<Point<dim> > &support_points) const
{
Assert (support_points.size() == dofs_per_cell,
typename FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),
template <int dim>
void
FEDG_P1<dim>::get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const
+ typename std::vector<Point<dim> > &support_points) const
{
Assert ((support_points.size() == dofs_per_face) &&
(support_points.size() == GeometryInfo<dim>::vertices_per_face),
#include <fe/fe_lib.dgp.h>
+#include <grid/tria.h>
#include <grid/tria_iterator.h>
#include <dofs/dof_accessor.h>
#include <grid/geometry_info.h>
#include <algorithm>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
+
// declare explicit specializations before use:
template <> void FEDG_P2<deal_II_dimension>::initialize_matrices ();
void FEDG_P2<2>::get_unit_support_points (std::vector<Point<2> > &unit_points) const
{
Assert (unit_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
+ FiniteElementBase<2>::ExcWrongFieldDimension (unit_points.size(),
+ dofs_per_cell));
unit_points[0] = Point<2> (.5,.5);
unit_points[1] = Point<2> (1,0);
};
+
template <>
void FEDG_P2<3>::get_local_mass_matrix (const DoFHandler<3>::cell_iterator &,
FullMatrix<double> &local_mass_matrix) const
{
Assert (local_mass_matrix.n() == dofs_per_cell,
- ExcWrongFieldDimension(local_mass_matrix.n(),dofs_per_cell));
+ FiniteElementBase<3>::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<3>::ExcWrongFieldDimension(local_mass_matrix.m(),
+ dofs_per_cell));
throw ExcComputationNotUseful(3);
};
+
template <>
-void FEDG_P2<3>::get_unit_support_points (std::vector<Point<3> > &unit_points) const {
+void FEDG_P2<3>::get_unit_support_points (std::vector<Point<3> > &unit_points) const
+{
Assert (unit_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
+ FiniteElementBase<3>::ExcWrongFieldDimension (unit_points.size(),
+ dofs_per_cell));
unit_points[0] = Point<3> (.5,.5,.5);
unit_points[1] = Point<3> (1,0,0);
template <int dim>
void
FEDG_P2<dim>::get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const
+ typename std::vector<Point<dim> > &support_points) const
{
Assert (support_points.size() == dofs_per_cell,
typename FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),
template <int dim>
void
FEDG_P2<dim>::get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const
+ typename std::vector<Point<dim> > &support_points) const
{
Assert ((support_points.size() == dofs_per_face) &&
(support_points.size() == GeometryInfo<dim>::vertices_per_face),
#include <fe/fe_lib.dgp.h>
+#include <grid/tria.h>
#include <grid/tria_iterator.h>
#include <dofs/dof_accessor.h>
#include <grid/geometry_info.h>
#include <algorithm>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
// declare explicit specializations before use:
template <> void FEDG_P3<deal_II_dimension>::initialize_matrices ();
{
Assert(false, ExcNotImplemented ());
Assert (unit_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
+ FiniteElementBase<2>::ExcWrongFieldDimension (unit_points.size(),
+ dofs_per_cell));
unit_points[0] = Point<2> (.5,.5);
unit_points[1] = Point<2> (1,0);
FullMatrix<double> &local_mass_matrix) const
{
Assert (local_mass_matrix.n() == dofs_per_cell,
- ExcWrongFieldDimension(local_mass_matrix.n(),dofs_per_cell));
+ FiniteElementBase<3>::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<3>::ExcWrongFieldDimension(local_mass_matrix.m(),
+ dofs_per_cell));
throw ExcComputationNotUseful(3);
};
+
template <>
-void FEDG_P3<3>::get_unit_support_points (std::vector<Point<3> > &unit_points) const {
+void FEDG_P3<3>::get_unit_support_points (std::vector<Point<3> > &unit_points) const
+{
Assert (unit_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
+ FiniteElementBase<3>::ExcWrongFieldDimension (unit_points.size(),
+ dofs_per_cell));
unit_points[0] = Point<3> (.5,.5,.5);
unit_points[1] = Point<3> (1,0,0);
template <int dim>
void
FEDG_P3<dim>::get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const
+ typename std::vector<Point<dim> > &support_points) const
{
Assert (support_points.size() == dofs_per_cell,
typename FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),
template <int dim>
void
FEDG_P3<dim>::get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const
+ typename std::vector<Point<dim> > &support_points) const
{
Assert ((support_points.size() == dofs_per_face) &&
(support_points.size() == GeometryInfo<dim>::vertices_per_face),
#include <fe/fe_lib.lagrange.h>
+#include <grid/tria.h>
#include <grid/tria_iterator.h>
#include <dofs/dof_accessor.h>
#include <grid/geometry_info.h>
#include <algorithm>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
+
// declare explicit specializations before use:
template <> void FEQ1<deal_II_dimension>::initialize_matrices ();
void FEQ1<2>::get_local_mass_matrix (const DoFHandler<2>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const {
Assert (local_mass_matrix.n() == dofs_per_cell,
- ExcWrongFieldDimension(local_mass_matrix.n(),dofs_per_cell));
+ FiniteElementBase<2>::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<2>::ExcWrongFieldDimension(local_mass_matrix.m(),
+ dofs_per_cell));
/* Get the computation of the local mass matrix by these lines in maple:
which is sufficient since $det J$ is a bilinear function.
*/
Assert ((-x[0]+x[1])*(-y[0]+y[3])-(-x[0]+x[3])*(-y[0]+y[1]), // xi=eta=0
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
Assert ((x[2]-x[3])*(-y[0]+y[3])-(-x[0]+x[3])*(y[2]-y[3]), // xi=0, eta=1
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
Assert ((x[2]-x[3])*(-y[1]+y[2])-(-x[1]+x[2])*(y[2]-y[3]), // xi=eta=1
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
Assert ((-x[0]+x[1])*(-y[1]+y[2])-(-x[1]+x[2])*(-y[0]+y[1]), // xi=1, eta=0
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
const double t1 = x[1]*y[3],
t2 = x[1]*y[2],
template <>
void FEQ1<2>::get_unit_support_points (std::vector<Point<2> > &unit_points) const {
Assert (unit_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
+ FiniteElementBase<2>::ExcWrongFieldDimension (unit_points.size(),
+ dofs_per_cell));
unit_points[0] = Point<2> (0,0);
unit_points[1] = Point<2> (1,0);
template <>
void FEQ1<3>::get_local_mass_matrix (const DoFHandler<3>::cell_iterator &,
- 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<3>::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<3>::ExcWrongFieldDimension(local_mass_matrix.m(),
+ dofs_per_cell));
throw ExcComputationNotUseful(3);
};
+
template <>
-void FEQ1<3>::get_unit_support_points (std::vector<Point<3> > &unit_points) const {
+void FEQ1<3>::get_unit_support_points (std::vector<Point<3> > &unit_points) const
+{
Assert (unit_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
+ FiniteElementBase<3>::ExcWrongFieldDimension (unit_points.size(),
+ dofs_per_cell));
unit_points[0] = Point<3> (0,0,0);
unit_points[1] = Point<3> (1,0,0);
template <int dim>
void
FEQ1<dim>::get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const {
+ typename std::vector<Point<dim> > &support_points) const {
Assert (support_points.size() == dofs_per_cell,
typename FiniteElementBase<dim>::ExcWrongFieldDimension (support_points.size(),
dofs_per_cell));
template <int dim>
void
FEQ1<dim>::get_face_support_points (const typename DoFHandler<dim>::face_iterator &face,
- std::vector<Point<dim> > &support_points) const {
+ typename std::vector<Point<dim> > &support_points) const {
Assert ((support_points.size() == dofs_per_face) &&
(support_points.size() == GeometryInfo<dim>::vertices_per_face),
typename FiniteElementBase<dim>::
#include <fe/fe_lib.lagrange.h>
+#include <grid/tria.h>
#include <grid/tria_iterator.h>
#include <dofs/dof_accessor.h>
#include <grid/geometry_info.h>
FullMatrix<double> &local_mass_matrix) const
{
Assert (local_mass_matrix.n() == dofs_per_cell,
- ExcWrongFieldDimension(local_mass_matrix.n(),dofs_per_cell));
+ FiniteElementBase<2>::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<2>::ExcWrongFieldDimension(local_mass_matrix.m(),
+ dofs_per_cell));
/* Get the computation of the local mass matrix by these lines in maple. Note
that tphi[i] are the basis function of the linear finite element, which
which is sufficient since $det J$ is a bilinear function.
*/
Assert ((-x[0]+x[1])*(-y[0]+y[3])-(-x[0]+x[3])*(-y[0]+y[1]), // xi=eta=0
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
Assert ((x[2]-x[3])*(-y[0]+y[3])-(-x[0]+x[3])*(y[2]-y[3]), // xi=0, eta=1
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
Assert ((x[2]-x[3])*(-y[1]+y[2])-(-x[1]+x[2])*(y[2]-y[3]), // xi=eta=1
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
Assert ((-x[0]+x[1])*(-y[1]+y[2])-(-x[1]+x[2])*(-y[0]+y[1]), // xi=1, eta=0
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
const double t1 = (x[1]*y[0]);
const double t2 = (x[1]*y[2]);
void FEQ2<2>::get_unit_support_points (std::vector<Point<2> > &unit_points) const
{
Assert (unit_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
+ FiniteElementBase<2>::ExcWrongFieldDimension (unit_points.size(),
+ dofs_per_cell));
unit_points[0] = Point<2> (0,0);
unit_points[1] = Point<2> (1,0);
std::vector<Point<2> > &support_points) const
{
Assert (support_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
+ FiniteElementBase<2>::ExcWrongFieldDimension (support_points.size(),
+ dofs_per_cell));
for (unsigned int vertex=0; vertex<4; ++vertex)
support_points[vertex] = cell->vertex(vertex);
std::vector<Point<2> > &support_points) const
{
Assert (support_points.size() == dofs_per_face,
- ExcWrongFieldDimension (support_points.size(), dofs_per_face));
+ FiniteElementBase<2>::ExcWrongFieldDimension (support_points.size(),
+ dofs_per_face));
for (unsigned int vertex=0; vertex<2; ++vertex)
support_points[vertex] = face->vertex(vertex);
FullMatrix<double> &local_mass_matrix) const
{
Assert (local_mass_matrix.n() == dofs_per_cell,
- ExcWrongFieldDimension(local_mass_matrix.n(),dofs_per_cell));
+ FiniteElementBase<3>::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<3>::ExcWrongFieldDimension(local_mass_matrix.m(),
+ dofs_per_cell));
throw ExcComputationNotUseful(3);
};
void FEQ2<3>::get_unit_support_points (std::vector<Point<3> > &unit_points) const
{
Assert (unit_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
+ FiniteElementBase<3>::ExcWrongFieldDimension (unit_points.size(),
+ dofs_per_cell));
unit_points[0] = Point<3>(0, 0, 0);
unit_points[1] = Point<3>(1, 0, 0);
std::vector<Point<3> > &support_points) const
{
Assert (support_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
+ FiniteElementBase<3>::ExcWrongFieldDimension (support_points.size(),
+ dofs_per_cell));
const Point<3> vertices[8] = { cell->vertex(0),
cell->vertex(1),
std::vector<Point<3> > &support_points) const
{
Assert (support_points.size() == dofs_per_face,
- ExcWrongFieldDimension (support_points.size(), dofs_per_face));
+ FiniteElementBase<3>::ExcWrongFieldDimension (support_points.size(),
+ dofs_per_face));
for (unsigned int vertex=0; vertex<4; ++vertex)
support_points[vertex] = face->vertex(vertex);
#include <fe/fe_lib.lagrange.h>
+#include <grid/tria.h>
#include <grid/tria_iterator.h>
#include <dofs/dof_accessor.h>
#include <grid/geometry_info.h>
void FEQ4<2>::get_local_mass_matrix (const DoFHandler<2>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const {
Assert (local_mass_matrix.n() == dofs_per_cell,
- ExcWrongFieldDimension(local_mass_matrix.n(),dofs_per_cell));
+ FiniteElementBase<2>::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<2>::ExcWrongFieldDimension(local_mass_matrix.m(),
+ dofs_per_cell));
const double x[4] = { cell->vertex(0)(0),
cell->vertex(1)(0),
which is sufficient since $det J$ is a bilinear function.
*/
Assert ((-x[0]+x[1])*(-y[0]+y[3])-(-x[0]+x[3])*(-y[0]+y[1]), // xi=eta=0
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
Assert ((x[2]-x[3])*(-y[0]+y[3])-(-x[0]+x[3])*(y[2]-y[3]), // xi=0, eta=1
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
Assert ((x[2]-x[3])*(-y[1]+y[2])-(-x[1]+x[2])*(y[2]-y[3]), // xi=eta=1
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
Assert ((-x[0]+x[1])*(-y[1]+y[2])-(-x[1]+x[2])*(-y[0]+y[1]), // xi=1, eta=0
- ExcJacobiDeterminantHasWrongSign());
+ FiniteElement<2>::ExcJacobiDeterminantHasWrongSign());
const double t1 = -x[0]+x[1];
const double t2 = y[0]-y[1]+y[2]-y[3];
template <>
void FEQ4<2>::get_unit_support_points (std::vector<Point<2> > &unit_points) const {
Assert (unit_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (unit_points.size(), dofs_per_cell));
+ FiniteElementBase<2>::ExcWrongFieldDimension (unit_points.size(),
+ dofs_per_cell));
unit_points[0] = Point<2>(0,0);
unit_points[1] = Point<2>(1,0);
template <>
void FEQ4<2>::get_support_points (const DoFHandler<2>::cell_iterator &cell,
- std::vector<Point<2> > &support_points) const {
+ std::vector<Point<2> > &support_points) const
+{
Assert (support_points.size() == dofs_per_cell,
- ExcWrongFieldDimension (support_points.size(), dofs_per_cell));
+ FiniteElementBase<2>::ExcWrongFieldDimension (support_points.size(),
+ dofs_per_cell));
const double x[4] = { cell->vertex(0)(0),
cell->vertex(1)(0),
void FEQ4<2>::get_face_support_points (const DoFHandler<2>::face_iterator &face,
std::vector<Point<2> > &support_points) const {
Assert (support_points.size() == dofs_per_face,
- ExcWrongFieldDimension (support_points.size(), dofs_per_face));
+ FiniteElementBase<2>::ExcWrongFieldDimension (support_points.size(),
+ dofs_per_face));
for (unsigned int vertex=0; vertex<2; ++vertex)
support_points[vertex] = face->vertex(vertex);
#include <base/memory_consumption.h>
#include <fe/fe_system.h>
+#include <grid/tria.h>
#include <grid/tria_iterator.h>
#include <dofs/dof_accessor.h>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
template <int dim>
template <int dim>
void FESystem<dim>::get_unit_support_points (
- std::vector<Point<dim> > &unit_support_points) const
+ typename std::vector<Point<dim> > &unit_support_points) const
{
Assert(unit_support_points.size() == dofs_per_cell,
typename FiniteElementBase<dim>::
template <int dim>
-void FESystem<dim>::get_support_points (const DoFHandler<dim>::cell_iterator &cell,
- std::vector<Point<dim> > &support_points) const
+void FESystem<dim>::get_support_points (const typename DoFHandler<dim>::cell_iterator &cell,
+ typename std::vector<Point<dim> > &support_points) const
{
Assert(support_points.size() == dofs_per_cell,
typename FiniteElementBase<dim>::
template <int dim>
-void FESystem<dim>::get_face_support_points (const DoFHandler<dim>::face_iterator & face,
- std::vector<Point<dim> > & support_points) const
+void FESystem<dim>::get_face_support_points (const typename DoFHandler<dim>::face_iterator & face,
+ typename std::vector<Point<dim> > & support_points) const
{
Assert (support_points.size() == dofs_per_face,
typename FiniteElementBase<dim>::
template <int dim>
-void FESystem<dim>::get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
+void FESystem<dim>::get_local_mass_matrix (const typename DoFHandler<dim>::cell_iterator &cell,
FullMatrix<double> &local_mass_matrix) const
{
Assert (local_mass_matrix.n() == dofs_per_cell,
template <int dim>
Point<dim> FESystem<dim>::transform_unit_to_real_cell (
- const DoFHandler<dim>::cell_iterator cell,
+ const typename DoFHandler<dim>::cell_iterator &cell,
const Point<dim> &p) const
{
return base_elements[0].first->transform_unit_to_real_cell(cell, p);
template <int dim>
Point<dim> FESystem<dim>::transform_real_to_unit_cell (
- const DoFHandler<dim>::cell_iterator cell,
+ const typename DoFHandler<dim>::cell_iterator &cell,
const Point<dim> &p) const
{
return base_elements[0].first->transform_real_to_unit_cell(cell, p);
template <int dim>
-void FESystem<dim>::get_face_jacobians (const DoFHandler<dim>::face_iterator &face,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<double> &face_jacobi_determinants) const
+void FESystem<dim>::get_face_jacobians (const typename DoFHandler<dim>::face_iterator &face,
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<double> &face_jacobi_determinants) const
{
base_elements[0].first->get_face_jacobians (face, unit_points,
face_jacobi_determinants);
template <int dim>
-void FESystem<dim>::get_subface_jacobians (const DoFHandler<dim>::face_iterator &face,
+void FESystem<dim>::get_subface_jacobians (const typename DoFHandler<dim>::face_iterator &face,
const unsigned int subface_no,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<double> &face_jacobi_determinants) const
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<double> &face_jacobi_determinants) const
{
base_elements[0].first->get_subface_jacobians (face, subface_no, unit_points,
face_jacobi_determinants);
template <int dim>
-void FESystem<dim>::get_normal_vectors (const DoFHandler<dim>::cell_iterator &cell,
+void FESystem<dim>::get_normal_vectors (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<Point<dim> > &normal_vectors) const
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<Point<dim> > &normal_vectors) const
{
base_elements[0].first->get_normal_vectors (cell, face_no, unit_points,
normal_vectors);
template <int dim>
-void FESystem<dim>::get_normal_vectors (const DoFHandler<dim>::cell_iterator &cell,
+void FESystem<dim>::get_normal_vectors (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
const unsigned int subface_no,
- const std::vector<Point<dim-1> > &unit_points,
- std::vector<Point<dim> > &normal_vectors) const
+ const typename std::vector<Point<dim-1> > &unit_points,
+ typename std::vector<Point<dim> > &normal_vectors) const
{
base_elements[0].first->get_normal_vectors (cell, face_no, subface_no, unit_points,
normal_vectors);
template <int dim>
void
-FESystem<dim>::fill_fe_values (const DoFHandler<dim>::cell_iterator &cell,
- const std::vector<Point<dim> > &unit_points,
- std::vector<Tensor<2,dim> > &jacobians,
+FESystem<dim>::fill_fe_values (const typename DoFHandler<dim>::cell_iterator &cell,
+ const typename std::vector<Point<dim> > &unit_points,
+ typename std::vector<Tensor<2,dim> > &jacobians,
const bool compute_jacobians,
- std::vector<Tensor<3,dim> > &jacobians_grad,
+ typename std::vector<Tensor<3,dim> > &jacobians_grad,
const bool compute_jacobians_grad,
- std::vector<Point<dim> > &support_points,
+ typename std::vector<Point<dim> > &support_points,
const bool compute_support_points,
- std::vector<Point<dim> > &q_points,
+ typename std::vector<Point<dim> > &q_points,
const bool compute_q_points,
const FullMatrix<double> &shape_values_transform,
- const std::vector<std::vector<Tensor<1,dim> > > &shape_grad_transform) const
+ const typename std::vector<typename std::vector<Tensor<1,dim> > > &shape_grad_transform) const
{
// if we are to compute the support
// points, then we need to get them
#include <dofs/dof_handler.h>
#include <dofs/dof_accessor.h>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
template <int dim, typename number>
#include <lac/block_vector.h>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
/*------------------------------- FEValuesBase ---------------------------*/
template <int dim>
template <class InputVector, typename number>
void FEValuesBase<dim>::get_function_values (const InputVector &fe_function,
- std::vector<number> &values) const
+ typename std::vector<number> &values) const
{
Assert (fe->n_components() == 1,
ExcWrongNoOfComponents());
template <int dim>
template <class InputVector, typename number>
void FEValuesBase<dim>::get_function_values (const InputVector &fe_function,
- std::vector<Vector<number> > &values) const
+ typename std::vector<Vector<number> > &values) const
{
Assert (n_quadrature_points == values.size(),
ExcWrongVectorSize(values.size(), n_quadrature_points));
template <int dim>
template <class InputVector>
void FEValuesBase<dim>::get_function_grads (const InputVector &fe_function,
- std::vector<Tensor<1,dim> > &gradients) const
+ typename std::vector<Tensor<1,dim> > &gradients) const
{
Assert (fe->n_components() == 1,
ExcWrongNoOfComponents());
template <int dim>
template <class InputVector>
void FEValuesBase<dim>::get_function_grads (const InputVector &fe_function,
- std::vector<std::vector<Tensor<1,dim> > > &gradients) const
+ typename std::vector<typename std::vector<Tensor<1,dim> > > &gradients) const
{
Assert (n_quadrature_points == gradients.size(),
ExcWrongNoOfComponents());
template <int dim>
template <class InputVector>
void FEValuesBase<dim>::get_function_2nd_derivatives (const InputVector &fe_function,
- std::vector<Tensor<2,dim> > &second_derivatives) const
+ typename std::vector<Tensor<2,dim> > &second_derivatives) const
{
Assert (fe->n_components() == 1,
ExcWrongNoOfComponents());
void
FEValuesBase<dim>::
get_function_2nd_derivatives (const InputVector &fe_function,
- std::vector<std::vector<Tensor<2,dim> > > &second_derivs) const
+ typename std::vector<typename std::vector<Tensor<2,dim> > > &second_derivs) const
{
Assert (n_quadrature_points == second_derivs.size(),
ExcWrongNoOfComponents());
#include <base/quadrature.h>
#include <lac/vector.h>
#include <lac/full_matrix.h>
+#include <grid/tria.h>
#include <grid/tria_iterator.h>
#include <dofs/dof_accessor.h>
#include <cmath>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
+
/*---------------------------- FEQ1Mapping ----------------------------------*/
// more or less copied from the linear
// finite element
Assert (unit_points.size() == face_jacobians.size(),
- ExcWrongFieldDimension (unit_points.size(), face_jacobians.size()));
+ FiniteElementBase<2>::ExcWrongFieldDimension (unit_points.size(),
+ face_jacobians.size()));
// a linear mapping for a single line
// produces particularly simple
// more or less copied from the linear
// finite element
Assert (unit_points.size() == face_jacobians.size(),
- ExcWrongFieldDimension (unit_points.size(), face_jacobians.size()));
+ FiniteElementBase<2>::ExcWrongFieldDimension (unit_points.size(),
+ face_jacobians.size()));
Assert (face->at_boundary() == false,
- ExcBoundaryFaceUsed ());
+ FiniteElement<2>::ExcBoundaryFaceUsed ());
// a linear mapping for a single line
// produces particularly simple
// more or less copied from the linear
// finite element
Assert (unit_points.size() == normal_vectors.size(),
- ExcWrongFieldDimension (unit_points.size(), normal_vectors.size()));
+ FiniteElementBase<2>::ExcWrongFieldDimension (unit_points.size(),
+ normal_vectors.size()));
const DoFHandler<2>::face_iterator face = cell->face(face_no);
// compute direction of line
// subface have the same direction as that
// for the face
Assert (unit_points.size() == normal_vectors.size(),
- ExcWrongFieldDimension (unit_points.size(), normal_vectors.size()));
+ FiniteElementBase<2>::ExcWrongFieldDimension (unit_points.size(),
+ normal_vectors.size()));
Assert (cell->face(face_no)->at_boundary() == false,
- ExcBoundaryFaceUsed ());
+ FiniteElement<2>::ExcBoundaryFaceUsed ());
const DoFHandler<2>::face_iterator face = cell->face(face_no);
// compute direction of line
const std::vector<Point<2> > &unit_points,
std::vector<double> &face_jacobians) const {
Assert (unit_points.size() == face_jacobians.size(),
- ExcWrongFieldDimension (unit_points.size(), face_jacobians.size()));
+ FiniteElementBase<3>::ExcWrongFieldDimension (unit_points.size(),
+ face_jacobians.size()));
// the computation of the face jacobians is
// along the following lines: let x_i be
const std::vector<Point<2> > &unit_points,
std::vector<double> &face_jacobians) const {
Assert (false,
- ExcWrongFieldDimension (unit_points.size(), face_jacobians.size()));
+ FiniteElementBase<3>::ExcWrongFieldDimension (unit_points.size(),
+ face_jacobians.size()));
};
const std::vector<Point<2> > &unit_points,
std::vector<Point<3> > &normal_vectors) const {
Assert (unit_points.size() == normal_vectors.size(),
- ExcWrongFieldDimension (unit_points.size(), normal_vectors.size()));
+ FiniteElementBase<3>::ExcWrongFieldDimension (unit_points.size(),
+ normal_vectors.size()));
// taken from the same script as is
// the computation of the jacobian
// subface have the same direction as that
// for the face
Assert (false,
- ExcWrongFieldDimension (unit_points.size(), normal_vectors.size()));
+ FiniteElementBase<3>::ExcWrongFieldDimension (unit_points.size(),
+ normal_vectors.size()));
};
#endif
template <int dim>
Point<dim> FEQ1Mapping<dim>::transform_unit_to_real_cell (
- const DoFHandler<dim>::cell_iterator cell,
+ const typename DoFHandler<dim>::cell_iterator &cell,
const Point<dim> &p) const
{
Point<dim> p_real;
template <int dim>
Point<dim> FEQ1Mapping<dim>::transform_real_to_unit_cell (
- const DoFHandler<dim>::cell_iterator cell,
+ const typename DoFHandler<dim>::cell_iterator &cell,
const Point<dim> &p) const
{
// Newton iteration to solve
template <int dim>
-void FEQ1Mapping<dim>::fill_fe_values (const DoFHandler<dim>::cell_iterator &cell,
- const std::vector<Point<dim> > &unit_points,
- std::vector<Tensor<2,dim> > &jacobians,
+void FEQ1Mapping<dim>::fill_fe_values (const typename DoFHandler<dim>::cell_iterator &cell,
+ const typename std::vector<Point<dim> > &unit_points,
+ typename std::vector<Tensor<2,dim> > &jacobians,
const bool compute_jacobians,
- std::vector<Tensor<3,dim> > &jacobians_grad,
+ typename std::vector<Tensor<3,dim> > &jacobians_grad,
const bool compute_jacobians_grad,
- std::vector<Point<dim> > &support_points,
+ typename std::vector<Point<dim> > &support_points,
const bool compute_support_points,
- std::vector<Point<dim> > &q_points,
+ typename std::vector<Point<dim> > &q_points,
const bool compute_q_points,
const FullMatrix<double> &shape_values_transform,
- const std::vector<std::vector<Tensor<1,dim> > > &shape_grad_transform) const
+ const typename std::vector<typename std::vector<Tensor<1,dim> > > &shape_grad_transform) const
{
Assert ((!compute_jacobians) || (jacobians.size() == unit_points.size()),
typename FiniteElementBase<dim>::ExcWrongFieldDimension(jacobians.size(),
#include <fe/q1_mapping.h>
+#include <grid/tria.h>
#include <grid/tria_iterator.h>
#include <dofs/dof_accessor.h>
std::vector<Tensor<3,1> > &jacobians_grad)
{
Assert (unit_points.size() == jacobians_grad.size(),
- ExcWrongFieldDimension(jacobians_grad.size(), unit_points.size()));
+ FiniteElementBase<3>::ExcWrongFieldDimension(jacobians_grad.size(),
+ unit_points.size()));
// derivative of the
// jacobian is always zero
std::vector<Tensor<3,2> > &jacobians_grad)
{
Assert (unit_points.size() == jacobians_grad.size(),
- ExcWrongFieldDimension(jacobians_grad.size(), unit_points.size()));
+ FiniteElementBase<2>::ExcWrongFieldDimension(jacobians_grad.size(),
+ unit_points.size()));
const unsigned int dim = 2;
std::vector<Tensor<3,3> > &jacobians_grad)
{
Assert (unit_points.size() == jacobians_grad.size(),
- ExcWrongFieldDimension(jacobians_grad.size(), unit_points.size()));
+ FiniteElementBase<3>::ExcWrongFieldDimension(jacobians_grad.size(),
+ unit_points.size()));
const unsigned int dim = 3;
#include <grid/geometry_info.h>
-// egcs 1.1 does not need these definitions of static member
-// variables, as later compilers should need. on the other hand, if we
-// define them, then egcs1.1 wants initialization, which we would have
-// to mirror from the .h file. rather, we omit it here
-
-#if ! ((__GNUC__==2) && (__GNUC_MINOR__ < 95))
-const unsigned int GeometryInfo<deal_II_dimension>::vertices_per_cell;
-const unsigned int GeometryInfo<deal_II_dimension>::lines_per_cell;
-const unsigned int GeometryInfo<deal_II_dimension>::quads_per_cell;
-const unsigned int GeometryInfo<deal_II_dimension>::hexes_per_cell;
-const unsigned int GeometryInfo<deal_II_dimension>::children_per_cell;
-#endif
+template <> const unsigned int GeometryInfo<deal_II_dimension>::vertices_per_cell;
+template <> const unsigned int GeometryInfo<deal_II_dimension>::lines_per_cell;
+template <> const unsigned int GeometryInfo<deal_II_dimension>::quads_per_cell;
+template <> const unsigned int GeometryInfo<deal_II_dimension>::hexes_per_cell;
+template <> const unsigned int GeometryInfo<deal_II_dimension>::children_per_cell;
template <>
void GridGenerator::hyper_ball<> (Triangulation<2> &tria,
const Point<2> &p,
const double radius) {
- const double a = 1./(1+sqrt(2)); // equilibrate cell sizes at transition
+ const double a = 1./(1+sqrt(2.0)); // equilibrate cell sizes at transition
// from the inner part to the radial
// cells
- const Point<2> vertices[8] = { p+Point<2>(-1,-1)*(radius/sqrt(2)),
- p+Point<2>(+1,-1)*(radius/sqrt(2)),
- p+Point<2>(-1,-1)*(radius/sqrt(2)*a),
- p+Point<2>(+1,-1)*(radius/sqrt(2)*a),
- p+Point<2>(-1,+1)*(radius/sqrt(2)*a),
- p+Point<2>(+1,+1)*(radius/sqrt(2)*a),
- p+Point<2>(-1,+1)*(radius/sqrt(2)),
- p+Point<2>(+1,+1)*(radius/sqrt(2)) };
+ const Point<2> vertices[8] = { p+Point<2>(-1,-1)*(radius/sqrt(2.0)),
+ p+Point<2>(+1,-1)*(radius/sqrt(2.0)),
+ p+Point<2>(-1,-1)*(radius/sqrt(2.0)*a),
+ p+Point<2>(+1,-1)*(radius/sqrt(2.0)*a),
+ p+Point<2>(-1,+1)*(radius/sqrt(2.0)*a),
+ p+Point<2>(+1,+1)*(radius/sqrt(2.0)*a),
+ p+Point<2>(-1,+1)*(radius/sqrt(2.0)),
+ p+Point<2>(+1,+1)*(radius/sqrt(2.0)) };
const int cell_vertices[5][4] = {{0, 1, 3, 2},
{0, 2, 4, 6},
#include <algorithm>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
+
template <int dim>
template <int dim>
void
-GridIn<dim>::delete_unused_vertices (std::vector<Point<dim> > &vertices,
- std::vector<CellData<dim> > &cells,
- SubCellData &subcelldata)
+GridIn<dim>::delete_unused_vertices (typename std::vector<Point<dim> > &vertices,
+ typename std::vector<CellData<dim> > &cells,
+ SubCellData &subcelldata)
{
// first check which vertices are
// actually used
template <int dim>
-void GridIn<dim>::debug_output_grid (const std::vector<CellData<dim> > &/*cells*/,
- const std::vector<Point<dim> > &/*vertices*/,
- std::ostream &/*out*/)
+void GridIn<dim>::debug_output_grid (const typename std::vector<CellData<dim> > &/*cells*/,
+ const typename std::vector<Point<dim> > &/*vertices*/,
+ std::ostream &/*out*/)
{
Assert (false, ExcNotImplemented());
};
#include <numeric>
#include <algorithm>
#include <cmath>
-
-#include <math.h>
+#include <functional>
#include <fstream>
+
+
template<typename number>
void GridRefinement::qsort_index(const Vector<number> &a,
std::vector<unsigned int> &ind,
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
template <int dim, typename number>
#include <grid/grid_reordering.h>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
// static variables
template <>
template <int dim>
void
-GridReordering<dim>::Cell::insert_faces (std::map<Face,FaceData> &/*global_faces*/)
+GridReordering<dim>::Cell::insert_faces (typename std::map<Face,FaceData> &/*global_faces*/)
{
Assert (false, ExcNotImplemented());
};
template <int dim>
inline
-void GridReordering<dim>::track_back (std::vector<Cell> &cells,
- RotationStack &rotation_states,
- unsigned int track_back_to_cell)
+void GridReordering<dim>::track_back (typename std::vector<Cell> &cells,
+ RotationStack &rotation_states,
+ unsigned int track_back_to_cell)
{
top_of_function:
template <int dim>
-bool GridReordering<dim>::try_rotate_single_neighbors (std::vector<Cell> &cells,
- RotationStack &rotation_states)
+bool GridReordering<dim>::try_rotate_single_neighbors (typename std::vector<Cell> &cells,
+ RotationStack &rotation_states)
{
// the rotation state of the cell
// which we try to add by rotating
template <int dim>
-void GridReordering<dim>::find_reordering (std::vector<Cell> &cells,
- std::vector<CellData<dim> > &original_cells,
- const std::vector<unsigned int> &new_cell_numbers)
+void GridReordering<dim>::find_reordering (typename std::vector<Cell> &cells,
+ typename std::vector<CellData<dim> > &original_cells,
+ const std::vector<unsigned int> &new_cell_numbers)
{
// cout << "Starting..." << flush;
template <int dim>
std::vector<unsigned int>
-GridReordering<dim>::presort_cells (std::vector<Cell> &cells,
- std::map<Face,FaceData> &faces)
+GridReordering<dim>::presort_cells (typename std::vector<Cell> &cells,
+ typename std::map<Face,FaceData> &faces)
{
// first find the cell with the
// least neighbors
template <int dim>
-void GridReordering<dim>::reorder_cells (std::vector<CellData<dim> > &original_cells)
+void GridReordering<dim>::reorder_cells (typename std::vector<CellData<dim> > &original_cells)
{
// we need more information than
// provided by the input parameter,
#include <base/memory_consumption.h>
+#include <base/smartpointer.h>
#include <grid/tria.h>
#include <dofs/dof_handler.h>
+#include <fe/fe.h>
#include <grid/tria_accessor.h>
#include <dofs/dof_accessor.h>
#include <multigrid/mg_dof_handler.h>
#include <iostream>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
+
template <int dim>
PersistentTriangulation<dim>::
PersistentTriangulation (const Triangulation<dim> &coarse_grid) :
template <int dim>
void
-PersistentTriangulation<dim>::create_triangulation (const std::vector<Point<dim> > &,
- const std::vector<CellData<dim> > &,
+PersistentTriangulation<dim>::create_triangulation (const typename std::vector<Point<dim> > &,
+ const typename std::vector<CellData<dim> > &,
const SubCellData &)
{
Assert (false, ExcFunctionNotUseful());
#include <grid/tria_boundary.h>
#include <algorithm>
+#include <functional>
#include <numeric>
};
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
template <int dim>
void Triangulation<dim>::save_refine_flags (std::vector<bool> &v) const {
v.resize (n_active_cells(), false);
template <>
unsigned char CellAccessor<2>::material_id () const
{
- Assert (used(), ExcCellNotUsed());
+ Assert (used(), TriaAccessor<2>::ExcCellNotUsed());
return tria->levels[present_level]->quads.material_id[present_index];
};
template <>
void CellAccessor<2>::set_material_id (const unsigned char mat_id) const
{
- Assert (used(), ExcCellNotUsed());
+ Assert (used(), TriaAccessor<2>::ExcCellNotUsed());
tria->levels[present_level]->quads.material_id[present_index]
= mat_id;
};
#include <lac/sparse_matrix.h>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
+
/* ------------------------ MGDoFLineAccessor --------------------------- */
template <int dim>
template <>
void MGDoFHandler<2>::renumber_dofs (const unsigned int level,
const std::vector<unsigned int> &new_numbers) {
- Assert (new_numbers.size() == n_dofs(level), ExcRenumberingIncomplete());
+ Assert (new_numbers.size() == n_dofs(level),
+ DoFHandler<2>::ExcRenumberingIncomplete());
for (std::vector<MGVertexDoFs>::iterator i=mg_vertex_dofs.begin();
i!=mg_vertex_dofs.end(); ++i)
void MGDoFHandler<2>::reserve_space () {
const unsigned int dim = 2;
- Assert (selected_fe != 0, ExcNoFESelected());
- Assert (tria->n_levels() > 0, ExcInvalidTriangulation());
+ Assert (selected_fe != 0, DoFHandler<dim>::ExcNoFESelected());
+ Assert (tria->n_levels() > 0, DoFHandler<2>::ExcInvalidTriangulation());
////////////////////////////
// DESTRUCTION
#include <grid/tria.h>
+#include <dofs/dof_constraints.h>
#include <multigrid/mg_dof_handler.h>
#include <multigrid/mg_dof_accessor.h>
#include <grid/tria_iterator.h>
#include <grid/tria.h>
+#include <dofs/dof_constraints.h>
#include <multigrid/mg_dof_handler.h>
#include <multigrid/mg_dof_accessor.h>
#include <grid/tria_iterator.h>
#include <lac/vector.h>
#include <lac/sparse_matrix.h>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
template <int dim>
Assembler<dim>::AssemblerData::AssemblerData (const DoFHandler<dim> &dof,
#include <algorithm>
#include <cmath>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
template <int dim>
ProblemBase<dim>::ProblemBase () :
#include <strstream>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
+
template <int dof_handler_dim, int patch_dim, int patch_space_dim>
DataOut_DoFData<dof_handler_dim,patch_dim,patch_space_dim>::DataEntry::
DataEntry (const Vector<double> *data,
template <int dof_handler_dim, int patch_dim, int patch_space_dim>
-const std::vector<typename DataOutBase::Patch<patch_dim, patch_space_dim> > &
+const typename std::vector<typename DataOutBase::Patch<patch_dim, patch_space_dim> > &
DataOut_DoFData<dof_handler_dim,patch_dim,patch_space_dim>::get_patches () const
{
return patches;
#include <strstream>
#include <cmath>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
template <int dim>
#include <fe/fe_values.h>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
template <int dim>
unsigned int
template <int dim>
-const std::vector<DataOutBase::Patch<dim+1> > &
+const typename std::vector<typename DataOutBase::Patch<dim+1> > &
DataOutStack<dim>::get_patches () const
{
return patches;
//
// if the d_11=a, d_22=b,
// d_12=d_21=c
- const double radicand = sqr(d[0][0] - d[1][1]) + 4*sqr(d[0][1]);
+ const double radicand = ::sqr(d[0][0] - d[1][1]) + 4*::sqr(d[0][1]);
const double eigenvalues[2]
= { 0.5*(d[0][0] + d[1][1] + sqrt(radicand)),
0.5*(d[0][0] + d[1][1] - sqrt(radicand)) };
#include <base/timer.h>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
static
inline
for (unsigned int component=0; component<n_components; ++component)
if (data.component_mask[component] == true)
for (unsigned int p=0; p<n_q_points; ++p)
- face_integral[n] += sqr(data.phi[n][p][component]) *
+ face_integral[n] += ::sqr(data.phi[n][p][component]) *
data.JxW_values[p];
data.face_integrals[face] = face_integral;
for (unsigned int component=0; component<n_components; ++component)
if (data.component_mask[component] == true)
for (unsigned int p=0; p<n_q_points; ++p)
- face_integral[n] += sqr(data.phi[n][p][component]) *
+ face_integral[n] += ::sqr(data.phi[n][p][component]) *
data.JxW_values[p];
data.face_integrals[neighbor_child->face(neighbor_neighbor)] = face_integral;
template <typename number>
-void Histogram::evaluate (const std::vector<Vector<number> > &values,
- const std::vector<double> &_y_values,
- const unsigned int n_intervals,
- const IntervalSpacing interval_spacing)
+void Histogram::evaluate (const typename std::vector<Vector<number> > &values,
+ const std::vector<double> &_y_values,
+ const unsigned int n_intervals,
+ const IntervalSpacing interval_spacing)
{
Assert (values.size() > 0, ExcEmptyData());
Assert (n_intervals > 0, ExcInvalidIntervals());
// explicit instantiations for float
template
-void Histogram::evaluate (const std::vector<Vector<float> > &values,
- const std::vector<double> &y_values,
- const unsigned int n_intervals,
- const IntervalSpacing interval_spacing);
+void Histogram::evaluate (const std::vector<Vector<float> > &values,
+ const std::vector<double> &y_values,
+ const unsigned int n_intervals,
+ const IntervalSpacing interval_spacing);
template
void Histogram::evaluate (const Vector<float> &values,
const unsigned int n_intervals,
// explicit instantiations for double
template
void Histogram::evaluate (const std::vector<Vector<double> > &values,
- const std::vector<double> &y_values,
- const unsigned int n_intervals,
- const IntervalSpacing interval_spacing);
+ const std::vector<double> &y_values,
+ const unsigned int n_intervals,
+ const IntervalSpacing interval_spacing);
template
void Histogram::evaluate (const Vector<double> &values,
const unsigned int n_intervals,
#include <set>
#include <cmath>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
template <int dim>
void MatrixCreator<dim>::create_mass_matrix (const DoFHandler<dim> &dof,
void MassMatrix<dim>::assemble (FullMatrix<double> &cell_matrix,
Vector<double> &rhs,
const FEValues<dim> &fe_values,
- const DoFHandler<dim>::cell_iterator &) const
+ const typename DoFHandler<dim>::cell_iterator &) const
{
Assert (right_hand_side != 0, ExcNoRHSSelected());
template <int dim>
void MassMatrix<dim>::assemble (Vector<double> &rhs,
const FEValues<dim> &fe_values,
- const DoFHandler<dim>::cell_iterator &) const
+ const typename DoFHandler<dim>::cell_iterator &) const
{
Assert (right_hand_side != 0, ExcNoRHSSelected());
void LaplaceMatrix<dim>::assemble (FullMatrix<double> &cell_matrix,
Vector<double> &rhs,
const FEValues<dim> &fe_values,
- const DoFHandler<dim>::cell_iterator &) const
+ const typename DoFHandler<dim>::cell_iterator &) const
{
Assert (right_hand_side != 0, ExcNoRHSSelected());
template <int dim>
void LaplaceMatrix<dim>::assemble (FullMatrix<double> &cell_matrix,
const FEValues<dim> &fe_values,
- const DoFHandler<dim>::cell_iterator &) const
+ const typename DoFHandler<dim>::cell_iterator &) const
{
const unsigned int dofs_per_cell = fe_values.dofs_per_cell,
n_q_points = fe_values.n_quadrature_points;
template <int dim>
void LaplaceMatrix<dim>::assemble (Vector<double> &rhs,
const FEValues<dim> &fe_values,
- const DoFHandler<dim>::cell_iterator &) const
+ const typename DoFHandler<dim>::cell_iterator &) const
{
Assert (right_hand_side != 0, ExcNoRHSSelected());
#include <lac/vector.h>
#include <numerics/solution_transfer.h>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
template<int dim, typename number>
SolutionTransfer<dim, number>::SolutionTransfer(const DoFHandler<dim> &dof):
template<int dim, typename number>
void
SolutionTransfer<dim, number>::
-prepare_for_coarsening_and_refinement(const std::vector<Vector<number> > &all_in)
+prepare_for_coarsening_and_refinement(const typename std::vector<Vector<number> > &all_in)
{
Assert(prepared_for!=pure_refinement, ExcAlreadyPrepForRef());
Assert(!prepared_for!=coarsening_and_refinement,
template<int dim, typename number>
void SolutionTransfer<dim, number>::
-interpolate (const std::vector<Vector<number> > &all_in,
- std::vector<Vector<number> > &all_out) const
+interpolate (const typename std::vector<Vector<number> > &all_in,
+ typename std::vector<Vector<number> > &all_out) const
{
Assert(prepared_for==coarsening_and_refinement, ExcNotPrepared());
for (unsigned int i=0; i<all_in.size(); ++i)
template <int dim>
static void
-mirror_refinement_flags (const Triangulation<dim>::cell_iterator &new_cell,
- const Triangulation<dim>::cell_iterator &old_cell)
+mirror_refinement_flags (const typename Triangulation<dim>::cell_iterator &new_cell,
+ const typename Triangulation<dim>::cell_iterator &old_cell)
{
// mirror the refinement
// flags from the present time level to
template <int dim>
static bool
-adapt_grids (const Triangulation<dim>::cell_iterator &cell1,
- const Triangulation<dim>::cell_iterator &cell2)
+adapt_grids (const typename Triangulation<dim>::cell_iterator &cell1,
+ const typename Triangulation<dim>::cell_iterator &cell2)
{
if (cell2->has_children() && cell1->has_children())
#include <cmath>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+using namespace std;
+#endif
+
+
static inline double sqr (const double x)
{
return x*x;
template <int dim>
void
VectorTools::project_boundary_values (const DoFHandler<dim> &dof,
- const std::map<unsigned char,const Function<dim>*> &boundary_functions,
+ const typename std::map<unsigned char,const Function<dim>*> &boundary_functions,
const Quadrature<dim-1> &q,
std::map<unsigned int,double> &boundary_values)
{
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
+ "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html>
+ <head>
+ <link href="../screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
+ <link href="../print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
+ <title>The deal.II Readme -- Installation Instructions</title>
+ <meta name="author" content="Wolfgang Bangerth <deal@iwr.uni-heidelberg.de>">
+ <meta name="keywords" content="deal.II">
+ </head>
+
+ <body>
+
+
+ <h1>Installation instructions for IBM AIX using the xlC compiler</h1>
+
+ <p>
+ First note that <acronym>deal.II</acronym> does not yet work with
+ IBM xlC compiler version 5.0, i.e. the compiler from the Visual
+ Age for C++ package. We have tried to make it run and have fixed
+ as many places as possible in order to reduce the number of
+ errors, but have not been able to work around some problems.
+ </p>
+
+ <p>
+ xlC 5.0 has large problems mainly in the following areas:
+ <ul>
+ <li> <p>
+ Templatized member functions of classes. We have not been
+ able to explicitely instantiate them, nor to take the address
+ of such functions. For example, the following program fails:
+ </p>
+
+ <p>
+ <code>
+ <pre>
+ aixterm7:/u/sfb359/q71> cat t.cc
+ class X {
+ template <int dim> void f() {};
+ template <int dim> void g();
+ };
+
+ template <int dim>
+ void X::g () {
+ void (X::*p) () = &X::template f<dim>;
+ };
+
+ // explicit instantiation
+ template void X::g<1> ();
+ aixterm7:/u/sfb359/q71> /usr/vacpp/bin/xlC -c t.cc -o /dev/null
+ "t.cc", line 8.22: 1540-0130 (S) "X::f" is not declared.
+ "t.cc", line 7.6: 1540-0700 (I) The previous message was produced while processing "X::g<1>()".
+ </pre>
+ </code>
+ </p>
+
+ <li> <p>
+ A compiler bug prevented us from compiling this snippet:
+ <code>
+ <pre>
+ aixterm7:/u/sfb359/q71> cat t.cc
+ namespace std {
+ template <class _Ty> class allocator {};
+ template<class _Ty, class _Ax = allocator<_Ty> > class vector{};
+ }
+
+ struct X {};
+ template <int dim> void g (const std::vector<X> &x);
+
+ void f () {
+ std::vector<X> x;
+ g<1> (x);
+ };
+ aixterm7:/u/sfb359/q71> /usr/vacpp/bin/xlC -c t.cc -o /dev/null
+ "t.cc", line 11.9: 1540-0130 (S) "allocator" is not declared.
+ "t.cc", line 11.9: 1540-0700 (I) The previous message was produced while processing "g".
+ </pre>
+ </code>
+ This also happens when the first four lines declaring the
+ namespace <code>std::</code> are replaced by
+ <code>#include <vector></code>.
+ </p>
+
+ <li> <p>
+ There's another nasty bug that does not allow such code:
+ <code>
+ <pre>
+ aixterm7:/u/sfb359/q71> cat t.cc
+ #include <vector>
+ class X{};
+
+ void f() {
+ std::vector<X> v;
+ std::vector<X>::iterator i1=v.begin();
+ std::vector<X>::const_iterator i2=v.begin();
+ bool x = (i1 != i2);
+ };
+ aixterm7:/u/sfb359/q71> /usr/vacpp/bin/xlC -c t.cc -o /dev/null
+ "t.cc", line 8.16: 1540-0218 (S) The call does not match any parameter list for "operator!=".
+ "/usr/vacpp/include/xutility", line 247.14: 1540-1283 (I) "std::_Ptrit<X,int,X *,X &,X *,X &>::operator!=(const _Myt &) const" is not a viable candidate.
+ "t.cc", line 8.19: 1540-0256 (I) A parameter of type "const std::_Ptrit<X,int,X *,X &,X *,X &> &" cannot be initialized with an expression of type "std::vector<X,std::allocator<X> >::const_iterator".
+ "/usr/vacpp/include/utility", line 59.14: 1540-1283 (I) "template <class _T1, class _T2> std::operator!=(const pair<_T1,_T2> &, const pair<_T1,_T2> &)" is not a viable candidate.
+ "/usr/vacpp/include/xutility", line 362.14: 1540-1283 (I) "template <class _RI> std::operator!=(const reverse_iterator<_RI> &, const reverse_iterator<_RI> &)" is not a viable candidate.
+ "/usr/vacpp/include/xutility", line 477.14: 1540-1283 (I) "template <class _E, class _Tr> std::operator!=(const istreambuf_iterator<_E,_Tr> &, const istreambuf_iterator<_E,_Tr> &)" is not a viable candidate.
+ "/usr/vacpp/include/iterator", line 167.14: 1540-1283 (I) "template <class _Ty, class _E, class _Tr, class _Dist> std::operator!=(const istream_iterator<_Ty,_E,_Tr,_Dist> &, const istream_iterator<_Ty,_E,_Tr,_Dist> &)" is not a viable candidate.
+ "/usr/vacpp/include/xmemory", line 127.14: 1540-1283 (I) "template <class _Ty, class _U> std::operator!=(const allocator<_Ty> &, const allocator<_U> &)" is not a viable candidate.
+ "/usr/vacpp/include/vector", line 293.14: 1540-1283 (I) "template <class _Ty, class _A> std::operator!=(const vector<_Ty,_A> &, const vector<_Ty,_A> &)" is not a viable candidate.
+ </pre>
+ </code>
+ </p>
+
+ <li> <p>
+ Finally, there was a bug (sorry, I can't reproduce it
+ presently in a small code snippet) which yielded this funny
+ error message:
+ <pre>
+ <code>
+ "source/dofs/dof_accessor.cc", line 720.80: 1540-0216 (S) An
+ expression of type "const Vector<double>" cannot be converted to
+ "const Vector<double>".
+ </pre>
+ </code>
+ </p>
+ </ul>
+ </p>
+
+ <p>
+ At this point, I gave up. In summary, there may have only be half
+ a dozen bugs in the compiler that were triggered several hundred
+ times, but as long as these are not fixed in the compiler itself,
+ I see no way to use xlC for deal.II. Nevertheless, as gcc also
+ runs on this platform, there is an alternative which you can fall
+ back on.
+ </p>
+
+ </body>
+</html>
to Linux on DEC Alpha) and using DEC's cxx compiler version
6.0;
+ <li> <a href="platforms/ibm_aix_xlc.html" target="body">IBM AIX
+ with IBM'x xlC 5.0 compiler</a>.
+
<li> <a href="platforms/windows.html" target="body">Microsoft
Windows 95/98/2000/NT</a>.
</ul>
/**
* Array of sub-matrices.
*/
- std::vector<std::vector<SmartPointer<SparseMatrix<number> > > > sub_objects;
+ typename std::vector<std::vector<SmartPointer<SparseMatrix<number> > > > sub_objects;
};
};
-
template <typename number>
unsigned int
BlockSparseMatrix<number>::memory_consumption () const
/**
* Pointer to the array of components.
*/
- std::vector<Vector<Number> > components;
+ typename std::vector<Vector<Number> > components;
/**
* Object managing the
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+ using namespace std;
+#endif
+
template <typename Number>
BlockVector<Number>::BlockVector (const std::vector<unsigned int> &n)
{
* memory in comparison with
* @p{inverse_type=double}.
*/
- std::vector<FullMatrix<inverse_type> > var_inverse;
+ typename std::vector<FullMatrix<inverse_type> > var_inverse;
/**
* Storage of the original diagonal blocks.
*
* Used by the blocked SSOR method.
*/
- std::vector<FullMatrix<inverse_type> > var_diagonal;
+ typename std::vector<FullMatrix<inverse_type> > var_diagonal;
/**
* Flag for diagonal compression.
*
* @author Wolfgang Bangerth, Guido Kanschat, Ralf Hartmann, 1997, 1998, 1999
*/
-template <class Vector = Vector<double> >
+template <class Vector = ::Vector<double> >
class Solver
{
public:
#include <map>
+// if necessary try to work around a bug in the IBM xlC compiler
+#ifdef XLC_WORK_AROUND_STD_BUG
+ using namespace std;
+#endif
+
+
template<typename number>
SparseVanka<number>::SparseVanka(const SparseMatrix<number> &M,
const std::vector<bool> &selected,
template <typename Number>
inline
-Vector<Number>::iterator Vector<Number>::begin () {
+typename Vector<Number>::iterator
+Vector<Number>::begin ()
+{
return &val[0];
};
template <typename Number>
inline
-Vector<Number>::const_iterator Vector<Number>::begin () const {
+typename Vector<Number>::const_iterator
+Vector<Number>::begin () const
+{
return &val[0];
};
template <typename Number>
inline
-Vector<Number>::iterator Vector<Number>::end () {
+typename Vector<Number>::iterator
+Vector<Number>::end ()
+{
return &val[dim];
};
template <typename Number>
inline
-Vector<Number>::const_iterator Vector<Number>::end () const {
+typename Vector<Number>::const_iterator
+Vector<Number>::end () const
+{
return &val[dim];
};
eptr = ptr + (dim/4)*4;
while (ptr!=eptr)
{
- sum0 += sqr(*ptr++);
- sum1 += sqr(*ptr++);
- sum2 += sqr(*ptr++);
- sum3 += sqr(*ptr++);
+ sum0 += ::sqr(*ptr++);
+ sum1 += ::sqr(*ptr++);
+ sum2 += ::sqr(*ptr++);
+ sum3 += ::sqr(*ptr++);
};
// add up remaining elements
while (ptr != end())
- sum0 += sqr(*ptr++);
+ sum0 += ::sqr(*ptr++);
return sum0+sum1+sum2+sum3;
};
#include <base/subscriptor.h>
#include <base/logstream.h>
+#include <lac/vector.h>
#include <vector>
* sophisticated management of vectors. One of these has to be
* applied by the user according to his needs.
*/
-template<class Vector = Vector<double> >
+template<class Vector = ::Vector<double> >
class VectorMemory : public Subscriptor
{
public:
* vectors as needed from the global heap, i.e. performs no
* specially adapted actions to the purpose of this class.
*/
-template<class Vector = Vector<double> >
+template<class Vector = ::Vector<double> >
class PrimitiveVectorMemory : public VectorMemory<Vector>
{
public:
*
* @author Guido Kanschat, 1999
*/
-template<class Vector = Vector<double> >
+template<class Vector = ::Vector<double> >
class GrowingVectorMemory : public VectorMemory<Vector>
{
public:
* vector is used, second the
* vector itself.
*/
- typedef std::pair<bool, Vector* > entry_type;
+ typedef typename std::pair<bool, Vector* > entry_type;
/**
* Array of allocated vectors.
*/
- std::vector<entry_type> pool;
+ typename std::vector<entry_type> pool;
/**
* Overall number of allocations.
/* --------------------- inline functions ---------------------- */
-template<typename Vector>
+template <typename Vector>
GrowingVectorMemory<Vector>::GrowingVectorMemory(const unsigned int initial_size)
: pool(initial_size)
{
double* s = new double[dim_range];
double* matrix = new double[dim_range*dim_range];
- copy (&M.val[0], &M.val[dim_image*dim_range], matrix);
+ std::copy (&M.val[0], &M.val[dim_image*dim_range], matrix);
int erg = dgelss_ (&dim_range, &dim_range, &dim_range,
// double condition = s[0]/s[dim_range-1];
if (info!=0)
- deallog << "inverting error " << info << ' ' << erg << std::endl;
+ deallog << "inverting error " << info << ' ' << erg << endl;
if (rank<(int)dim_range)
- deallog << "rank deficiency " << rank << std::endl;
+ deallog << "rank deficiency " << rank << endl;
delete[] work;
delete[] s;
delete[] matrix;
#include <algorithm>
#include <cmath>
#include <numeric>
-
+#include <functional>
const unsigned int SparsityPattern::invalid_entry;