16 #ifndef dealii__filtered_matrix_h 17 #define dealii__filtered_matrix_h 21 #include <deal.II/base/config.h> 22 #include <deal.II/base/smartpointer.h> 23 #include <deal.II/base/thread_management.h> 24 #include <deal.II/base/memory_consumption.h> 25 #include <deal.II/lac/pointer_matrix.h> 26 #include <deal.II/lac/vector_memory.h> 30 DEAL_II_NAMESPACE_OPEN
32 template <
class VectorType>
class FilteredMatrixBlock;
191 template <
typename VectorType>
212 const size_type
index);
218 size_type
row()
const;
228 double value()
const;
262 const size_type
index);
282 const Accessor *operator-> ()
const;
342 template <
typename MatrixType>
360 template <
typename MatrixType>
394 template <
class Constra
intList>
414 const bool matrix_is_symmetric)
const DEAL_II_DEPRECATED;
425 void vmult (VectorType &dst,
426 const VectorType &src)
const;
433 void Tvmult (VectorType &dst,
434 const VectorType &src)
const;
444 const VectorType &src)
const;
454 const VectorType &src)
const;
508 bool operator () (
const IndexValuePair &i1,
509 const IndexValuePair &i2)
const;
515 std_cxx11::shared_ptr<PointerMatrixBase<VectorType> >
matrix;
535 VectorType &out)
const;
541 friend class FilteredMatrixBlock<VectorType>;
550 template<
typename VectorType>
565 template<
typename VectorType>
575 template<
typename VectorType>
585 template<
typename VectorType>
595 template<
typename VectorType>
607 template<
typename VectorType>
613 accessor(matrix, index)
618 template<
typename VectorType>
628 template <
typename number>
637 template <
typename number>
646 template <
typename number>
657 template <
typename number>
663 return ! (*
this == other);
670 template <
typename number>
679 template <
typename number>
688 template <
typename VectorType>
695 return (i1.first < i2.first);
700 template <
typename VectorType>
701 template <
typename MatrixType>
706 matrix.reset (new_pointer_matrix_base(m, VectorType()));
713 template <
typename VectorType>
722 template <
typename VectorType>
734 template <
typename VectorType>
735 template <
typename MatrixType>
748 template <
typename VectorType>
761 template <
typename VectorType>
772 template <
typename VectorType>
773 template <
class Constra
intList>
780 constraints.reserve (old_size + new_constraints.size());
782 new_constraints.begin(),
783 new_constraints.end());
794 template <
typename VectorType>
800 std::vector<IndexValuePair> empty;
806 template <
typename VectorType>
817 template <
typename VectorType>
828 template <
typename VectorType>
835 tmp_vector->reinit(v);
841 (*tmp_vector)(i->first) = -i->second;
853 v(i->first) = i->second;
858 template <
typename VectorType>
873 template <
typename VectorType>
877 VectorType &out)
const 886 out(i->first) = in(i->first);
892 template <
typename VectorType>
900 VectorType *tmp_vector = mem.
alloc();
903 tmp_vector->reinit(src,
true);
907 matrix->
vmult (dst, *tmp_vector);
908 mem.
free(tmp_vector);
912 matrix->
vmult (dst, src);
921 template <
typename VectorType>
929 VectorType *tmp_vector = mem.
alloc();
932 tmp_vector->reinit(src,
true);
936 matrix->
Tvmult (dst, *tmp_vector);
937 mem.
free(tmp_vector);
941 matrix->
Tvmult (dst, src);
950 template <
typename VectorType>
958 VectorType *tmp_vector = mem.
alloc();
961 tmp_vector->reinit(src,
true);
966 mem.
free(tmp_vector);
979 template <
typename VectorType>
987 VectorType *tmp_vector = mem.
alloc();
990 tmp_vector->reinit(src,
true);
995 mem.
free(tmp_vector);
1008 template <
typename VectorType>
1019 DEAL_II_NAMESPACE_CLOSE
void initialize(const MatrixType &m, const bool expect_constrained_source=false)
const FilteredMatrix< VectorType > * matrix
bool operator()(const IndexValuePair &i1, const IndexValuePair &i2) const
std::size_t memory_consumption() const
std_cxx11::shared_ptr< PointerMatrixBase< VectorType > > matrix
types::global_dof_index size_type
const_iterator & operator++()
void apply_constraints(VectorType &v, const bool matrix_is_symmetric) const 1
std::vector< IndexValuePair >::const_iterator const_index_value_iterator
std::vector< IndexValuePair > constraints
static::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
FilteredMatrix & operator=(const FilteredMatrix &fm)
Accessor(const FilteredMatrix< VectorType > *matrix, const size_type index)
void add_constraint(const size_type i, const double v)
const_iterator end() const
unsigned int global_dof_index
virtual VectorType * alloc()
#define Assert(cond, exc)
bool expect_constrained_source
virtual void free(const VectorType *const)
void Tvmult(VectorType &dst, const VectorType &src) const
void Tvmult_add(VectorType &dst, const VectorType &src) const
void add_constraints(const ConstraintList &new_constraints)
static::ExceptionBase & ExcIteratorPastEnd()
std_cxx11::enable_if< std_cxx11::is_fundamental< T >::value, std::size_t >::type memory_consumption(const T &t)
void post_filter(const VectorType &in, VectorType &out) const
std::pair< size_type, double > IndexValuePair
const_iterator begin() const
const_iterator(const FilteredMatrix< VectorType > *matrix, const size_type index)
void vmult(VectorType &dst, const VectorType &src) const
bool operator==(const const_iterator &) const
void pre_filter(VectorType &v) const
void vmult_add(VectorType &dst, const VectorType &src) const
bool operator!=(const const_iterator &) const
const Accessor * operator->() const
#define AssertIsFinite(number)
const Accessor & operator*() const