// ---------------------------------------------------------------------
//
-// Copyright (C) 2001 - 2014 by the deal.II authors
+// Copyright (C) 2001 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
* FESystem<dim> fe(FE_Q<dim>(2), dim, FE_Q<dim>(1), 1);
* DoFHandler<dim> dof_handler(triangulation);
* dof_handler.distribute_dofs(fe);
- * Vector<double> soln_vector(dof_handler.n_dofs());
- * MappingQEulerian<dim> q2_mapping(2,soln_vector,dof_handler);
+ * Vector<double> displacement_field(dof_handler.n_dofs());
+ * // ... compute displacement field somehow...
+ * MappingQEulerian<dim> q2_mapping(2, dof_handler, displacement_field);
* @endcode
*
* In this example, our element consists of <tt>(dim+1)</tt> components. Only
{
public:
/**
- * Constructor. The first argument is the polynomical degree of the desired
- * Qp mapping. It then takes a <tt>Vector<double> &</tt> to specify the
- * transformation of the domain from the reference to the current
- * configuration. The organization of the elements in the @p Vector must
- * follow the concept how deal.II stores solutions that are associated to a
- * triangulation. This is automatically the case if the @p Vector
- * represents the solution of the previous step of a nonlinear problem.
- * Alternatively, the @p Vector can be initialized by
- * <tt>DoFAccessor::set_dof_values()</tt>.
+ * Constructor.
+ *
+ * @param[in] degree The polynomical degree of the desired
+ * $Q_p$ mapping.
+ * @param[in] euler_dof_handler A DoFHandler object that defines a
+ * finite element space. This space needs to have at least dim
+ * components and the first dim components of the space will
+ * be considered displacements relative to the original positions
+ * of the cells of the triangulation.
+ * @param[in] euler_vector A finite element function in the
+ * space defined by the second argument. The first dim components
+ * of this function will be interpreted as the displacement we
+ * use in definining the mapping, relative to the location of cells
+ * of the underlying triangulation.
*/
+ MappingQEulerian (const unsigned int degree,
+ const DoFHandler<dim,spacedim> &euler_dof_handler,
+ const VECTOR &euler_vector);
- MappingQEulerian (const unsigned int degree,
- const VECTOR &euler_vector,
- const DoFHandler<dim,spacedim> &euler_dof_handler);
+ /**
+ * @deprecated Use the constructor with the reverse order of
+ * second and third argument.
+ */
+ MappingQEulerian (const unsigned int degree,
+ const VECTOR &euler_vector,
+ const DoFHandler<dim,spacedim> &euler_dof_handler) DEAL_II_DEPRECATED;
/**
* Return a pointer to a copy of the present object. The caller of this copy
// ---------------------------------------------------------------------
//
-// Copyright (C) 2001 - 2014 by the deal.II authors
+// Copyright (C) 2001 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
+template <int dim, class EulerVectorType, int spacedim>
+MappingQEulerian<dim, EulerVectorType, spacedim>::
+MappingQEulerian (const unsigned int degree,
+ const DoFHandler<dim,spacedim> &euler_dof_handler,
+ const EulerVectorType &euler_vector)
+ :
+ MappingQ<dim,spacedim>(degree, true),
+ euler_vector(&euler_vector),
+ euler_dof_handler(&euler_dof_handler),
+ support_quadrature(degree),
+ fe_values(euler_dof_handler.get_fe(),
+ support_quadrature,
+ update_values | update_q_points)
+{ }
+
+
+
template <int dim, class EulerVectorType, int spacedim>
Mapping<dim,spacedim> *
MappingQEulerian<dim, EulerVectorType, spacedim>::clone () const