<h3>Specific improvements</h3>
<ol>
+ <li> New: The function GridOut::write, can now be used also in
+ the codimension one case.
+ <br>
+ (Luca Heltai, 2014/07/18)
+ </li>
+
+ <li> New: The Function classes, now take an additional optional
+ template argument, specifying the type of number to use, which defaults
+ to double.
+ <br>
+ (Luca Heltai, 2014/07/18)
+ </li>
+
+
<li> New: The GridReordering::reorder_cells() function used a
numbering format for the vertices in a cell that was last used in
deal.II version 5.2. This format is still used internally, but
template <typename number> class Vector;
-template <int rank, int dim> class TensorFunction;
+template <int rank, int dim, typename Number> class TensorFunction;
/**
* This class is a model for a general function that, given a point at which
* methods:
* @code
* // access to one component at one point
- * double value (const Point<dim> &p,
+ * double value (const Point<dim, Number> &p,
* const unsigned int component = 0) const;
*
* // return all components at one point
- * void vector_value (const Point<dim> &p,
+ * void vector_value (const Point<dim, Number> &p,
* Vector<double> &value) const;
* @endcode
*
* components at a list of points at once:
* @code
* // access to one component at several points
- * void value_list (const std::vector<Point<dim> > &point_list,
+ * void value_list (const std::vector<Point<dim, Number> > &point_list,
* std::vector<double> &value_list,
* const unsigned int component = 0) const;
*
* // return all components at several points
- * void vector_value_list (const std::vector<Point<dim> > &point_list,
+ * void vector_value_list (const std::vector<Point<dim, Number> > &point_list,
* std::vector<Vector<double> > &value_list) const;
* @endcode
*
* class to convert the former to the latter.
*
* @ingroup functions
- * @author Wolfgang Bangerth, 1998, 1999
+ * @author Wolfgang Bangerth, 1998, 1999, Luca Heltai 2014
*/
-template <int dim>
-class Function : public FunctionTime,
- public Subscriptor
+template <int dim, typename Number=double>
+class Function : public FunctionTime<Number>,
+ public Subscriptor
{
public:
/**
* variable, which defaults to zero.
*/
Function (const unsigned int n_components = 1,
- const double initial_time = 0.0);
+ const Number initial_time = 0.0);
/**
* Virtual destructor; absolutely necessary in this case.
* component you want to have evaluated; it defaults to zero, i.e. the
* first component.
*/
- virtual double value (const Point<dim> &p,
+ virtual Number value (const Point<dim, Number> &p,
const unsigned int component = 0) const;
/**
*
* The default implementation will call value() for each component.
*/
- virtual void vector_value (const Point<dim> &p,
- Vector<double> &values) const;
+ virtual void vector_value (const Point<dim, Number> &p,
+ Vector<Number> &values) const;
/**
* Set <tt>values</tt> to the point values of the specified component of
* By default, this function repeatedly calls value() for each point
* separately, to fill the output array.
*/
- virtual void value_list (const std::vector<Point<dim> > &points,
- std::vector<double> &values,
+ virtual void value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Number> &values,
const unsigned int component = 0) const;
/**
* By default, this function repeatedly calls vector_value() for each
* point separately, to fill the output array.
*/
- virtual void vector_value_list (const std::vector<Point<dim> > &points,
- std::vector<Vector<double> > &values) const;
+ virtual void vector_value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Vector<Number> > &values) const;
/**
* For each component of the function, fill a vector of values, one for
* value_list() for each component. In order to improve performance, this
* can be reimplemented in derived classes to speed up performance.
*/
- virtual void vector_values (const std::vector<Point<dim> > &points,
- std::vector<std::vector<double> > &values) const;
+ virtual void vector_values (const std::vector<Point<dim, Number> > &points,
+ std::vector<std::vector<Number> > &values) const;
/**
* Return the gradient of the specified component of the function at the
* given point.
*/
- virtual Tensor<1,dim> gradient (const Point<dim> &p,
+ virtual Tensor<1,dim, Number> gradient (const Point<dim, Number> &p,
const unsigned int component = 0) const;
/**
* Return the gradient of all components of the function at the given
* point.
*/
- virtual void vector_gradient (const Point<dim> &p,
- std::vector<Tensor<1,dim> > &gradients) const;
+ virtual void vector_gradient (const Point<dim, Number> &p,
+ std::vector<Tensor<1,dim, Number> > &gradients) const;
/**
* Set <tt>gradients</tt> to the gradients of the specified component of
* <tt>gradients</tt> already has the right size, i.e. the same size as
* the <tt>points</tt> array.
*/
- virtual void gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+ virtual void gradient_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Tensor<1,dim, Number> > &gradients,
const unsigned int component = 0) const;
/**
* value_list() for each component. In order to improve performance, this
* can be reimplemented in derived classes to speed up performance.
*/
- virtual void vector_gradients (const std::vector<Point<dim> > &points,
- std::vector<std::vector<Tensor<1,dim> > > &gradients) const;
+ virtual void vector_gradients (const std::vector<Point<dim, Number> > &points,
+ std::vector<std::vector<Tensor<1,dim, Number> > > &gradients) const;
/**
* Set <tt>gradients</tt> to the gradients of the function at the
* The outer loop over <tt>gradients</tt> is over the points in the list,
* the inner loop 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 std::vector<Point<dim, Number> > &points,
+ std::vector<std::vector<Tensor<1,dim, Number> > > &gradients) const;
/**
* Compute the Laplacian of a given component at point <tt>p</tt>.
*/
- virtual double laplacian (const Point<dim> &p,
+ virtual Number laplacian (const Point<dim, Number> &p,
const unsigned int component = 0) const;
/**
* Compute the Laplacian of all components at point <tt>p</tt> and store
* them in <tt>values</tt>.
*/
- virtual void vector_laplacian (const Point<dim> &p,
- Vector<double> &values) const;
+ virtual void vector_laplacian (const Point<dim, Number> &p,
+ Vector<Number> &values) const;
/**
* Compute the Laplacian of one component at a set of points.
*/
- virtual void laplacian_list (const std::vector<Point<dim> > &points,
- std::vector<double> &values,
+ virtual void laplacian_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Number> &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,
- std::vector<Vector<double> > &values) const;
+ virtual void vector_laplacian_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Vector<Number> > &values) const;
/**
* Determine an estimate for the memory consumption (in bytes) of this
* @ingroup functions
* @author Wolfgang Bangerth, 1998, 1999
*/
-template <int dim>
-class ZeroFunction : public Function<dim>
+template <int dim, typename Number=double>
+class ZeroFunction : public Function<dim, Number>
{
public:
/**
*/
virtual ~ZeroFunction ();
- virtual double value (const Point<dim> &p,
+ virtual Number value (const Point<dim, Number> &p,
const unsigned int component) const;
- virtual void vector_value (const Point<dim> &p,
- Vector<double> &return_value) const;
+ virtual void vector_value (const Point<dim, Number> &p,
+ Vector<Number> &return_value) const;
- virtual void value_list (const std::vector<Point<dim> > &points,
- std::vector<double> &values,
+ virtual void value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Number> &values,
const unsigned int component = 0) const;
- virtual void vector_value_list (const std::vector<Point<dim> > &points,
- std::vector<Vector<double> > &values) const;
+ virtual void vector_value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Vector<Number> > &values) const;
- virtual Tensor<1,dim> gradient (const Point<dim> &p,
+ virtual Tensor<1,dim, Number> gradient (const Point<dim, Number> &p,
const unsigned int component = 0) const;
- virtual void vector_gradient (const Point<dim> &p,
- std::vector<Tensor<1,dim> > &gradients) const;
+ virtual void vector_gradient (const Point<dim, Number> &p,
+ std::vector<Tensor<1,dim, Number> > &gradients) const;
- virtual void gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+ virtual void gradient_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Tensor<1,dim, Number> > &gradients,
const unsigned int component = 0) const;
- 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 std::vector<Point<dim, Number> > &points,
+ std::vector<std::vector<Tensor<1,dim, Number> > > &gradients) const;
};
* @ingroup functions
* @author Wolfgang Bangerth, 1998, 1999
*/
-template <int dim>
-class ConstantFunction : public ZeroFunction<dim>
+template <int dim, typename Number=double>
+class ConstantFunction : public ZeroFunction<dim, Number>
{
public:
/**
* Constructor; takes the constant function value as an argument. The
* number of components is preset to one.
*/
- ConstantFunction (const double value,
+ ConstantFunction (const Number value,
const unsigned int n_components = 1);
/**
*/
virtual ~ConstantFunction ();
- virtual double value (const Point<dim> &p,
+ virtual Number value (const Point<dim, Number> &p,
const unsigned int component) const;
- virtual void vector_value (const Point<dim> &p,
- Vector<double> &return_value) const;
+ virtual void vector_value (const Point<dim, Number> &p,
+ Vector<Number> &return_value) const;
- virtual void value_list (const std::vector<Point<dim> > &points,
- std::vector<double> &values,
+ virtual void value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Number> &values,
const unsigned int component = 0) const;
- virtual void vector_value_list (const std::vector<Point<dim> > &points,
- std::vector<Vector<double> > &values) const;
+ virtual void vector_value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Vector<Number> > &values) const;
std::size_t memory_consumption () const;
/**
* Store the constant function value.
*/
- const double function_value;
+ const Number function_value;
};
* @ingroup functions
* @author Guido Kanschat, 2000, Wolfgang Bangerth 2006
*/
-template <int dim>
-class ComponentSelectFunction : public ConstantFunction<dim>
+template <int dim, typename Number=double>
+class ComponentSelectFunction : public ConstantFunction<dim, Number>
{
public:
/**
* total number of vector components.
*/
ComponentSelectFunction (const unsigned int selected,
- const double value,
+ const Number value,
const unsigned int n_components);
/**
* Return the value of the function at the given point for all
* components.
*/
- virtual void vector_value (const Point<dim> &p,
- Vector<double> &return_value) const;
+ virtual void vector_value (const Point<dim, Number> &p,
+ Vector<Number> &return_value) const;
/**
* Set <tt>values</tt> to the point values of the function at the
* <tt>values</tt> already has the right size, i.e. the same size as the
* <tt>points</tt> array.
*/
- virtual void vector_value_list (const std::vector<Point<dim> > &points,
- std::vector<Vector<double> > &values) const;
+ virtual void vector_value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Vector<Number> > &values) const;
/**
* Determine an estimate for the memory consumption (in bytes) of this
/**
* This class provides a way to convert a scalar function of the kind
* @code
- * double foo (const Point<dim> &);
+ * Number foo (const Point<dim, Number> &);
* @endcode
* into an object of type Function@<dim@>. Since the argument returns a
* scalar, the result is clearly a Function object for which
* argument. For example, if you need a Function object that returns the
* norm of a point, you could write it like so:
* @code
- * template <int dim>
- * class Norm : public Function<dim> {
+ * template <int dim, typename Number>
+ * class Norm : public Function<dim, Number> {
* public:
- * virtual double value (const Point<dim> &p,
+ * virtual Number value (const Point<dim, Number> &p,
* const unsigned int component) const {
* Assert (component == 0, ExcMessage ("This object is scalar!"));
* return p.norm();
* and then pass the <code>my_norm_object</code> around, or you could write
* it like so:
* @code
- * ScalarFunctionFromFunctionObject<dim> my_norm_object (&Point<dim>::norm);
+ * ScalarFunctionFromFunctionObject<dim, Number> my_norm_object (&Point<dim, Number>::norm);
* @endcode
*
* Similarly, to generate an object that computes the distance to a point
* <code>q</code>, we could do this:
* @code
- * template <int dim>
- * class DistanceTo : public Function<dim> {
+ * template <int dim, typename Number>
+ * class DistanceTo : public Function<dim, Number> {
* public:
- * DistanceTo (const Point<dim> &q) : q(q) {}
- * virtual double value (const Point<dim> &p,
+ * DistanceTo (const Point<dim, Number> &q) : q(q) {}
+ * virtual Number value (const Point<dim, Number> &p,
* const unsigned int component) const {
* Assert (component == 0, ExcMessage ("This object is scalar!"));
* return q.distance(p);
* }
* private:
- * const Point<dim> q;
+ * const Point<dim, Number> q;
* };
*
* Point<2> q (2,3);
* @endcode
* or we could write it like so:
* @code
- * ScalarFunctionFromFunctionObject<dim>
- * my_distance_object (std_cxx1x::bind (&Point<dim>::distance,
+ * ScalarFunctionFromFunctionObject<dim, Number>
+ * my_distance_object (std_cxx1x::bind (&Point<dim, Number>::distance,
* q,
* std_cxx1x::_1));
* @endcode
*
* @author Wolfgang Bangerth, 2011
*/
-template <int dim>
-class ScalarFunctionFromFunctionObject : public Function<dim>
+template <int dim, typename Number=double>
+class ScalarFunctionFromFunctionObject : public Function<dim, Number>
{
public:
/**
- * Given a function object that takes a Point and returns a double value,
- * convert this into an object that matches the Function<dim> interface.
+ * Given a function object that takes a Point and returns a Number value,
+ * convert this into an object that matches the Function<dim, Number> interface.
*/
- ScalarFunctionFromFunctionObject (const std_cxx1x::function<double (const Point<dim> &)> &function_object);
+ ScalarFunctionFromFunctionObject (const std_cxx1x::function<Number (const Point<dim, Number> &)> &function_object);
/**
* Return the value of the function at the given point. Returns the value
* the function given to the constructor produces for this point.
*/
- virtual double value (const Point<dim> &p,
+ virtual Number value (const Point<dim, Number> &p,
const unsigned int component = 0) const;
private:
* The function object which we call when this class's value() or
* value_list() functions are called.
**/
- const std_cxx1x::function<double (const Point<dim> &)> function_object;
+ const std_cxx1x::function<Number (const Point<dim, Number> &)> function_object;
};
*
* To be more concrete, let us consider the following example:
* @code
- * double one (const Point<2> &p) { return 1; }
+ * Number one (const Point<2> &p) { return 1; }
* VectorFunctionFromScalarFunctionObject<2>
* component_mask (&one, 1, 3);
* @endcode
*
* @author Wolfgang Bangerth, 2011
*/
-template <int dim>
-class VectorFunctionFromScalarFunctionObject : public Function<dim>
+template <int dim, typename Number=double>
+class VectorFunctionFromScalarFunctionObject : public Function<dim, Number>
{
public:
/**
- * Given a function object that takes a Point and returns a double
+ * Given a function object that takes a Point and returns a Number
* value, convert this into an object that matches the Function@<dim@>
* interface.
*
* @param selected_component The single component that should be
* filled by the first argument.
**/
- VectorFunctionFromScalarFunctionObject (const std_cxx1x::function<double (const Point<dim> &)> &function_object,
+ VectorFunctionFromScalarFunctionObject (const std_cxx1x::function<Number (const Point<dim, Number> &)> &function_object,
const unsigned int selected_component,
const unsigned int n_components);
* Return the value of the function at the given point. Returns the value
* the function given to the constructor produces for this point.
*/
- virtual double value (const Point<dim> &p,
+ virtual Number value (const Point<dim, Number> &p,
const unsigned int component = 0) const;
/**
* <tt>values</tt> shall have the right size beforehand, i.e.
* #n_components.
*/
- virtual void vector_value (const Point<dim> &p,
- Vector<double> &values) const;
+ virtual void vector_value (const Point<dim, Number> &p,
+ Vector<Number> &values) const;
private:
/**
* The function object which we call when this class's value() or
* value_list() functions are called.
**/
- const std_cxx1x::function<double (const Point<dim> &)> function_object;
+ const std_cxx1x::function<Number (const Point<dim, Number> &)> function_object;
/**
* The vector component whose value is to be filled by the given scalar
/**
- * This class is built as a means of translating the <code>Tensor<1,dim>
+ * This class is built as a means of translating the <code>Tensor<1,dim, Number>
* </code> values produced by objects of type TensorFunction and returning
* them as a multiple component version of the same thing as a Vector for
* use in, for example, the VectorTools::interpolate or the many other
*
* For example: Say you created a class called
* @code
- * class RightHandSide : public TensorFunction<rank,dim>
+ * class RightHandSide : public TensorFunction<rank,dim, Number>
* @endcode
* which extends the TensorFunction class and you have an object
* @code
- * RightHandSide<1,dim> rhs;
+ * RightHandSide<1,dim, Number> rhs;
* @endcode
* of that class which you want to interpolate onto your mesh using the
* VectorTools::interpolate function, but the finite element you use for
* that has 3*dim vector components. Creating such an object from the
* existing <code>rhs</code> object is done using this piece of code:
* @code
- * RighHandSide<1,dim> rhs;
- * VectorFunctionFromTensorFunction<dim> rhs_vector_function (rhs, 0, 3*dim);
+ * RighHandSide<1,dim, Number> rhs;
+ * VectorFunctionFromTensorFunction<dim, Number> rhs_vector_function (rhs, 0, 3*dim);
* @endcode
* where the <code>dim</code> components of the tensor function are placed into
* the first <code>dim</code> components of the function object.
*
* @author Spencer Patty, 2013
*/
-template <int dim>
-class VectorFunctionFromTensorFunction : public Function<dim>
+template <int dim, typename Number=double>
+class VectorFunctionFromTensorFunction : public Function<dim, Number>
{
public:
/**
* Given a TensorFunction object that takes a <tt>Point</tt> and returns
- * a <tt>Tensor<1,dim></tt> value, convert this into an object that
+ * a <tt>Tensor<1,dim, Number></tt> value, convert this into an object that
* matches the Function@<dim@> interface.
*
* By default, create a Vector object of the same size as
* tensor_function fits inside the <tt>n_component</tt> length return
* vector.
*/
- VectorFunctionFromTensorFunction (const TensorFunction<1,dim> &tensor_function,
+ VectorFunctionFromTensorFunction (const TensorFunction<1,dim, Number> &tensor_function,
const unsigned int selected_component=0,
const unsigned int n_components=dim);
* Return a single component of a vector-valued function at a given
* point.
*/
- virtual double value (const Point<dim> &p,
+ virtual Number value (const Point<dim, Number> &p,
const unsigned int component = 0) const;
/**
* <tt>values</tt> shall have the right size beforehand, i.e.
* #n_components.
*/
- virtual void vector_value (const Point<dim> &p,
- Vector<double> &values) const;
+ virtual void vector_value (const Point<dim, Number> &p,
+ Vector<Number> &values) const;
/**
* Return all components of a vector-valued function at a list of points.
* element of the vector will be passed to vector_value() to evaluate the
* function
*/
- virtual void vector_value_list (const std::vector<Point<dim> > &points,
- std::vector<Vector<double> > &value_list) const;
+ virtual void vector_value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Vector<Number> > &value_list) const;
private:
/**
* The TensorFunction object which we call when this class's
* vector_value() or vector_value_list() functions are called.
**/
- const TensorFunction<1,dim> &tensor_function;
+ const TensorFunction<1,dim,Number> &tensor_function;
/**
* The first vector component whose value is to be filled by the given
* TensorFunction. The values will be placed in components
* selected_component to selected_component+dim-1 for a
- * <tt>TensorFunction<1,dim></tt> object.
+ * <tt>TensorFunction<1,dim, Number></tt> object.
*/
const unsigned int selected_component;
};
* @ingroup functions
* @author Wolfgang Bangerth, Guido Kanschat, 1998, 1999
*/
+template <typename Number=double>
class FunctionTime
{
public:
* for the time variable, which defaults
* to zero.
*/
- FunctionTime (const double initial_time = 0.0);
+ FunctionTime (const Number initial_time = Number(0.0));
/**
* Virtual destructor.
/**
* Return the value of the time variable/
*/
- double get_time () const;
+ Number get_time () const;
/**
* Set the time to <tt>new_time</tt>, overwriting
* the old value.
*/
- virtual void set_time (const double new_time);
+ virtual void set_time (const Number new_time);
/**
* Advance the time by the given
* time step <tt>delta_t</tt>.
*/
- virtual void advance_time (const double delta_t);
+ virtual void advance_time (const Number delta_t);
private:
/**
* Store the present time.
*/
- double time;
+ Number time;
};
#ifndef DOXYGEN
-inline double
-FunctionTime::get_time () const
+template<typename Number>
+inline Number
+FunctionTime<Number>::get_time () const
{
return time;
}
* @ingroup functions
* @author Guido Kanschat, 1999
*/
-template <int rank, int dim>
-class TensorFunction : public FunctionTime,
+template <int rank, int dim, typename Number=double>
+class TensorFunction : public FunctionTime<Number>,
public Subscriptor
{
public:
/**
* Define typedefs for the return types of the <tt>value</tt> functions.
*/
- typedef Tensor<rank,dim> value_type;
+ typedef Tensor<rank,dim,Number> value_type;
- typedef Tensor<rank+1,dim> gradient_type;
+ typedef Tensor<rank+1,dim,Number> gradient_type;
/**
* Constructor. May take an initial value for the time variable, which
* defaults to zero.
*/
- TensorFunction (const double initial_time = 0.0);
+ TensorFunction (const Number initial_time = Number(0.0));
/**
* Virtual destructor; absolutely necessary in this case, as classes are
/**
* Return the value of the function at the given point.
*/
- virtual value_type value (const Point<dim> &p) const;
+ virtual value_type value (const Point<dim, Number> &p) const;
/**
* Set <tt>values</tt> to the point values of the function at the
* <tt>points</tt>. It is assumed that <tt>values</tt> already has the
* right size, i.e. the same size as the <tt>points</tt> array.
*/
- virtual void value_list (const std::vector<Point<dim> > &points,
+ virtual void value_list (const std::vector<Point<dim, Number> > &points,
std::vector<value_type> &values) const;
/**
* Return the gradient of the function at the given point.
*/
- virtual gradient_type gradient (const Point<dim> &p) const;
+ virtual gradient_type gradient (const Point<dim, Number> &p) const;
/**
* Set <tt>gradients</tt> to the gradients of the function at the
* <tt>points</tt>. It is assumed that <tt>values</tt> already has the
* right size, i.e. the same size as the <tt>points</tt> array.
*/
- virtual void gradient_list (const std::vector<Point<dim> > &points,
+ virtual void gradient_list (const std::vector<Point<dim, Number> > &points,
std::vector<gradient_type> &gradients) const;
/**
* @ingroup functions
* @author Matthias Maier, 2013
*/
-template <int rank, int dim>
-class ConstantTensorFunction : public TensorFunction<rank, dim>
+template <int rank, int dim, typename Number=double>
+class ConstantTensorFunction : public TensorFunction<rank, dim, Number>
{
public:
/**
* An initial value for the time variable may be specified, otherwise it
* defaults to zero.
*/
- ConstantTensorFunction (const dealii::Tensor<rank, dim> &value,
- const double initial_time = 0.0);
+ ConstantTensorFunction (const dealii::Tensor<rank, dim, Number> &value,
+ const Number initial_time = 0.0);
virtual ~ConstantTensorFunction ();
- virtual typename dealii::TensorFunction<rank, dim>::value_type value (const Point<dim> &p) const;
+ virtual typename dealii::TensorFunction<rank, dim, Number>::value_type value (const Point<dim, Number> &p) const;
- virtual void value_list (const std::vector<Point<dim> > &points,
- std::vector<typename dealii::TensorFunction<rank, dim>::value_type> &values) const;
+ virtual void value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<typename dealii::TensorFunction<rank, dim, Number>::value_type> &values) const;
- virtual typename dealii::TensorFunction<rank, dim>::gradient_type gradient (const Point<dim> &p) const;
+ virtual typename dealii::TensorFunction<rank, dim, Number>::gradient_type gradient (const Point<dim, Number> &p) const;
- virtual void gradient_list (const std::vector<Point<dim> > &points,
- std::vector<typename dealii::TensorFunction<rank, dim>::gradient_type> &gradients) const;
+ virtual void gradient_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<typename dealii::TensorFunction<rank, dim, Number>::gradient_type> &gradients) const;
private:
- const dealii::Tensor<rank, dim> _value;
+ const dealii::Tensor<rank, dim, Number> _value;
};
* @ingroup functions
* @author Matthias Maier, 2013
*/
-template <int rank, int dim>
-class ZeroTensorFunction : public ConstantTensorFunction<rank, dim>
+template <int rank, int dim, typename Number=double>
+class ZeroTensorFunction : public ConstantTensorFunction<rank, dim, Number>
{
public:
/**
* An initial value for the time variable may be specified, otherwise it
* defaults to zero.
*/
- ZeroTensorFunction (const double initial_time = 0.0);
+ ZeroTensorFunction (const Number initial_time = 0.0);
};
template<int dim, class T> class Table;
class SparsityPattern;
template <typename number> class Vector;
-template <int dim> class Function;
+template <int dim, typename Number> class Function;
template <int dim, int spacedim> class FiniteElement;
template <int dim, int spacedim> class DoFHandler;
namespace hp
DEAL_II_NAMESPACE_OPEN
-template <int spacedim> class Function;
+template <int spacedim, typename Number> class Function;
* @ingroup functions
* @author Wolfgang Bangerth, Ralf Hartmann, 2001
*/
-template<int dim>
+template<int dim,typename Number=double>
struct FunctionMap
{
/**
* name it in the fashion of the
* STL local typedefs.
*/
- typedef std::map<types::boundary_id, const Function<dim>*> type;
+ typedef std::map<types::boundary_id, const Function<dim,Number>*> type;
};
DEAL_II_NAMESPACE_CLOSE
* Not implemented for the
* codimension one case.
*/
- template <int dim>
- void write_dx (const Triangulation<dim> &tria,
+ template <int dim, int spacedim>
+ void write_dx (const Triangulation<dim,spacedim> &tria,
std::ostream &out) const;
/**
*
* Not implemented for the codimension one case.
*/
- template <int dim>
- void write_eps (const Triangulation<dim> &tria,
+ template <int dim, int spacedim>
+ void write_eps (const Triangulation<dim, spacedim> &tria,
std::ostream &out,
- const Mapping<dim> *mapping=0) const;
+ const Mapping<dim, spacedim> *mapping=0) const;
/**
* Write two-dimensional XFig-file.
*
* Not implemented for the codimension one case.
*/
- template <int dim>
- void write_xfig (const Triangulation<dim> &tria,
+ template <int dim, int spacedim>
+ void write_xfig (const Triangulation<dim, spacedim> &tria,
std::ostream &out,
- const Mapping<dim> *mapping=0) const;
+ const Mapping<dim, spacedim> *mapping=0) const;
/**
* Write the triangulation in the SVG format.
*
* @note Not implemented for the codimension one case.
*/
- template <int dim>
- void write_mathgl (const Triangulation<dim> &tria,
+ template <int dim, int spacedim>
+ void write_mathgl (const Triangulation<dim, spacedim> &tria,
std::ostream &out) const;
/**
template <int dim>
void laplace_transform (const std::map<unsigned int,Point<dim> > &new_points,
Triangulation<dim> &tria,
- const Function<dim> *coefficient = 0);
+ const Function<dim,double> *coefficient = 0);
/**
* Scale the entire triangulation
DEAL_II_NAMESPACE_OPEN
template <int dim, int spacedim> class DoFHandler;
-template <int dim> struct FunctionMap;
+template <int dim, typename Number> struct FunctionMap;
/**
#include <deal.II/base/config.h>
+#include <deal.II/base/function.h>
#include <deal.II/base/exceptions.h>
#include <deal.II/base/thread_management.h>
#include <deal.II/lac/constraint_matrix.h>
DEAL_II_NAMESPACE_OPEN
-template <int dim> class Function;
-template <int dim> struct FunctionMap;
+template <int dim, typename Number> class Function;
+template <int dim, typename Number> struct FunctionMap;
template <int dim> class Quadrature;
template <int dim> class QGauss;
template <class VECTOR, int dim, int spacedim, template <int,int> class DH>
void interpolate (const Mapping<dim,spacedim> &mapping,
const DH<dim,spacedim> &dof,
- const Function<spacedim> &function,
+ const Function<spacedim,double> &function,
VECTOR &vec);
/**
*/
template <class VECTOR, class DH>
void interpolate (const DH &dof,
- const Function<DH::space_dimension> &function,
+ const Function<DH::space_dimension,double> &function,
VECTOR &vec);
/**
void
interpolate_based_on_material_id(const Mapping<DH::dimension, DH::space_dimension>& mapping,
const DH& dof_handler,
- const std::map< types::material_id, const Function<DH::space_dimension>* >& function_map,
+ const std::map< types::material_id, const Function<DH::space_dimension,double>* >& function_map,
VECTOR& dst,
const ComponentMask& component_mask = ComponentMask());
const DoFHandler<dim,spacedim> &dof,
const ConstraintMatrix &constraints,
const Quadrature<dim> &quadrature,
- const Function<spacedim> &function,
+ const Function<spacedim,double> &function,
VECTOR &vec,
const bool enforce_zero_boundary = false,
const Quadrature<dim-1> &q_boundary = (dim > 1 ?
void project (const DoFHandler<dim,spacedim> &dof,
const ConstraintMatrix &constraints,
const Quadrature<dim> &quadrature,
- const Function<spacedim> &function,
+ const Function<spacedim,double> &function,
VECTOR &vec,
const bool enforce_zero_boundary = false,
const Quadrature<dim-1> &q_boundary = (dim > 1 ?
const hp::DoFHandler<dim,spacedim> &dof,
const ConstraintMatrix &constraints,
const hp::QCollection<dim> &quadrature,
- const Function<spacedim> &function,
+ const Function<spacedim,double> &function,
VECTOR &vec,
const bool enforce_zero_boundary = false,
const hp::QCollection<dim-1> &q_boundary = hp::QCollection<dim-1>(dim > 1 ?
void project (const hp::DoFHandler<dim,spacedim> &dof,
const ConstraintMatrix &constraints,
const hp::QCollection<dim> &quadrature,
- const Function<spacedim> &function,
+ const Function<spacedim,double> &function,
VECTOR &vec,
const bool enforce_zero_boundary = false,
const hp::QCollection<dim-1> &q_boundary = hp::QCollection<dim-1>(dim > 1 ?
interpolate_boundary_values (const Mapping<DH::dimension,DH::space_dimension> &mapping,
const DH &dof,
const types::boundary_id boundary_component,
- const Function<DH::space_dimension> &boundary_function,
+ const Function<DH::space_dimension,double> &boundary_function,
std::map<types::global_dof_index,double> &boundary_values,
const ComponentMask &component_mask = ComponentMask());
void
interpolate_boundary_values (const DH &dof,
const types::boundary_id boundary_component,
- const Function<DH::space_dimension> &boundary_function,
+ const Function<DH::space_dimension,double> &boundary_function,
std::map<types::global_dof_index,double> &boundary_values,
const ComponentMask &component_mask = ComponentMask());
interpolate_boundary_values (const Mapping<DH::dimension,DH::space_dimension> &mapping,
const DH &dof,
const types::boundary_id boundary_component,
- const Function<DH::space_dimension> &boundary_function,
+ const Function<DH::space_dimension,double> &boundary_function,
ConstraintMatrix &constraints,
const ComponentMask &component_mask = ComponentMask());
void
interpolate_boundary_values (const DH &dof,
const types::boundary_id boundary_component,
- const Function<DH::space_dimension> &boundary_function,
+ const Function<DH::space_dimension,double> &boundary_function,
ConstraintMatrix &constraints,
const ComponentMask &component_mask = ComponentMask());
template <int dim>
void project_boundary_values_curl_conforming (const DoFHandler<dim> &dof_handler,
const unsigned int first_vector_component,
- const Function<dim> &boundary_function,
+ const Function<dim,double> &boundary_function,
const types::boundary_id boundary_component,
ConstraintMatrix &constraints,
const Mapping<dim> &mapping = StaticMappingQ1<dim>::mapping);
template <int dim>
void project_boundary_values_curl_conforming (const hp::DoFHandler<dim> &dof_handler,
const unsigned int first_vector_component,
- const Function<dim> &boundary_function,
+ const Function<dim,double> &boundary_function,
const types::boundary_id boundary_component,
ConstraintMatrix &constraints,
const hp::MappingCollection<dim, dim> &mapping_collection = hp::StaticMappingQ1<dim>::mapping_collection);
template<int dim>
void project_boundary_values_div_conforming (const DoFHandler<dim> &dof_handler,
const unsigned int first_vector_component,
- const Function<dim> &boundary_function,
+ const Function<dim,double> &boundary_function,
const types::boundary_id boundary_component,
ConstraintMatrix &constraints,
const Mapping<dim> &mapping = StaticMappingQ1<dim>::mapping);
template<int dim>
void project_boundary_values_div_conforming (const hp::DoFHandler<dim> &dof_handler,
const unsigned int first_vector_component,
- const Function<dim> &boundary_function,
+ const Function<dim,double> &boundary_function,
const types::boundary_id boundary_component,
ConstraintMatrix &constraints,
const hp::MappingCollection<dim, dim> &mapping_collection = hp::StaticMappingQ1<dim>::mapping_collection);
void create_right_hand_side (const Mapping<dim, spacedim> &mapping,
const DoFHandler<dim,spacedim> &dof,
const Quadrature<dim> &q,
- const Function<spacedim> &rhs,
+ const Function<spacedim,double> &rhs,
Vector<double> &rhs_vector);
/**
template <int dim, int spacedim>
void create_right_hand_side (const DoFHandler<dim,spacedim> &dof,
const Quadrature<dim> &q,
- const Function<spacedim> &rhs,
+ const Function<spacedim,double> &rhs,
Vector<double> &rhs_vector);
/**
void create_right_hand_side (const hp::MappingCollection<dim,spacedim> &mapping,
const hp::DoFHandler<dim,spacedim> &dof,
const hp::QCollection<dim> &q,
- const Function<spacedim> &rhs,
+ const Function<spacedim,double> &rhs,
Vector<double> &rhs_vector);
/**
template <int dim, int spacedim>
void create_right_hand_side (const hp::DoFHandler<dim,spacedim> &dof,
const hp::QCollection<dim> &q,
- const Function<spacedim> &rhs,
+ const Function<spacedim,double> &rhs,
Vector<double> &rhs_vector);
/**
void create_boundary_right_hand_side (const Mapping<dim,spacedim> &mapping,
const DoFHandler<dim,spacedim> &dof,
const Quadrature<dim-1> &q,
- const Function<spacedim> &rhs,
+ const Function<spacedim,double> &rhs,
Vector<double> &rhs_vector,
const std::set<types::boundary_id> &boundary_indicators = std::set<types::boundary_id>());
template <int dim, int spacedim>
void create_boundary_right_hand_side (const DoFHandler<dim,spacedim> &dof,
const Quadrature<dim-1> &q,
- const Function<spacedim> &rhs,
+ const Function<spacedim,double> &rhs,
Vector<double> &rhs_vector,
const std::set<types::boundary_id> &boundary_indicators = std::set<types::boundary_id>());
void create_boundary_right_hand_side (const hp::MappingCollection<dim,spacedim> &mapping,
const hp::DoFHandler<dim,spacedim> &dof,
const hp::QCollection<dim-1> &q,
- const Function<spacedim> &rhs,
+ const Function<spacedim,double> &rhs,
Vector<double> &rhs_vector,
const std::set<types::boundary_id> &boundary_indicators = std::set<types::boundary_id>());
template <int dim, int spacedim>
void create_boundary_right_hand_side (const hp::DoFHandler<dim,spacedim> &dof,
const hp::QCollection<dim-1> &q,
- const Function<spacedim> &rhs,
+ const Function<spacedim,double> &rhs,
Vector<double> &rhs_vector,
const std::set<types::boundary_id> &boundary_indicators = std::set<types::boundary_id>());
void integrate_difference (const Mapping<dim,spacedim> &mapping,
const DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<spacedim> &exact_solution,
+ const Function<spacedim,double> &exact_solution,
OutVector &difference,
const Quadrature<dim> &q,
const NormType &norm,
- const Function<spacedim> *weight = 0,
+ const Function<spacedim,double> *weight = 0,
const double exponent = 2.);
/**
template <int dim, class InVector, class OutVector, int spacedim>
void integrate_difference (const DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<spacedim> &exact_solution,
+ const Function<spacedim,double> &exact_solution,
OutVector &difference,
const Quadrature<dim> &q,
const NormType &norm,
- const Function<spacedim> *weight = 0,
+ const Function<spacedim,double> *weight = 0,
const double exponent = 2.);
/**
void integrate_difference (const hp::MappingCollection<dim,spacedim> &mapping,
const hp::DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<spacedim> &exact_solution,
+ const Function<spacedim,double> &exact_solution,
OutVector &difference,
const hp::QCollection<dim> &q,
const NormType &norm,
- const Function<spacedim> *weight = 0,
+ const Function<spacedim,double> *weight = 0,
const double exponent = 2.);
/**
template <int dim, class InVector, class OutVector, int spacedim>
void integrate_difference (const hp::DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<spacedim> &exact_solution,
+ const Function<spacedim,double> &exact_solution,
OutVector &difference,
const hp::QCollection<dim> &q,
const NormType &norm,
- const Function<spacedim> *weight = 0,
+ const Function<spacedim,double> *weight = 0,
const double exponent = 2.);
/**
template <int dim, class InVector, int spacedim>
void point_difference (const DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<spacedim> &exact_solution,
+ const Function<spacedim,double> &exact_solution,
Vector<double> &difference,
const Point<spacedim> &point);
void point_difference (const Mapping<dim, spacedim> &mapping,
const DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<spacedim> &exact_solution,
+ const Function<spacedim,double> &exact_solution,
Vector<double> &difference,
const Point<spacedim> &point);
DEAL_II_NAMESPACE_OPEN
-template <int dim>
-const unsigned int Function<dim>::dimension;
+template <int dim, typename Number>
+const unsigned int Function<dim, Number>::dimension;
-template <int dim>
-Function<dim>::Function (const unsigned int n_components,
- const double initial_time)
+template <int dim, typename Number>
+Function<dim, Number>::Function (const unsigned int n_components,
+ const Number initial_time)
:
- FunctionTime(initial_time),
+ FunctionTime<Number>(initial_time),
n_components(n_components)
{
// avoid the construction of function
}
-template <int dim>
-Function<dim>::~Function ()
+template <int dim, typename Number>
+Function<dim, Number>::~Function ()
{}
-template <int dim>
-Function<dim> &Function<dim>::operator= (const Function &f)
+template <int dim, typename Number>
+Function<dim, Number> &Function<dim, Number>::operator= (const Function &f)
{
AssertDimension (n_components, f.n_components);
return *this;
}
-template <int dim>
-double Function<dim>::value (const Point<dim> &,
+template <int dim, typename Number>
+Number Function<dim, Number>::value (const Point<dim, Number> &,
const unsigned int) const
{
Assert (false, ExcPureFunctionCalled());
}
-template <int dim>
-void Function<dim>::vector_value (const Point<dim> &p,
- Vector<double> &v) const
+template <int dim, typename Number>
+void Function<dim, Number>::vector_value (const Point<dim, Number> &p,
+ Vector<Number> &v) const
{
AssertDimension(v.size(), this->n_components);
for (unsigned int i=0; i<this->n_components; ++i)
}
-template <int dim>
-void Function<dim>::value_list (const std::vector<Point<dim> > &points,
- std::vector<double> &values,
+template <int dim, typename Number>
+void Function<dim, Number>::value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Number> &values,
const unsigned int component) const
{
// check whether component is in
}
-template <int dim>
-void Function<dim>::vector_value_list (const std::vector<Point<dim> > &points,
- std::vector<Vector<double> > &values) const
+template <int dim, typename Number>
+void Function<dim, Number>::vector_value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Vector<Number> > &values) const
{
// check whether component is in
// the valid range is up to the
}
-template <int dim>
-void Function<dim>::vector_values (
- const std::vector<Point<dim> > &points,
- std::vector<std::vector<double> > &values) const
+template <int dim, typename Number>
+void Function<dim, Number>::vector_values (
+ const std::vector<Point<dim, Number> > &points,
+ std::vector<std::vector<Number> > &values) const
{
const unsigned int n = this->n_components;
AssertDimension (values.size(), n);
}
-template <int dim>
-Tensor<1,dim> Function<dim>::gradient (const Point<dim> &,
- const unsigned int) const
+template <int dim, typename Number>
+Tensor<1,dim,Number> Function<dim, Number>::gradient (const Point<dim, Number> &,
+ const unsigned int) const
{
Assert (false, ExcPureFunctionCalled());
- return Point<dim>();
+ return Point<dim, Number>();
}
-template <int dim>
-void Function<dim>::vector_gradient (
- const Point<dim> &p,
- std::vector<Tensor<1,dim> > &v) const
+template <int dim, typename Number>
+void Function<dim, Number>::vector_gradient (
+ const Point<dim, Number> &p,
+ std::vector<Tensor<1,dim,Number> > &v) const
{
AssertDimension(v.size(), this->n_components);
for (unsigned int i=0; i<this->n_components; ++i)
}
-template <int dim>
-void Function<dim>::gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
- const unsigned int component) const
+template <int dim, typename Number>
+void Function<dim, Number>::gradient_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Tensor<1,dim,Number> > &gradients,
+ const unsigned int component) const
{
Assert (gradients.size() == points.size(),
ExcDimensionMismatch(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
+template <int dim, typename Number>
+void Function<dim, Number>::vector_gradient_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<std::vector<Tensor<1,dim,Number> > > &gradients) const
{
Assert (gradients.size() == points.size(),
ExcDimensionMismatch(gradients.size(), points.size()));
}
-template <int dim>
-void Function<dim>::vector_gradients (
- const std::vector<Point<dim> > &points,
- std::vector<std::vector<Tensor<1,dim> > > &values) const
+template <int dim, typename Number>
+void Function<dim, Number>::vector_gradients (
+ const std::vector<Point<dim, Number> > &points,
+ std::vector<std::vector<Tensor<1,dim,Number> > > &values) const
{
const unsigned int n = this->n_components;
AssertDimension (values.size(), n);
-template <int dim>
-double Function<dim>::laplacian (const Point<dim> &,
+template <int dim, typename Number>
+Number Function<dim, Number>::laplacian (const Point<dim, Number> &,
const unsigned int) const
{
Assert (false, ExcPureFunctionCalled());
}
-template <int dim>
-void Function<dim>::vector_laplacian (const Point<dim> &,
- Vector<double> &) const
+template <int dim, typename Number>
+void Function<dim, Number>::vector_laplacian (const Point<dim, Number> &,
+ Vector<Number> &) const
{
Assert (false, ExcPureFunctionCalled());
}
-template <int dim>
-void Function<dim>::laplacian_list (const std::vector<Point<dim> > &points,
- std::vector<double> &laplacians,
+template <int dim, typename Number>
+void Function<dim, Number>::laplacian_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Number> &laplacians,
const unsigned int component) const
{
// check whether component is in
}
-template <int dim>
-void Function<dim>::vector_laplacian_list (const std::vector<Point<dim> > &points,
- std::vector<Vector<double> > &laplacians) const
+template <int dim, typename Number>
+void Function<dim, Number>::vector_laplacian_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Vector<Number> > &laplacians) const
{
// check whether component is in
// the valid range is up to the
-template <int dim>
+template <int dim, typename Number>
std::size_t
-Function<dim>::memory_consumption () const
+Function<dim, Number>::memory_consumption () const
{
// only simple data elements, so
// use sizeof operator
//---------------------------------------------------------------------------
-template <int dim>
-ZeroFunction<dim>::ZeroFunction (const unsigned int n_components)
+template <int dim, typename Number>
+ZeroFunction<dim, Number>::ZeroFunction (const unsigned int n_components)
:
- Function<dim> (n_components)
+ Function<dim, Number> (n_components)
{}
-template <int dim>
-ZeroFunction<dim>::~ZeroFunction ()
+template <int dim, typename Number>
+ZeroFunction<dim, Number>::~ZeroFunction ()
{}
-template <int dim>
-double ZeroFunction<dim>::value (const Point<dim> &,
+template <int dim, typename Number>
+Number ZeroFunction<dim, Number>::value (const Point<dim, Number> &,
const unsigned int) const
{
return 0.;
}
-template <int dim>
-void ZeroFunction<dim>::vector_value (const Point<dim> &,
- Vector<double> &return_value) const
+template <int dim, typename Number>
+void ZeroFunction<dim, Number>::vector_value (const Point<dim, Number> &,
+ Vector<Number> &return_value) const
{
Assert (return_value.size() == this->n_components,
ExcDimensionMismatch (return_value.size(), this->n_components));
}
-template <int dim>
-void ZeroFunction<dim>::value_list (const std::vector<Point<dim> > &points,
- std::vector<double> &values,
+template <int dim, typename Number>
+void ZeroFunction<dim, Number>::value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Number> &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,
- std::vector<Vector<double> > &values) const
+template <int dim, typename Number>
+void ZeroFunction<dim, Number>::vector_value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Vector<Number> > &values) const
{
Assert (values.size() == points.size(),
ExcDimensionMismatch(values.size(), points.size()));
}
-template <int dim>
-Tensor<1,dim> ZeroFunction<dim>::gradient (const Point<dim> &,
+template <int dim, typename Number>
+Tensor<1,dim,Number> ZeroFunction<dim, Number>::gradient (const Point<dim, Number> &,
const unsigned int) const
{
- return Tensor<1,dim>();
+ return Tensor<1,dim,Number>();
}
-template <int dim>
-void ZeroFunction<dim>::vector_gradient (const Point<dim> &,
- std::vector<Tensor<1,dim> > &gradients) const
+template <int dim, typename Number>
+void ZeroFunction<dim, Number>::vector_gradient (const Point<dim, Number> &,
+ std::vector<Tensor<1,dim,Number> > &gradients) const
{
Assert (gradients.size() == this->n_components,
ExcDimensionMismatch(gradients.size(), this->n_components));
}
-template <int dim>
-void ZeroFunction<dim>::gradient_list (const std::vector<Point<dim> > &points,
- std::vector<Tensor<1,dim> > &gradients,
+template <int dim, typename Number>
+void ZeroFunction<dim, Number>::gradient_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Tensor<1,dim,Number> > &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
+template <int dim, typename Number>
+void ZeroFunction<dim, Number>::vector_gradient_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<std::vector<Tensor<1,dim,Number> > > &gradients) const
{
Assert (gradients.size() == points.size(),
ExcDimensionMismatch(gradients.size(), points.size()));
//---------------------------------------------------------------------------
-template <int dim>
-ConstantFunction<dim>::ConstantFunction (const double value,
+template <int dim, typename Number>
+ConstantFunction<dim, Number>::ConstantFunction (const Number value,
const unsigned int n_components)
:
- ZeroFunction<dim> (n_components),
+ ZeroFunction<dim, Number> (n_components),
function_value (value)
{}
-template <int dim>
-ConstantFunction<dim>::~ConstantFunction () {}
+template <int dim, typename Number>
+ConstantFunction<dim, Number>::~ConstantFunction () {}
-template <int dim>
-double ConstantFunction<dim>::value (const Point<dim> &,
+template <int dim, typename Number>
+Number ConstantFunction<dim, Number>::value (const Point<dim, Number> &,
const unsigned int component) const
{
Assert (component < this->n_components,
-template <int dim>
-void ConstantFunction<dim>::vector_value (const Point<dim> &,
- Vector<double> &return_value) const
+template <int dim, typename Number>
+void ConstantFunction<dim, Number>::vector_value (const Point<dim, Number> &,
+ Vector<Number> &return_value) const
{
Assert (return_value.size() == this->n_components,
ExcDimensionMismatch (return_value.size(), this->n_components));
-template <int dim>
-void ConstantFunction<dim>::value_list (const std::vector<Point<dim> > &points,
- std::vector<double> &values,
+template <int dim, typename Number>
+void ConstantFunction<dim, Number>::value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Number> &values,
const unsigned int component) const
{
Assert (component < this->n_components,
-template <int dim>
-void ConstantFunction<dim>::vector_value_list (const std::vector<Point<dim> > &points,
- std::vector<Vector<double> > &values) const
+template <int dim, typename Number>
+void ConstantFunction<dim, Number>::vector_value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Vector<Number> > &values) const
{
Assert (values.size() == points.size(),
ExcDimensionMismatch(values.size(), points.size()));
-template <int dim>
+template <int dim, typename Number>
std::size_t
-ConstantFunction<dim>::memory_consumption () const
+ConstantFunction<dim, Number>::memory_consumption () const
{
// only simple data elements, so
// use sizeof operator
//---------------------------------------------------------------------------
-template <int dim>
-ComponentSelectFunction<dim>::
+template <int dim, typename Number>
+ComponentSelectFunction<dim, Number>::
ComponentSelectFunction (const unsigned int selected,
- const double value,
+ const Number value,
const unsigned int n_components)
:
- ConstantFunction<dim> (value, n_components),
+ ConstantFunction<dim, Number> (value, n_components),
selected_components(std::make_pair(selected,selected+1))
{}
-template <int dim>
-ComponentSelectFunction<dim>::
+template <int dim, typename Number>
+ComponentSelectFunction<dim, Number>::
ComponentSelectFunction (const unsigned int selected,
const unsigned int n_components)
:
- ConstantFunction<dim> (1., n_components),
+ ConstantFunction<dim, Number> (1., n_components),
selected_components(std::make_pair(selected,selected+1))
{
Assert (selected < n_components,
-template <int dim>
-ComponentSelectFunction<dim>::
+template <int dim, typename Number>
+ComponentSelectFunction<dim, Number>::
ComponentSelectFunction (const std::pair<unsigned int,unsigned int> &selected,
const unsigned int n_components)
:
- ConstantFunction<dim> (1., n_components),
+ ConstantFunction<dim, Number> (1., n_components),
selected_components(selected)
{
Assert (selected_components.first < selected_components.second,
-template <int dim>
-void ComponentSelectFunction<dim>::vector_value (const Point<dim> &,
- Vector<double> &return_value) const
+template <int dim, typename Number>
+void ComponentSelectFunction<dim, Number>::vector_value (const Point<dim, Number> &,
+ Vector<Number> &return_value) const
{
Assert (return_value.size() == this->n_components,
ExcDimensionMismatch (return_value.size(), this->n_components));
-template <int dim>
-void ComponentSelectFunction<dim>::vector_value_list (const std::vector<Point<dim> > &points,
- std::vector<Vector<double> > &values) const
+template <int dim, typename Number>
+void ComponentSelectFunction<dim, Number>::vector_value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Vector<Number> > &values) const
{
Assert (values.size() == points.size(),
ExcDimensionMismatch(values.size(), points.size()));
for (unsigned int i=0; i<points.size(); ++i)
- ComponentSelectFunction<dim>::vector_value (points[i],
+ ComponentSelectFunction<dim, Number>::vector_value (points[i],
values[i]);
}
-template <int dim>
+template <int dim, typename Number>
std::size_t
-ComponentSelectFunction<dim>::memory_consumption () const
+ComponentSelectFunction<dim, Number>::memory_consumption () const
{
// only simple data elements, so
// use sizeof operator
}
-template <int dim>
-ScalarFunctionFromFunctionObject<dim>::
-ScalarFunctionFromFunctionObject (const std_cxx1x::function<double (const Point<dim> &)> &function_object)
+template <int dim, typename Number>
+ScalarFunctionFromFunctionObject<dim, Number>::
+ScalarFunctionFromFunctionObject (const std_cxx1x::function<Number (const Point<dim, Number> &)> &function_object)
:
- Function<dim>(1),
+ Function<dim, Number>(1),
function_object (function_object)
{}
-template <int dim>
-double
-ScalarFunctionFromFunctionObject<dim>::value (const Point<dim> &p,
+template <int dim, typename Number>
+Number
+ScalarFunctionFromFunctionObject<dim, Number>::value (const Point<dim, Number> &p,
const unsigned int component) const
{
Assert (component == 0,
-template <int dim>
-VectorFunctionFromScalarFunctionObject<dim>::
-VectorFunctionFromScalarFunctionObject (const std_cxx1x::function<double (const Point<dim> &)> &function_object,
+template <int dim, typename Number>
+VectorFunctionFromScalarFunctionObject<dim, Number>::
+VectorFunctionFromScalarFunctionObject (const std_cxx1x::function<Number (const Point<dim, Number> &)> &function_object,
const unsigned int selected_component,
const unsigned int n_components)
:
- Function<dim>(n_components),
+ Function<dim, Number>(n_components),
function_object (function_object),
selected_component (selected_component)
{
-template <int dim>
-double
-VectorFunctionFromScalarFunctionObject<dim>::value (const Point<dim> &p,
+template <int dim, typename Number>
+Number
+VectorFunctionFromScalarFunctionObject<dim, Number>::value (const Point<dim, Number> &p,
const unsigned int component) const
{
Assert (component < this->n_components,
-template <int dim>
+template <int dim, typename Number>
void
-VectorFunctionFromScalarFunctionObject<dim>::
-vector_value (const Point<dim> &p,
- Vector<double> &values) const
+VectorFunctionFromScalarFunctionObject<dim, Number>::
+vector_value (const Point<dim, Number> &p,
+ Vector<Number> &values) const
{
AssertDimension(values.size(), this->n_components);
* The constructor for <tt>VectorFunctionFromTensorFunction</tt> which initiates the return vector
* to be size <tt>n_components</tt>.
*/
-template <int dim>
-VectorFunctionFromTensorFunction<dim>::VectorFunctionFromTensorFunction (const TensorFunction<1,dim> &tensor_function,
+template <int dim, typename Number>
+VectorFunctionFromTensorFunction<dim, Number>::VectorFunctionFromTensorFunction (const TensorFunction<1,dim,Number> &tensor_function,
const unsigned int selected_component,
const unsigned int n_components)
:
- Function<dim> (n_components),
+ Function<dim, Number> (n_components),
tensor_function (tensor_function),
selected_component (selected_component)
{
- // Verify that the Tensor<1,dim> will fit in the given length selected_components
+ // Verify that the Tensor<1,dim,Number> will fit in the given length selected_components
// and not hang over the end of the vector.
Assert (selected_component + dim - 1 < this->n_components,
ExcIndexRange (selected_component, 0, this->n_components));
}
-template <int dim>
-VectorFunctionFromTensorFunction<dim>::~VectorFunctionFromTensorFunction ()
+template <int dim, typename Number>
+VectorFunctionFromTensorFunction<dim, Number>::~VectorFunctionFromTensorFunction ()
{}
-template <int dim>
+template <int dim, typename Number>
inline
-double VectorFunctionFromTensorFunction<dim>::value (const Point<dim> &p,
+Number VectorFunctionFromTensorFunction<dim, Number>::value (const Point<dim, Number> &p,
const unsigned int component) const
{
Assert (component<this->n_components,
// otherwise retrieve the values from the <tt>tensor_function</tt> to be
// placed at the <tt>selected_component</tt> to <tt>selected_component + dim - 1</tt>
// elements of the <tt>Vector</tt> values and pick the correct one
- const Tensor<1,dim> tensor_value = tensor_function.value (p);
+ const Tensor<1,dim,Number> tensor_value = tensor_function.value (p);
return tensor_value[component-selected_component];
}
-template <int dim>
+template <int dim, typename Number>
inline
-void VectorFunctionFromTensorFunction<dim>::vector_value (const Point<dim> &p,
- Vector<double> &values) const
+void VectorFunctionFromTensorFunction<dim, Number>::vector_value (const Point<dim, Number> &p,
+ Vector<Number> &values) const
{
Assert(values.size() == this->n_components,
ExcDimensionMismatch(values.size(),this->n_components));
// Retrieve the values from the <tt>tensor_function</tt> to be
// placed at the <tt>selected_component</tt> to <tt>selected_component + dim - 1</tt>
// elements of the <tt>Vector</tt> values.
- const Tensor<1,dim> tensor_value = tensor_function.value (p);
+ const Tensor<1,dim,Number> tensor_value = tensor_function.value (p);
// First we make all elements of values = 0
values = 0;
/** Member function <tt>vector_value_list </tt> is the interface for giving a list of
- * points (<code>vector<Point<dim> ></code>) of which to evaluate using the <tt>vector_value</tt>
+ * points (<code>vector<Point<dim, Number> ></code>) of which to evaluate using the <tt>vector_value</tt>
* member function. Again, this function is written so as to not replicate the function definition
* but passes each point on to <tt>vector_value</tt> to be evaluated.
*/
-template <int dim>
-void VectorFunctionFromTensorFunction<dim>::vector_value_list (const std::vector<Point<dim> > &points,
- std::vector<Vector<double> > &value_list) const
+template <int dim, typename Number>
+void VectorFunctionFromTensorFunction<dim, Number>::vector_value_list (const std::vector<Point<dim, Number> > &points,
+ std::vector<Vector<Number> > &value_list) const
{
Assert (value_list.size() == points.size(),
ExcDimensionMismatch (value_list.size(), points.size()));
const unsigned int n_points = points.size();
for (unsigned int p=0; p<n_points; ++p)
- VectorFunctionFromTensorFunction<dim>::vector_value (points[p], value_list[p]);
+ VectorFunctionFromTensorFunction<dim, Number>::vector_value (points[p], value_list[p]);
}
DEAL_II_NAMESPACE_OPEN
-FunctionTime::FunctionTime(const double initial_time)
+template<typename Number>
+FunctionTime<Number>::FunctionTime(const Number initial_time)
:
time(initial_time)
{}
-FunctionTime::~FunctionTime()
+template<typename Number>
+FunctionTime<Number>::~FunctionTime()
{}
+template<typename Number>
void
-FunctionTime::set_time (const double new_time)
+FunctionTime<Number>::set_time (const Number new_time)
{
time = new_time;
}
-
+template<typename Number>
void
-FunctionTime::advance_time (const double delta_t)
+FunctionTime<Number>::advance_time (const Number delta_t)
{
set_time (time+delta_t);
}
+// Explicit instantiation
+template class FunctionTime<double>;
+
DEAL_II_NAMESPACE_CLOSE
+
// TensorFunction
//////////////////////////////////////////////////////////////////////
-template <int rank, int dim>
-TensorFunction<rank, dim>::TensorFunction (const double initial_time)
+template <int rank, int dim, typename Number>
+TensorFunction<rank, dim, Number>::TensorFunction (const Number initial_time)
:
- FunctionTime (initial_time)
+ FunctionTime<Number> (initial_time)
{}
-template <int rank, int dim>
-TensorFunction<rank, dim>::~TensorFunction ()
+template <int rank, int dim, typename Number>
+TensorFunction<rank, dim, Number>::~TensorFunction ()
{}
-template <int rank, int dim>
-typename TensorFunction<rank, dim>::value_type
-TensorFunction<rank, dim>::value (const Point<dim> &) const
+template <int rank, int dim, typename Number>
+typename TensorFunction<rank, dim, Number>::value_type
+TensorFunction<rank, dim, Number>::value (const Point<dim,Number> &) const
{
Assert (false, ExcPureFunctionCalled());
return Tensor<rank,dim>();
}
-template <int rank, int dim>
+template <int rank, int dim, typename Number>
void
-TensorFunction<rank, dim>::value_list (const std::vector<Point<dim> > &points,
+TensorFunction<rank, dim, Number>::value_list (const std::vector<Point<dim,Number> > &points,
std::vector<value_type> &values) const
{
Assert (values.size() == points.size(),
}
-template <int rank, int dim>
-typename TensorFunction<rank, dim>::gradient_type
-TensorFunction<rank, dim>::gradient (const Point<dim> &) const
+template <int rank, int dim, typename Number>
+typename TensorFunction<rank, dim, Number>::gradient_type
+TensorFunction<rank, dim, Number>::gradient (const Point<dim,Number> &) const
{
Assert (false, ExcPureFunctionCalled());
return Tensor<rank+1,dim>();
}
-template <int rank, int dim>
+template <int rank, int dim, typename Number>
void
-TensorFunction<rank, dim>::gradient_list (const std::vector<Point<dim> > &points,
+TensorFunction<rank, dim, Number>::gradient_list (const std::vector<Point<dim,Number> > &points,
std::vector<gradient_type> &gradients) const
{
Assert (gradients.size() == points.size(),
//////////////////////////////////////////////////////////////////////
-template <int rank, int dim>
-ConstantTensorFunction<rank, dim>::ConstantTensorFunction (const Tensor<rank, dim> &value,
- const double initial_time)
+template <int rank, int dim, typename Number>
+ConstantTensorFunction<rank, dim, Number>::ConstantTensorFunction (const Tensor<rank, dim, Number> &value,
+ const Number initial_time)
:
- TensorFunction<rank, dim> (initial_time),
+ TensorFunction<rank, dim, Number> (initial_time),
_value(value)
{}
-template <int rank, int dim>
-ConstantTensorFunction<rank, dim>::~ConstantTensorFunction ()
+template <int rank, int dim, typename Number>
+ConstantTensorFunction<rank, dim, Number>::~ConstantTensorFunction ()
{}
-template <int rank, int dim>
-typename TensorFunction<rank, dim>::value_type
-ConstantTensorFunction<rank, dim>::value (const Point<dim> &/*point*/) const
+template <int rank, int dim, typename Number>
+typename TensorFunction<rank, dim, Number>::value_type
+ConstantTensorFunction<rank, dim, Number>::value (const Point<dim,Number> &/*point*/) const
{
return _value;
}
-template <int rank, int dim>
+template <int rank, int dim, typename Number>
void
-ConstantTensorFunction<rank, dim>::value_list (const std::vector<Point<dim> > &points,
- std::vector<typename TensorFunction<rank, dim>::value_type> &values) const
+ConstantTensorFunction<rank, dim, Number>::value_list (const std::vector<Point<dim,Number> > &points,
+ std::vector<typename TensorFunction<rank, dim, Number>::value_type> &values) const
{
Assert (values.size() == points.size(),
ExcDimensionMismatch(values.size(), points.size()));
}
-template <int rank, int dim>
-typename TensorFunction<rank, dim>::gradient_type
-ConstantTensorFunction<rank, dim>::gradient (const Point<dim> &) const
+template <int rank, int dim, typename Number>
+typename TensorFunction<rank, dim, Number>::gradient_type
+ConstantTensorFunction<rank, dim, Number>::gradient (const Point<dim,Number> &) const
{
static const Tensor<rank+1,dim> zero;
}
-template <int rank, int dim>
+template <int rank, int dim, typename Number>
void
-ConstantTensorFunction<rank, dim>::gradient_list (const std::vector<Point<dim> > &points,
- std::vector<typename TensorFunction<rank, dim>::gradient_type> &gradients) const
+ConstantTensorFunction<rank, dim, Number>::gradient_list (const std::vector<Point<dim,Number> > &points,
+ std::vector<typename TensorFunction<rank, dim, Number>::gradient_type> &gradients) const
{
Assert (gradients.size() == points.size(),
ExcDimensionMismatch(gradients.size(), points.size()));
//////////////////////////////////////////////////////////////////////
-template <int rank, int dim>
-ZeroTensorFunction<rank, dim>::ZeroTensorFunction (const double initial_time)
+template <int rank, int dim, typename Number>
+ZeroTensorFunction<rank, dim, Number>::ZeroTensorFunction (const Number initial_time)
:
- ConstantTensorFunction<rank, dim> (dealii::Tensor<rank, dim>(), initial_time)
+ ConstantTensorFunction<rank, dim, Number> (dealii::Tensor<rank, dim, Number>(), initial_time)
{}
Assert (false, ExcNotImplemented());
}
+template <>
+void GridOut::write_dx (const Triangulation<1,2> &,
+ std::ostream &) const
+{
+ Assert (false, ExcNotImplemented());
+}
+
+template <>
+void GridOut::write_dx (const Triangulation<1,3> &,
+ std::ostream &) const
+{
+ Assert (false, ExcNotImplemented());
+}
+
-template <int dim>
-void GridOut::write_dx (const Triangulation<dim> &tria,
+template <int dim, int spacedim>
+void GridOut::write_dx (const Triangulation<dim, spacedim> &tria,
std::ostream &out) const
{
//TODO:[GK] allow for boundary faces only
Assert(dx_flags.write_all_faces, ExcNotImplemented());
AssertThrow (out, ExcIO());
// Copied and adapted from write_ucd
- const std::vector<Point<dim> > &vertices = tria.get_vertices();
+ const std::vector<Point<spacedim> > &vertices = tria.get_vertices();
const std::vector<bool> &vertex_used = tria.get_used_vertices();
const unsigned int n_vertices = tria.n_used_vertices();
renumber[i]=new_number++;
Assert(new_number==n_vertices, ExcInternalError());
- typename Triangulation<dim>::active_cell_iterator cell;
- const typename Triangulation<dim>::active_cell_iterator endc=tria.end();
+ typename Triangulation<dim, spacedim>::active_cell_iterator cell;
+ const typename Triangulation<dim, spacedim>::active_cell_iterator endc=tria.end();
// write the vertices
{
for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
{
- typename Triangulation<dim>::face_iterator face = cell->face(f);
+ typename Triangulation<dim, spacedim>::face_iterator face = cell->face(f);
for (unsigned int v=0; v<GeometryInfo<dim>::vertices_per_face; ++v)
out << '\t' << renumber[face->vertex_index(GeometryInfo<dim-1>::dx_to_deal[v])];
-template <int dim>
+template <int dim, int spacedim>
void GridOut::write_xfig (
- const Triangulation<dim> &,
+ const Triangulation<dim, spacedim> &,
std::ostream &,
- const Mapping<dim> *) const
+ const Mapping<dim, spacedim> *) const
{
Assert (false, ExcNotImplemented());
}
const Mapping<2> * /*mapping*/) const
{
const int dim = 2;
+ const int spacedim = 2;
const unsigned int nv = GeometryInfo<dim>::vertices_per_cell;
const unsigned int nf = GeometryInfo<dim>::faces_per_cell;
// on finer levels. Level 0
// corresponds to a depth of 900,
// each level subtracting 1
- Triangulation<dim>::cell_iterator cell = tria.begin();
- const Triangulation<dim>::cell_iterator end = tria.end();
+ Triangulation<dim, spacedim>::cell_iterator cell = tria.begin();
+ const Triangulation<dim, spacedim>::cell_iterator end = tria.end();
for (; cell != end; ++cell)
{
if (xfig_flags.draw_boundary)
for (unsigned int f=0; f<nf; ++f)
{
- Triangulation<dim>::face_iterator
+ Triangulation<dim, spacedim>::face_iterator
face = cell->face(face_reorder[f]);
const types::boundary_id bi = face->boundary_indicator();
if (bi != numbers::internal_face_boundary_id)
}
-template <int dim>
-void GridOut::write_mathgl (const Triangulation<dim> &tria,
+template <int dim, int spacedim>
+void GridOut::write_mathgl (const Triangulation<dim, spacedim> &tria,
std::ostream &out) const
{
AssertThrow (out, ExcIO ());
// run over all active cells and write out a list of
// xyz-coordinates that correspond to vertices
- typename dealii::Triangulation<dim>::active_cell_iterator
+ typename dealii::Triangulation<dim, spacedim>::active_cell_iterator
cell=tria.begin_active (),
endc=tria.end ();
Assert(false, ExcNotImplemented());
}
+ void write_eps (const dealii::Triangulation<1,2> &,
+ std::ostream &,
+ const Mapping<1,2> *,
+ const GridOutFlags::Eps<2> &,
+ const GridOutFlags::Eps<3> &)
+ {
+ Assert(false, ExcNotImplemented());
+ }
+ void write_eps (const dealii::Triangulation<2,3> &,
+ std::ostream &,
+ const Mapping<2,3> *,
+ const GridOutFlags::Eps<2> &,
+ const GridOutFlags::Eps<3> &)
+ {
+ Assert(false, ExcNotImplemented());
+ }
- template <int dim>
- void write_eps (const dealii::Triangulation<dim> &tria,
+
+
+ template <int dim, int spacedim>
+ void write_eps (const dealii::Triangulation<dim, spacedim> &tria,
std::ostream &out,
- const Mapping<dim> *mapping,
+ const Mapping<dim,spacedim> *mapping,
const GridOutFlags::Eps<2> &eps_flags_2,
const GridOutFlags::Eps<3> &eps_flags_3)
{
case 2:
{
- for (typename dealii::Triangulation<dim>::active_cell_iterator
+ for (typename dealii::Triangulation<dim, spacedim>::active_cell_iterator
cell=tria.begin_active();
cell!=tria.end(); ++cell)
for (unsigned int line_no=0;
line_no<GeometryInfo<dim>::lines_per_cell; ++line_no)
{
- typename dealii::Triangulation<dim>::line_iterator
+ typename dealii::Triangulation<dim, spacedim>::line_iterator
line=cell->line(line_no);
// first treat all
// boundary faces and
// generate the info from
// them
- for (typename dealii::Triangulation<dim>::active_cell_iterator
+ for (typename dealii::Triangulation<dim, spacedim>::active_cell_iterator
cell=tria.begin_active();
cell!=tria.end(); ++cell)
for (unsigned int face_no=0; face_no<GeometryInfo<dim>::faces_per_cell; ++face_no)
{
- const typename dealii::Triangulation<dim>::face_iterator
+ const typename dealii::Triangulation<dim, spacedim>::face_iterator
face = cell->face(face_no);
if (face->at_boundary())
// presently not supported
Assert (mapping == 0, ExcNotImplemented());
- typename dealii::Triangulation<dim>::active_cell_iterator
+ typename dealii::Triangulation<dim, spacedim>::active_cell_iterator
cell=tria.begin_active(),
endc=tria.end();
for (unsigned int line_no=0;
line_no<GeometryInfo<dim>::lines_per_cell; ++line_no)
{
- typename dealii::Triangulation<dim>::line_iterator
+ typename dealii::Triangulation<dim, spacedim>::line_iterator
line=cell->line(line_no);
line_list.push_back (LineEntry(Point<2>(line->vertex(0) * unit_vector2,
line->vertex(0) * unit_vector1),
out << "(Helvetica) findfont 140 scalefont setfont"
<< '\n';
- typename dealii::Triangulation<dim>::active_cell_iterator
+ typename dealii::Triangulation<dim, spacedim>::active_cell_iterator
cell = tria.begin_active (),
endc = tria.end ();
for (; cell!=endc; ++cell)
// already tracked, to avoid
// doing this multiply
std::set<unsigned int> treated_vertices;
- typename dealii::Triangulation<dim>::active_cell_iterator
+ typename dealii::Triangulation<dim, spacedim>::active_cell_iterator
cell = tria.begin_active (),
endc = tria.end ();
for (; cell!=endc; ++cell)
}
-template <int dim>
-void GridOut::write_eps (const Triangulation<dim> &tria,
+template <int dim, int spacedim>
+void GridOut::write_eps (const Triangulation<dim, spacedim> &tria,
std::ostream &out,
- const Mapping<dim> *mapping) const
+ const Mapping<dim,spacedim> *mapping) const
{
internal::write_eps (tria, out, mapping,
eps_flags_2, eps_flags_3);
template void GridOut::write_vtu
(const Triangulation<deal_II_dimension,deal_II_dimension+1>&,
std::ostream&) const;
+
+ template void GridOut::write<deal_II_dimension,deal_II_dimension+1>
+ (const Triangulation<deal_II_dimension,deal_II_dimension+1> &,
+ std::ostream &, const OutputFormat,
+ const Mapping<deal_II_dimension,deal_II_dimension+1> *) const;
+ template void GridOut::write<deal_II_dimension,deal_II_dimension+1>
+ (const Triangulation<deal_II_dimension,deal_II_dimension+1> &,
+ std::ostream &, const Mapping<deal_II_dimension,deal_II_dimension+1> *) const;
+
#endif
#if deal_II_dimension == 3
template void GridOut::write_ucd