}
#endif
-// forward declaration
-template <typename> class ReinitRangeFactory;
-template <typename> class ReinitDomainFactory;
-
/*! @addtogroup Vectors
*@{
}
-/**
- * Specialization for BlockVector<number>.
- */
-template<typename number>
-class ReinitRangeFactory<BlockVector<number> >
+namespace internal
{
-public:
+ template <typename> class ReinitRangeFactory;
+ template <typename> class ReinitDomainFactory;
- template <typename Matrix>
- std::function<void(BlockVector<number> &, bool)>
- operator()(const Matrix &matrix)
+ /*
+ * 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);
- };
- }
-};
-
-
-/**
- * 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);
+ };
+ }
+ };
+}
DEAL_II_NAMESPACE_CLOSE
-/**
- * \relates LinearOperator
- *
- * 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 internal
{
-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);
+ };
+ }
+ };
-/**
- * \relates LinearOperator
- *
- * 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 internal */
namespace
class MatrixInterfaceWithVmultAdd
{
public:
-
template <typename Matrix>
void operator()(LinearOperator<Range, Domain> &op, const Matrix &matrix)
{
class MatrixInterfaceWithoutVmultAdd
{
public:
-
template <typename Matrix>
void operator()(LinearOperator<Range, Domain> &op, const Matrix &matrix)
{
// or an exemplar cannot usually be copied...
return_op.reinit_range_vector =
- ReinitRangeFactory<Range>().operator()(exemplar);
+ internal::ReinitRangeFactory<Range>().operator()(exemplar);
return_op.reinit_domain_vector =
- ReinitDomainFactory<Domain>().operator()(exemplar);
+ internal::ReinitDomainFactory<Domain>().operator()(exemplar);
typename std::conditional<
has_vmult_add<Range, Domain, Matrix>::type::value,
} /* namespace TrilinosWrappers */
-
-/**
- * Specialization for TrilinosWrappers::MPI::BlockVector.
- */
-template<>
-class ReinitRangeFactory<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);
- };
- }
-};
-
-
-/**
- * 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.domain_partitioner(), fast);
- };
- }
-};
+/*@}*/
-/**
- * Specialization for TrilinosWrappers::BlockVector.
- */
-template<>
-class ReinitRangeFactory<TrilinosWrappers::BlockVector>
+namespace internal
{
-public:
+ template <typename> class ReinitRangeFactory;
+ template <typename> class ReinitDomainFactory;
- 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 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);
- };
- }
-};
-
-
-/**
- * Specialization for TrilinosWrappers::BlockVector.
- */
-template<>
-class ReinitDomainFactory<TrilinosWrappers::BlockVector>
-{
-public:
+ return [&matrix](TrilinosWrappers::BlockVector &v, bool fast)
+ {
+ v.reinit(matrix.range_partitioner(), fast);
+ };
+ }
+ };
- 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 internal */
DEAL_II_NAMESPACE_CLOSE
u.swap (v);
}
- } /* end of namespace MPI */
+ } /* namespace MPI */
-}
+} /* namespace TrilinosWrappers */
/*@}*/
+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>
+ {
+ 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>
+ {
+ 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.domain_partitioner(), fast);
+ };
+ }
+ };
+} /* namespace internal */
+
+
+
DEAL_II_NAMESPACE_CLOSE
#endif // DEAL_II_WITH_TRILINOS
// forward declaration
template <typename> class Vector;
-template <typename> class ReinitRangeFactory;
-template <typename> class ReinitDomainFactory;
-
/**
* @addtogroup TrilinosWrappers
* @{
#endif
-
} /* namespace TrilinosWrappers */
+/*@}*/
-/**
- * Specialization for TrilinosWrappers::MPI::Vector.
- */
-template<>
-class ReinitRangeFactory<TrilinosWrappers::MPI::Vector>
+
+namespace internal
{
-public:
+ template <typename> class ReinitRangeFactory;
+ template <typename> class ReinitDomainFactory;
- 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 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);
- };
- }
-};
-
-
-/**
- * Specialization for TrilinosWrappers::MPI::Vector.
- */
-template<>
-class ReinitDomainFactory<TrilinosWrappers::MPI::Vector>
-{
-public:
+ return [&matrix](TrilinosWrappers::MPI::Vector &v, bool fast)
+ {
+ v.reinit(matrix.range_partitioner(), fast);
+ };
+ }
+ };
- 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);
- };
- }
-};
-
-
-/**
- * Specialization for TrilinosWrappers::MPI::Vector.
- */
-template<>
-class ReinitRangeFactory<TrilinosWrappers::Vector>
-{
-public:
+ return [&matrix](TrilinosWrappers::MPI::Vector &v, bool fast)
+ {
+ v.reinit(matrix.domain_partitioner(), fast);
+ };
+ }
+ };
- 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);
- };
- }
-};
-
-
-/**
- * Specialization for TrilinosWrappers::MPI::Vector.
- */
-template<>
-class ReinitDomainFactory<TrilinosWrappers::Vector>
-{
-public:
+ return [&matrix](TrilinosWrappers::Vector &v, bool fast)
+ {
+ v.reinit(matrix.range_partitioner(), fast);
+ };
+ }
+ };
- 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 internal */
-/*@}*/
DEAL_II_NAMESPACE_CLOSE