* computed. It defaults to the
* first component.
*/
- template <int dim>
+ template <int dim, class InputVector>
static void
approximate_gradient (const Mapping<dim> &mapping,
const DoFHandler<dim> &dof,
- const Vector<double> &solution,
+ const InputVector &solution,
Vector<float> &derivative_norm,
const unsigned int component = 0);
* function, see above, with
* @p{mapping=MappingQ1<dim>()}.
*/
- template <int dim>
+ template <int dim, class InputVector>
static void
approximate_gradient (const DoFHandler<dim> &dof,
- const Vector<double> &solution,
+ const InputVector &solution,
Vector<float> &derivative_norm,
const unsigned int component = 0);
* computed. It defaults to the
* first component.
*/
- template <int dim>
+ template <int dim, class InputVector>
static void
approximate_second_derivative (const Mapping<dim> &mapping,
const DoFHandler<dim> &dof,
- const Vector<double> &solution,
+ const InputVector &solution,
Vector<float> &derivative_norm,
const unsigned int component = 0);
* function, see above, with
* @p{mapping=MappingQ1<dim>()}.
*/
- template <int dim>
+ template <int dim, class InputVector>
static void
approximate_second_derivative (const DoFHandler<dim> &dof,
- const Vector<double> &solution,
+ const InputVector &solution,
Vector<float> &derivative_norm,
const unsigned int component = 0);
* field at the center of each
* cell).
*/
+ template <class InputVector>
static ProjectedDerivative
get_projected_derivative (const FEValues<dim> &fe_values,
- const Vector<double> &solution,
+ const InputVector &solution,
const unsigned int component);
/**
* field at the center of each
* cell).
*/
+ template <class InputVector>
static ProjectedDerivative
get_projected_derivative (const FEValues<dim> &fe_values,
- const Vector<double> &solution,
+ const InputVector &solution,
const unsigned int component);
/**
* solution vector we are to work
* on.
*/
- template <class DerivativeDescription, int dim>
+ template <class DerivativeDescription, int dim, class InputVector>
static void
approximate_derivative (const Mapping<dim> &mapping,
const DoFHandler<dim> &dof,
- const Vector<double> &solution,
+ const InputVector &solution,
const unsigned int component,
Vector<float> &derivative_norm);
* the range given by the third
* parameter.
*/
- template <class DerivativeDescription, int dim>
+ template <class DerivativeDescription, int dim, class InputVector>
static void
approximate (const Mapping<dim> &mapping,
const DoFHandler<dim> &dof,
- const Vector<double> &solution,
+ const InputVector &solution,
const unsigned int component,
const IndexInterval &index_interval,
Vector<float> &derivative_norm);
#include <base/thread_management.h>
#include <base/multithread_info.h>
#include <lac/vector.h>
+#include <lac/block_vector.h>
#include <grid/tria_iterator.h>
#include <dofs/dof_accessor.h>
#include <dofs/dof_handler.h>
template <int dim>
+template <class InputVector>
inline
typename DerivativeApproximation::Gradient<dim>::ProjectedDerivative
DerivativeApproximation::Gradient<dim>::
get_projected_derivative (const FEValues<dim> &fe_values,
- const Vector<double> &solution,
+ const InputVector &solution,
const unsigned int component)
{
if (fe_values.get_fe().n_components() == 1)
template <int dim>
+template <class InputVector>
inline
typename DerivativeApproximation::SecondDerivative<dim>::ProjectedDerivative
DerivativeApproximation::SecondDerivative<dim>::
get_projected_derivative (const FEValues<dim> &fe_values,
- const Vector<double> &solution,
+ const InputVector &solution,
const unsigned int component)
{
if (fe_values.get_fe().n_components() == 1)
-template <int dim>
+template <int dim, class InputVector>
void
DerivativeApproximation::
approximate_gradient (const Mapping<dim> &mapping,
const DoFHandler<dim> &dof_handler,
- const Vector<double> &solution,
+ const InputVector &solution,
Vector<float> &derivative_norm,
const unsigned int component)
{
}
-template <int dim>
+template <int dim, class InputVector>
void
DerivativeApproximation::
approximate_gradient (const DoFHandler<dim> &dof_handler,
- const Vector<double> &solution,
+ const InputVector &solution,
Vector<float> &derivative_norm,
const unsigned int component)
{
}
-template <int dim>
+template <int dim, class InputVector>
void
DerivativeApproximation::
approximate_second_derivative (const Mapping<dim> &mapping,
const DoFHandler<dim> &dof_handler,
- const Vector<double> &solution,
+ const InputVector &solution,
Vector<float> &derivative_norm,
const unsigned int component)
{
}
-template <int dim>
+template <int dim, class InputVector>
void
DerivativeApproximation::
approximate_second_derivative (const DoFHandler<dim> &dof_handler,
- const Vector<double> &solution,
+ const InputVector &solution,
Vector<float> &derivative_norm,
const unsigned int component)
{
}
-template <class DerivativeDescription, int dim>
+template <class DerivativeDescription, int dim, class InputVector>
void
DerivativeApproximation::
approximate_derivative (const Mapping<dim> &mapping,
const DoFHandler<dim> &dof_handler,
- const Vector<double> &solution,
+ const InputVector &solution,
const unsigned int component,
Vector<float> &derivative_norm)
{
Threads::ThreadGroup<> threads;
void (*fun_ptr) (const Mapping<dim> &,
const DoFHandler<dim> &,
- const Vector<double> &,
+ const InputVector &,
const unsigned int ,
const IndexInterval &,
Vector<float> &)
- = &DerivativeApproximation::template approximate<DerivativeDescription,dim>;
+ = &DerivativeApproximation::template approximate<DerivativeDescription,dim,InputVector>;
for (unsigned int i=0; i<n_threads; ++i)
threads += Threads::spawn (fun_ptr)(mapping, dof_handler, solution, component,
index_intervals[i],
-template <class DerivativeDescription, int dim>
+template <class DerivativeDescription, int dim, class InputVector>
void
DerivativeApproximation::approximate (const Mapping<dim> &mapping,
const DoFHandler<dim> &dof_handler,
- const Vector<double> &solution,
+ const InputVector &solution,
const unsigned int component,
const IndexInterval &index_interval,
Vector<float> &derivative_norm)
void
DerivativeApproximation::
approximate_gradient<deal_II_dimension>
+(const Mapping<deal_II_dimension> &mapping,
+ const DoFHandler<deal_II_dimension> &dof_handler,
+ const BlockVector<double> &solution,
+ Vector<float> &derivative_norm,
+ const unsigned int component);
+
+template
+void
+DerivativeApproximation::
+approximate_gradient<deal_II_dimension>
(const DoFHandler<deal_II_dimension> &dof_handler,
const Vector<double> &solution,
Vector<float> &derivative_norm,
const unsigned int component);
+template
+void
+DerivativeApproximation::
+approximate_gradient<deal_II_dimension>
+(const DoFHandler<deal_II_dimension> &dof_handler,
+ const BlockVector<double> &solution,
+ Vector<float> &derivative_norm,
+ const unsigned int component);
+
template
void
DerivativeApproximation::
const Vector<double> &solution,
Vector<float> &derivative_norm,
const unsigned int component);
+
+template
+void
+DerivativeApproximation::
+approximate_second_derivative<deal_II_dimension>
+(const Mapping<deal_II_dimension> &mapping,
+ const DoFHandler<deal_II_dimension> &dof_handler,
+ const BlockVector<double> &solution,
+ Vector<float> &derivative_norm,
+ const unsigned int component);
+
template
void
DerivativeApproximation::
Vector<float> &derivative_norm,
const unsigned int component);
+template
+void
+DerivativeApproximation::
+approximate_second_derivative<deal_II_dimension>
+(const DoFHandler<deal_II_dimension> &dof_handler,
+ const BlockVector<double> &solution,
+ Vector<float> &derivative_norm,
+ const unsigned int component);
+
+
// static variables
//
// on AIX, the linker is unhappy about some missing symbols. they