@DEAL_II_EXPAND_TRILINOS_MPI_VECTOR@;
@DEAL_II_EXPAND_PETSC_VECTOR@;
@DEAL_II_EXPAND_PETSC_MPI_VECTOR@;
+ @DEAL_II_EXPAND_PARALUTION_VECTOR_FLOAT@;
+ @DEAL_II_EXPAND_PARALUTION_VECTOR_DOUBLE@;
@DEAL_II_EXPAND_TRILINOS_BLOCKVECTOR@;
@DEAL_II_EXPAND_TRILINOS_MPI_BLOCKVECTOR@;
EXTERNAL_SEQUENTIAL_VECTORS := { @DEAL_II_EXPAND_TRILINOS_VECTOR@;
@DEAL_II_EXPAND_TRILINOS_BLOCKVECTOR@;
@DEAL_II_EXPAND_PETSC_VECTOR@;
- @DEAL_II_EXPAND_PETSC_BLOCKVECTOR@
+ @DEAL_II_EXPAND_PETSC_BLOCKVECTOR@;
+ @DEAL_II_EXPAND_PARALUTION_VECTOR_FLOAT@;
+ @DEAL_II_EXPAND_PARALUTION_VECTOR_DOUBLE@;
}
EXTERNAL_PARALLEL_VECTORS := { @DEAL_II_EXPAND_TRILINOS_MPI_VECTOR@;
@DEAL_II_EXPAND_TRILINOS_MPI_BLOCKVECTOR@;
@DEAL_II_EXPAND_PETSC_MPI_VECTOR@;
- @DEAL_II_EXPAND_PETSC_MPI_BLOCKVECTOR@
+ @DEAL_II_EXPAND_PETSC_MPI_BLOCKVECTOR@;
}
VECTORS_WITH_MATRIX := { Vector<double>;
# Configuration for the paralution library:
#
-#
-# The user has to know the location of the PARALUTION headers as well:
-#
-SET(PARALUTION_ADD_TO_USER_INCLUDE_DIRS TRUE)
+MACRO(FEATURE_PARALUTION_CONFIGURE_EXTERNAL)
+
+ SET(PARALUTION_ADD_TO_USER_INCLUDE_DIRS TRUE)
+ REGISTER_FEATURE(PARALUTION)
+
+ SET(DEAL_II_EXPAND_PARALUTION_VECTOR_FLOAT "ParalutionWrappers::Vector<float>")
+ SET(DEAL_II_EXPAND_PARALUTION_VECTOR_DOUBLE "ParalutionWrappers::Vector<double>")
+
+ENDMACRO()
CONFIGURE_FEATURE(PARALUTION)
//TODO look to add fast
void reinit(const size_type N);
+ /**
+ * Change the dimension of the vector to that of the vector v. The vector
+ * is filled with zeros.
+ */
+ void reinit(const Vector<Number> &v);
+
/**
* Return dimension of the vector.
*/
* cannot be moved.
*/
const_iterator end() const;
+
+ /**
+ * $l_2$-norm of the vector. The ssquare root of the sum of the squares of
+ * the elements.
+ */
+ Number l2_norm() const;
//@}
/**
*/
void add(const Number s);
+ /**
+ * Simple addition of a multiple of a vector, i.e. <tt>*this += a*V</tt>.
+ */
+ void add(const Number a,
+ const Vector<Number> &v);
+
/**
* Scale each element of the vector by a constant value.
*/
+ template <typename Number>
+ void Vector<Number>::reinit(const Vector<Number> &v)
+ {
+ local_vector.Clear();
+ local_vector.Allocate("deal_ii_vector",v.size());
+ }
+
+
+
template <typename Number>
inline std::size_t Vector<Number>::size() const
{
+ template <typename Number>
+ inline Number Vector<Number>::l2_norm() const
+ {
+ return local_vector.Norm();
+ }
+
+
+
template <typename Number>
inline Number Vector<Number>::operator() (const size_type i) const
{
}
+ template <typename Number>
+ inline void Vector<Number>::add(const Number a,const Vector<Number> &v)
+ {
+ Assert(numbers::is_finite(a),ExcNumberNotFinite());
+ Assert(size()==v.size(),ExcDimensionMismatch(size(),v.size()));
+
+ local_vector.ScaleAddScale(1.,v.paralution_vector(),a);
+ }
+
+
template <typename Number>
inline Vector<Number>& Vector<Number>::operator*= (const Number factor)
/**
* Simple addition of a multiple
- * of a vector, i.e. <tt>*this =
+ * of a vector, i.e. <tt>*this +=
* a*V</tt>.
*/
void add (const TrilinosScalar a,
/**
* Multiple addition of scaled
- * vectors, i.e. <tt>*this = a*V +
+ * vectors, i.e. <tt>*this += a*V +
* b*W</tt>.
*/
void add (const TrilinosScalar a,
#include <deal.II/lac/petsc_block_vector.h>
#include <deal.II/lac/trilinos_vector.h>
#include <deal.II/lac/trilinos_block_vector.h>
+#include <deal.II/lac/paralution_vector.h>
DEAL_II_NAMESPACE_OPEN
#include <deal.II/lac/petsc_block_vector.h>
#include <deal.II/lac/trilinos_vector.h>
#include <deal.II/lac/trilinos_block_vector.h>
+#include <deal.II/lac/paralution_vector.h>
#include <deal.II/lac/sparse_matrix.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/lac/petsc_block_vector.h>
#include <deal.II/lac/trilinos_vector.h>
#include <deal.II/lac/trilinos_block_vector.h>
+#include <deal.II/lac/paralution_vector.h>
#include <deal.II/lac/sparse_matrix.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/lac/trilinos_sparse_matrix.h>
#include <deal.II/lac/trilinos_block_sparse_matrix.h>
#include <deal.II/lac/matrix_block.h>
+#include <deal.II/lac/paralution_vector.h>
#include <algorithm>
#include <numeric>
#include <deal.II/lac/petsc_block_vector.h>
#include <deal.II/lac/trilinos_vector.h>
#include <deal.II/lac/trilinos_block_vector.h>
+#include <deal.II/lac/paralution_vector.h>
#include <deal.II/meshworker/vector_selector.templates.h>
#include <deal.II/lac/petsc_block_vector.h>
#include <deal.II/lac/trilinos_vector.h>
#include <deal.II/lac/trilinos_block_vector.h>
+#include <deal.II/lac/paralution_vector.h>
#include <deal.II/multigrid/mg_base.h>
#include <deal.II/lac/petsc_block_vector.h>
#include <deal.II/lac/trilinos_vector.h>
#include <deal.II/lac/trilinos_block_vector.h>
+#include <deal.II/lac/paralution_vector.h>
#include <deal.II/numerics/data_out.h>
#include <deal.II/numerics/data_out_dof_data.h>
#include <deal.II/dofs/dof_handler.h>