class FECollection : public Subscriptor
{
public:
+ /**
+ * Default constructor. Leads
+ * to an empty collection that
+ * can later be filled using
+ * push_back().
+ */
+ FECollection ();
+
+ /**
+ * Conversion constructor. This
+ * constructor creates a
+ * FECollection from a single
+ * finite element. More finite
+ * element objects can be added
+ * with push_back(), if
+ * desired, though it would
+ * probably be clearer to add
+ * all mappings the same way.
+ */
+ FECollection (const FiniteElement<dim> &fe);
+
+ /**
+ * Copy constructor.
+ */
+ FECollection (const FECollection<dim> &fe_collection);
+
/**
* Add a finite element. This
* function generates a copy of
{
public:
/**
- * Default constructor. Initialises
- * this MappingCollection.
+ * Default constructor. Leads
+ * to an empty collection that
+ * can later be filled using
+ * push_back().
*/
MappingCollection ();
{
public:
/**
- * Default constructor. Initialises
- * this QCollection.
+ * Default constructor. Leads
+ * to an empty collection that
+ * can later be filled using
+ * push_back().
*/
QCollection ();
/**
* Conversion constructor. This
- * constructor creates a QCollection
- * from a single quadrature rule. In
- * the newly created QCollection, this
- * quadrature is used for all active_fe
- * indices.
+ * constructor creates a
+ * QCollection from a single
+ * quadrature rule. More
+ * quadrature formulas can be
+ * added with push_back(), if
+ * desired, though it would
+ * probably be clearer to add
+ * all mappings the same way.
*/
QCollection (const Quadrature<dim> &quadrature);
+ /**
+ * Copy constructor.
+ */
+ QCollection (const QCollection<dim> &q_collection);
+
/**
* Adds a new quadrature rule
* to the QCollection. The
namespace hp
{
+ template <int dim>
+ FECollection<dim>::FECollection ()
+ {}
+
+
+
+ template <int dim>
+ FECollection<dim>::FECollection (const FiniteElement<dim> &fe)
+ {
+ push_back (fe);
+ }
+
+
+
+ template <int dim>
+ FECollection<dim>::
+ FECollection (const FECollection<dim> &fe_collection)
+ :
+ Subscriptor (),
+ // copy the array
+ // of shared
+ // pointers. nothing
+ // bad should
+ // happen -- they
+ // simply all point
+ // to the same
+ // objects, and the
+ // last one to die
+ // will delete the
+ // mappings
+ finite_elements (fe_collection.finite_elements)
+ {}
+
+
+
template <int dim>
void FECollection<dim>::push_back (const FiniteElement<dim> &new_fe)
{
template <int dim>
- inline
+ QCollection<dim>::
+ QCollection (const QCollection<dim> &q_collection)
+ :
+ Subscriptor (),
+ // copy the array
+ // of shared
+ // pointers. nothing
+ // bad should
+ // happen -- they
+ // simply all point
+ // to the same
+ // objects, and the
+ // last one to die
+ // will delete the
+ // mappings
+ quadratures (q_collection.quadratures),
+ single_quadrature (true)
+ {}
+
+
+
+ template <int dim>
const Quadrature<dim> &
QCollection<dim>::operator[] (const unsigned int index) const
{