namespace internal
{
- template <typename> class ReinitRangeFactory;
- template <typename> class ReinitDomainFactory;
-
- /*
- * A factory class internally used in linear_operator.h.
- * Specialization for BlockVector<number>.
- */
- template<typename number>
- class ReinitRangeFactory<BlockVector<number> >
+ namespace LinearOperator
{
- public:
- template <typename Matrix>
- std::function<void(BlockVector<number> &, bool)>
- operator()(const Matrix &matrix)
+ template <typename> class ReinitRangeFactory;
+ template <typename> class ReinitDomainFactory;
+
+ /**
+ * A factory class internally used in linear_operator.h.
+ * Specialization for BlockVector<number>.
+ */
+ template<typename number>
+ class ReinitRangeFactory<BlockVector<number> >
{
- return [&matrix](BlockVector<number> &v, bool fast)
+ public:
+ template <typename Matrix>
+ std::function<void(BlockVector<number> &, bool)>
+ operator()(const Matrix &matrix)
{
- v.reinit(matrix.get_row_indices(), fast);
- };
- }
- };
-
- /*
- * A factory class internally used in linear_operator.h.
- * Specialization for BlockVector<number>.
- */
- template<typename number>
- class ReinitDomainFactory<BlockVector<number> >
- {
- public:
- template <typename Matrix>
- std::function<void(BlockVector<number> &, bool)>
- operator()(const Matrix &matrix)
+ return [&matrix](BlockVector<number> &v, bool fast)
+ {
+ v.reinit(matrix.get_row_indices(), fast);
+ };
+ }
+ };
+
+ /**
+ * A factory class internally used in linear_operator.h.
+ * Specialization for BlockVector<number>.
+ */
+ template<typename number>
+ class ReinitDomainFactory<BlockVector<number> >
{
- return [&matrix](BlockVector<number> &v, bool fast)
+ public:
+ template <typename Matrix>
+ std::function<void(BlockVector<number> &, bool)>
+ operator()(const Matrix &matrix)
{
- v.reinit(matrix.get_column_indices(), fast);
- };
- }
- };
-}
+ return [&matrix](BlockVector<number> &v, bool fast)
+ {
+ v.reinit(matrix.get_column_indices(), fast);
+ };
+ }
+ };
+ } /* namespace LinearOperator */
+} /* namespace internal */
DEAL_II_NAMESPACE_CLOSE
namespace internal
{
- /*
- * A factory class that is responsible for the creation of a
- * reinit_range_vector object for a given pair of vector type Range and matrix
- * type Matrix.
- *
- * The generic version of this class just calls
- * <code>Range::reinit()</code> with the result of
- * <code>Matrix::m()</code>. This class is specialized for more complicated
- * data structures, such as TrilinosWrappers::MPI::Vector, etc.
- */
- template<typename Range>
- class ReinitRangeFactory
+ namespace LinearOperator
{
- public:
- template <typename Matrix>
- std::function<void(Range &, bool)>
- operator()(const Matrix &matrix)
+ /**
+ * A factory class that is responsible for the creation of a
+ * reinit_range_vector object for a given pair of vector type Range and matrix
+ * type Matrix.
+ *
+ * The generic version of this class just calls
+ * <code>Range::reinit()</code> with the result of
+ * <code>Matrix::m()</code>. This class is specialized for more complicated
+ * data structures, such as TrilinosWrappers::MPI::Vector, etc.
+ */
+ template<typename Range>
+ class ReinitRangeFactory
{
- return [&matrix](Range &v, bool fast)
+ public:
+ template <typename Matrix>
+ std::function<void(Range &, bool)>
+ operator()(const Matrix &matrix)
{
- v.reinit(matrix.m(), fast);
- };
- }
- };
+ return [&matrix](Range &v, bool fast)
+ {
+ v.reinit(matrix.m(), fast);
+ };
+ }
+ };
- /*
- * A factory class that is responsible for the creation of a
- * reinit_domain_vector object for a given pair of vector type Domain and
- * matrix type Matrix.
- *
- * The generic version of this class just calls
- * <code>Domain::reinit()</code> with the result of
- * <code>Matrix::n()</code>. This class is specialized for more complicated
- * data structures, such as TrilinosWrappers::MPI::Vector, etc.
- */
- template<typename Domain>
- class ReinitDomainFactory
- {
- public:
- template <typename Matrix>
- std::function<void(Domain &, bool)>
- operator()(const Matrix &matrix)
+ /**
+ * A factory class that is responsible for the creation of a
+ * reinit_domain_vector object for a given pair of vector type Domain and
+ * matrix type Matrix.
+ *
+ * The generic version of this class just calls
+ * <code>Domain::reinit()</code> with the result of
+ * <code>Matrix::n()</code>. This class is specialized for more complicated
+ * data structures, such as TrilinosWrappers::MPI::Vector, etc.
+ */
+ template<typename Domain>
+ class ReinitDomainFactory
{
- return [&matrix](Domain &v, bool fast)
+ public:
+ template <typename Matrix>
+ std::function<void(Domain &, bool)>
+ operator()(const Matrix &matrix)
{
- v.reinit(matrix.n(), fast);
- };
- }
- };
+ return [&matrix](Domain &v, bool fast)
+ {
+ v.reinit(matrix.n(), fast);
+ };
+ }
+ };
+ } /* namespace LinearOperator */
} /* namespace internal */
// or an exemplar cannot usually be copied...
return_op.reinit_range_vector =
- internal::ReinitRangeFactory<Range>().operator()(exemplar);
+ internal::LinearOperator::ReinitRangeFactory<Range>().operator()(exemplar);
return_op.reinit_domain_vector =
- internal::ReinitDomainFactory<Domain>().operator()(exemplar);
+ internal::LinearOperator::ReinitDomainFactory<Domain>().operator()(exemplar);
typename std::conditional<
has_vmult_add<Range, Domain, Matrix>::type::value,
namespace internal
{
- template <typename> class ReinitRangeFactory;
- template <typename> class ReinitDomainFactory;
-
- /*
- * A factory class internally used in linear_operator.h.
- * Specialization for TrilinosWrappers::BlockVector.
- */
- template<>
- class ReinitRangeFactory<TrilinosWrappers::BlockVector>
+ namespace LinearOperator
{
- public:
- template <typename Matrix>
- std::function<void(TrilinosWrappers::BlockVector &, bool)>
- operator()(const Matrix &matrix)
+ template <typename> class ReinitRangeFactory;
+ template <typename> class ReinitDomainFactory;
+
+ /**
+ * A factory class internally used in linear_operator.h. Specialization
+ * for TrilinosWrappers::BlockVector.
+ */
+ template<>
+ class ReinitRangeFactory<TrilinosWrappers::BlockVector>
{
- return [&matrix](TrilinosWrappers::BlockVector &v, bool fast)
+ public:
+ template <typename Matrix>
+ std::function<void(TrilinosWrappers::BlockVector &, bool)>
+ operator()(const Matrix &matrix)
{
- v.reinit(matrix.range_partitioner(), fast);
- };
- }
- };
+ return [&matrix](TrilinosWrappers::BlockVector &v, bool fast)
+ {
+ v.reinit(matrix.range_partitioner(), fast);
+ };
+ }
+ };
- /*
- * A factory class internally used in linear_operator.h.
- * Specialization for TrilinosWrappers::BlockVector.
- */
- template<>
- class ReinitDomainFactory<TrilinosWrappers::BlockVector>
- {
- public:
- template <typename Matrix>
- std::function<void(TrilinosWrappers::BlockVector &, bool)>
- operator()(const Matrix &matrix)
+ /**
+ * A factory class internally used in linear_operator.h. Specialization
+ * for TrilinosWrappers::BlockVector.
+ */
+ template<>
+ class ReinitDomainFactory<TrilinosWrappers::BlockVector>
{
- return [&matrix](TrilinosWrappers::BlockVector &v, bool fast)
+ public:
+ template <typename Matrix>
+ std::function<void(TrilinosWrappers::BlockVector &, bool)>
+ operator()(const Matrix &matrix)
{
- v.reinit(matrix.domain_partitioner(), fast);
- };
- }
- };
+ return [&matrix](TrilinosWrappers::BlockVector &v, bool fast)
+ {
+ v.reinit(matrix.domain_partitioner(), fast);
+ };
+ }
+ };
+ } /* namespace LinearOperator */
} /* namespace internal */
DEAL_II_NAMESPACE_CLOSE
namespace internal
{
- template <typename> class ReinitRangeFactory;
- template <typename> class ReinitDomainFactory;
-
- /*
- * A factory class internally used in linear_operator.h.
- * Specialization for TrilinosWrappers::MPI::BlockVector.
- */
- template<>
- class ReinitRangeFactory<TrilinosWrappers::MPI::BlockVector>
+ namespace LinearOperator
{
- public:
- template <typename Matrix>
- std::function<void(TrilinosWrappers::MPI::BlockVector &, bool)>
- operator()(const Matrix &matrix)
+ template <typename> class ReinitRangeFactory;
+ template <typename> class ReinitDomainFactory;
+
+ /**
+ * A factory class internally used in linear_operator.h. Specialization
+ * for TrilinosWrappers::MPI::BlockVector.
+ */
+ template<>
+ class ReinitRangeFactory<TrilinosWrappers::MPI::BlockVector>
{
- return [&matrix](TrilinosWrappers::MPI::BlockVector &v, bool fast)
+ public:
+ template <typename Matrix>
+ std::function<void(TrilinosWrappers::MPI::BlockVector &, bool)>
+ operator()(const Matrix &matrix)
{
- v.reinit(matrix.range_partitioner(), fast);
- };
- }
- };
-
- /*
- * A factory class internally used in linear_operator.h.
- * Specialization for TrilinosWrappers::MPI::BlockVector.
- */
- template<>
- class ReinitDomainFactory<TrilinosWrappers::MPI::BlockVector>
- {
- public:
- template <typename Matrix>
- std::function<void(TrilinosWrappers::MPI::BlockVector &, bool)>
- operator()(const Matrix &matrix)
+ return [&matrix](TrilinosWrappers::MPI::BlockVector &v, bool fast)
+ {
+ v.reinit(matrix.range_partitioner(), fast);
+ };
+ }
+ };
+
+ /**
+ * A factory class internally used in linear_operator.h. Specialization
+ * for TrilinosWrappers::MPI::BlockVector.
+ */
+ template<>
+ class ReinitDomainFactory<TrilinosWrappers::MPI::BlockVector>
{
- return [&matrix](TrilinosWrappers::MPI::BlockVector &v, bool fast)
+ public:
+ template <typename Matrix>
+ std::function<void(TrilinosWrappers::MPI::BlockVector &, bool)>
+ operator()(const Matrix &matrix)
{
- v.reinit(matrix.domain_partitioner(), fast);
- };
- }
- };
+ return [&matrix](TrilinosWrappers::MPI::BlockVector &v, bool fast)
+ {
+ v.reinit(matrix.domain_partitioner(), fast);
+ };
+ }
+ };
+ } /* namespace LinearOperator */
} /* namespace internal */
namespace internal
{
- template <typename> class ReinitRangeFactory;
- template <typename> class ReinitDomainFactory;
-
- /*
- * A factory class internally used in linear_operator.h.
- * Specialization for TrilinosWrappers::MPI::Vector.
- */
- template<>
- class ReinitRangeFactory<TrilinosWrappers::MPI::Vector>
+ namespace LinearOperator
{
- public:
- template <typename Matrix>
- std::function<void(TrilinosWrappers::MPI::Vector &, bool)>
- operator()(const Matrix &matrix)
+ template <typename> class ReinitRangeFactory;
+ template <typename> class ReinitDomainFactory;
+
+ /**
+ * A factory class internally used in linear_operator.h. Specialization
+ * for TrilinosWrappers::MPI::Vector.
+ */
+ template<>
+ class ReinitRangeFactory<TrilinosWrappers::MPI::Vector>
{
- return [&matrix](TrilinosWrappers::MPI::Vector &v, bool fast)
+ public:
+ template <typename Matrix>
+ std::function<void(TrilinosWrappers::MPI::Vector &, bool)>
+ operator()(const Matrix &matrix)
{
- v.reinit(matrix.range_partitioner(), fast);
- };
- }
- };
+ return [&matrix](TrilinosWrappers::MPI::Vector &v, bool fast)
+ {
+ v.reinit(matrix.range_partitioner(), fast);
+ };
+ }
+ };
- /*
- * A factory class internally used in linear_operator.h.
- * Specialization for TrilinosWrappers::MPI::Vector.
- */
- template<>
- class ReinitDomainFactory<TrilinosWrappers::MPI::Vector>
- {
- public:
- template <typename Matrix>
- std::function<void(TrilinosWrappers::MPI::Vector &, bool)>
- operator()(const Matrix &matrix)
+ /**
+ * A factory class internally used in linear_operator.h. Specialization
+ * for TrilinosWrappers::MPI::Vector.
+ */
+ template<>
+ class ReinitDomainFactory<TrilinosWrappers::MPI::Vector>
{
- return [&matrix](TrilinosWrappers::MPI::Vector &v, bool fast)
+ public:
+ template <typename Matrix>
+ std::function<void(TrilinosWrappers::MPI::Vector &, bool)>
+ operator()(const Matrix &matrix)
{
- v.reinit(matrix.domain_partitioner(), fast);
- };
- }
- };
+ return [&matrix](TrilinosWrappers::MPI::Vector &v, bool fast)
+ {
+ v.reinit(matrix.domain_partitioner(), fast);
+ };
+ }
+ };
- /*
- * A factory class internally used in linear_operator.h.
- * Specialization for TrilinosWrappers::MPI::Vector.
- */
- template<>
- class ReinitRangeFactory<TrilinosWrappers::Vector>
- {
- public:
- template <typename Matrix>
- std::function<void(TrilinosWrappers::Vector &, bool)>
- operator()(const Matrix &matrix)
+ /**
+ * A factory class internally used in linear_operator.h. Specialization
+ * for TrilinosWrappers::MPI::Vector.
+ */
+ template<>
+ class ReinitRangeFactory<TrilinosWrappers::Vector>
{
- return [&matrix](TrilinosWrappers::Vector &v, bool fast)
+ public:
+ template <typename Matrix>
+ std::function<void(TrilinosWrappers::Vector &, bool)>
+ operator()(const Matrix &matrix)
{
- v.reinit(matrix.range_partitioner(), fast);
- };
- }
- };
+ return [&matrix](TrilinosWrappers::Vector &v, bool fast)
+ {
+ v.reinit(matrix.range_partitioner(), fast);
+ };
+ }
+ };
- /*
- * A factory class internally used in linear_operator.h.
- * Specialization for TrilinosWrappers::MPI::Vector.
- */
- template<>
- class ReinitDomainFactory<TrilinosWrappers::Vector>
- {
- public:
- template <typename Matrix>
- std::function<void(TrilinosWrappers::Vector &, bool)>
- operator()(const Matrix &matrix)
+ /**
+ * A factory class internally used in linear_operator.h. Specialization
+ * for TrilinosWrappers::MPI::Vector.
+ */
+ template<>
+ class ReinitDomainFactory<TrilinosWrappers::Vector>
{
- return [&matrix](TrilinosWrappers::Vector &v, bool fast)
+ public:
+ template <typename Matrix>
+ std::function<void(TrilinosWrappers::Vector &, bool)>
+ operator()(const Matrix &matrix)
{
- v.reinit(matrix.domain_partitioner(), fast);
- };
- }
- };
+ return [&matrix](TrilinosWrappers::Vector &v, bool fast)
+ {
+ v.reinit(matrix.domain_partitioner(), fast);
+ };
+ }
+ };
+ } /* namespace LinearOperator */
} /* namespace internal */