// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002 by the deal authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
= 0
#endif
;
+
+ /**
+ * Assignment operator. This is
+ * here only so that you can have
+ * objects of derived classes in
+ * containers, or assign them
+ * otherwise. It will raise an
+ * exception if the object from
+ * which you assign has a
+ * different number of components
+ * than the one being assigned
+ * to.
+ */
+ Function & operator= (const Function &f);
/**
* Return the value of the
* value.
*/
unsigned int memory_consumption () const;
+
+ /**
+ * Exception
+ */
+ DeclException2 (ExcNumberOfComponents,
+ int, int,
+ << "You can only assign function objects with the same "
+ << "number of components. However, here the left operand "
+ << "has " << arg1 << " components, and the right operand "
+ << arg2 << " components.");
};
{}
+
+template <int dim>
+Function<dim> & Function<dim>::operator= (const Function &f)
+{
+ Assert (n_components == f.n_components,
+ ExcNumberOfComponents(n_components,f.n_components));
+ return *this;
+}
+
+
template <int dim>
double Function<dim>::value (const Point<dim> &,
const unsigned int) const
<h3>base</h3>
<ol>
+ <li> <p>
+ New: The <code class="class">Function</code> class now has an assignment
+ operator. This way, you can put function objects into
+ containers. However, the assignment operator makes sure that only
+ objects can be assigned that have the same number of vector components.
+ <br>
+ (WB 2003/02/06)
+ </p>
+
<li> <p>
Fixed: The <code class="class">PosixThreadManager</code> called
its <code class="member">wait</code> function in the