From 5502071c022a8725a66fbd506fa77042285ceed3 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 17 Apr 2020 17:46:05 -0400 Subject: [PATCH] Fix source --- source/base/index_set.cc | 2 ++ source/differentiation/ad/ad_drivers.cc | 8 +++++ .../sd/symengine_scalar_operations.cc | 4 +++ .../sd/symengine_tensor_operations.cc | 4 +++ .../differentiation/sd/symengine_utilities.cc | 4 +++ source/grid/tria_objects.cc | 4 ++- source/lac/block_sparsity_pattern.cc | 2 ++ source/lac/petsc_matrix_base.cc | 2 ++ source/lac/petsc_parallel_sparse_matrix.cc | 2 ++ source/lac/petsc_sparse_matrix.cc | 2 ++ source/lac/petsc_vector_base.cc | 2 ++ source/lac/read_write_vector.cc | 4 ++- source/lac/sparsity_pattern.cc | 6 ++-- source/lac/trilinos_block_sparse_matrix.cc | 4 +++ source/lac/trilinos_precondition.cc | 2 ++ source/lac/trilinos_precondition_ml.cc | 2 ++ source/lac/trilinos_precondition_muelu.cc | 2 ++ source/lac/trilinos_sparsity_pattern.cc | 2 ++ source/lac/trilinos_vector.cc | 15 ++++----- source/lac/vector.cc | 33 ++++++++++--------- source/numerics/time_dependent.cc | 2 ++ 21 files changed, 80 insertions(+), 28 deletions(-) diff --git a/source/base/index_set.cc b/source/base/index_set.cc index 089fd80b7f..55524adf7c 100644 --- a/source/base/index_set.cc +++ b/source/base/index_set.cc @@ -159,6 +159,7 @@ IndexSet::do_compress() const +#ifndef DOXYGEN IndexSet IndexSet::operator&(const IndexSet &is) const { Assert(size() == is.size(), ExcDimensionMismatch(size(), is.size())); @@ -202,6 +203,7 @@ IndexSet IndexSet::operator&(const IndexSet &is) const result.compress(); return result; } +#endif diff --git a/source/differentiation/ad/ad_drivers.cc b/source/differentiation/ad/ad_drivers.cc index fe3e85e4e0..fe937fd23e 100644 --- a/source/differentiation/ad/ad_drivers.cc +++ b/source/differentiation/ad/ad_drivers.cc @@ -256,6 +256,7 @@ namespace Differentiation # ifdef DEAL_II_WITH_ADOLC +# ifndef DOXYGEN // Specialization for taped ADOL-C auto-differentiable numbers. template @@ -273,6 +274,7 @@ namespace Differentiation , vbufsize(0u) , tbufsize(0u) {} +# endif template @@ -1464,6 +1466,7 @@ namespace Differentiation } +# ifndef DOXYGEN template std::vector TapedDrivers< @@ -1477,6 +1480,7 @@ namespace Differentiation std::copy(in.begin(), in.end(), out.begin()); return out; } +# endif // ------------- TapelessDrivers ------------- @@ -1715,6 +1719,7 @@ namespace Differentiation // reverse mode to compute the first derivatives (and, if supported, // forward mode for the second). +# ifndef DOXYGEN template TapelessDrivers< ADNumberType, @@ -1725,6 +1730,7 @@ namespace Differentiation NumberTypes::sacado_rad_dfad>::type>::TapelessDrivers() : dependent_variable_marking_safe(false) {} +# endif template @@ -1983,6 +1989,7 @@ namespace Differentiation // forward mode to compute the first (and, if supported, second) // derivatives. +# ifndef DOXYGEN template TapelessDrivers< ADNumberType, @@ -1995,6 +2002,7 @@ namespace Differentiation NumberTypes::sacado_dfad_dfad>::type>::TapelessDrivers() : dependent_variable_marking_safe(false) {} +# endif template diff --git a/source/differentiation/sd/symengine_scalar_operations.cc b/source/differentiation/sd/symengine_scalar_operations.cc index 33a5069f0f..aaec10c781 100644 --- a/source/differentiation/sd/symengine_scalar_operations.cc +++ b/source/differentiation/sd/symengine_scalar_operations.cc @@ -74,6 +74,7 @@ namespace Differentiation /* ---------------- Symbol map creation and manipulation --------------*/ +# ifndef DOXYGEN namespace internal { bool @@ -161,6 +162,7 @@ namespace Differentiation for (const auto &entry : symbol_values) set_value_in_symbol_map(substitution_map, entry.first, entry.second); } +# endif /* ------------------ Symbol substitution map creation ----------------*/ @@ -175,6 +177,7 @@ namespace Differentiation } +# ifndef DOXYGEN /* ---------------- Symbolic substitution map enlargement --------------*/ @@ -260,6 +263,7 @@ namespace Differentiation { return expression.substitute(substitution_map); } +# endif // DOXYGEN } // namespace SD } // namespace Differentiation diff --git a/source/differentiation/sd/symengine_tensor_operations.cc b/source/differentiation/sd/symengine_tensor_operations.cc index 0cfce17dcd..3abe49924f 100644 --- a/source/differentiation/sd/symengine_tensor_operations.cc +++ b/source/differentiation/sd/symengine_tensor_operations.cc @@ -240,6 +240,7 @@ namespace Differentiation } +# ifndef DOXYGEN template Tensor<1, dim, Expression> make_vector_of_symbolic_functions(const std::string & sym, @@ -247,6 +248,7 @@ namespace Differentiation { return internal::Symbol_Function_Tensor<1, dim>::create(sym, arguments); } +# endif template @@ -265,6 +267,7 @@ namespace Differentiation } +# ifndef DOXYGEN template Tensor make_tensor_of_symbolic_functions(const std::string & sym, @@ -284,6 +287,7 @@ namespace Differentiation return internal::Symbol_Function_SymmetricTensor::create( sym, arguments); } +# endif // DOXYGEN } // namespace SD } // namespace Differentiation diff --git a/source/differentiation/sd/symengine_utilities.cc b/source/differentiation/sd/symengine_utilities.cc index d7fed2e219..9bf3798608 100644 --- a/source/differentiation/sd/symengine_utilities.cc +++ b/source/differentiation/sd/symengine_utilities.cc @@ -30,6 +30,7 @@ namespace Differentiation namespace Utilities { +# ifndef DOXYGEN SE::map_basic_basic convert_expression_map_to_basic_map( const SD::types::substitution_map &substitution_map) @@ -39,6 +40,7 @@ namespace Differentiation sub_map[entry.first.get_RCP()] = entry.second.get_RCP(); return sub_map; } +# endif SE::vec_basic @@ -53,6 +55,7 @@ namespace Differentiation } +# ifndef DOXYGEN SD::types::symbol_vector extract_symbols(const SD::types::substitution_map &substitution_values) { @@ -64,6 +67,7 @@ namespace Differentiation return symbols; } +# endif } // namespace Utilities diff --git a/source/grid/tria_objects.cc b/source/grid/tria_objects.cc index 6e583bf967..914f13806d 100644 --- a/source/grid/tria_objects.cc +++ b/source/grid/tria_objects.cc @@ -454,10 +454,12 @@ namespace internal // explicit instantiations +#ifndef DOXYGEN template class TriaObjects>; template class TriaObjects>; -#include "tria_objects.inst" +# include "tria_objects.inst" +#endif } // namespace TriangulationImplementation } // namespace internal diff --git a/source/lac/block_sparsity_pattern.cc b/source/lac/block_sparsity_pattern.cc index f7b21935ef..2ffc8a7c23 100644 --- a/source/lac/block_sparsity_pattern.cc +++ b/source/lac/block_sparsity_pattern.cc @@ -273,6 +273,7 @@ BlockSparsityPatternBase::print(std::ostream &out) const } +#ifndef DOXYGEN template <> void BlockSparsityPatternBase::print(std::ostream &out) const @@ -299,6 +300,7 @@ BlockSparsityPatternBase::print(std::ostream &out) const k += block(ib, 0).n_rows(); } } +#endif template diff --git a/source/lac/petsc_matrix_base.cc b/source/lac/petsc_matrix_base.cc index 45d8e54ab6..e904755d2b 100644 --- a/source/lac/petsc_matrix_base.cc +++ b/source/lac/petsc_matrix_base.cc @@ -29,6 +29,7 @@ namespace PETScWrappers { namespace MatrixIterators { +# ifndef DOXYGEN void MatrixBase::const_iterator::Accessor::visit_present_row() { @@ -68,6 +69,7 @@ namespace PETScWrappers ierr = MatRestoreRow(*matrix, this->a_row, &ncols, &colnums, &values); AssertThrow(ierr == 0, ExcPETScError(ierr)); } +# endif } // namespace MatrixIterators diff --git a/source/lac/petsc_parallel_sparse_matrix.cc b/source/lac/petsc_parallel_sparse_matrix.cc index 22c7dd1bae..3af36ce1c0 100644 --- a/source/lac/petsc_parallel_sparse_matrix.cc +++ b/source/lac/petsc_parallel_sparse_matrix.cc @@ -607,6 +607,7 @@ namespace PETScWrappers } } +# ifndef DOXYGEN // explicit instantiations // template SparseMatrix::SparseMatrix(const MPI_Comm &, @@ -671,6 +672,7 @@ namespace PETScWrappers SparseMatrix::do_reinit(const IndexSet &, const IndexSet &, const DynamicSparsityPattern &); +# endif PetscScalar diff --git a/source/lac/petsc_sparse_matrix.cc b/source/lac/petsc_sparse_matrix.cc index 43339dbfa7..c3ffb4cda1 100644 --- a/source/lac/petsc_sparse_matrix.cc +++ b/source/lac/petsc_sparse_matrix.cc @@ -286,6 +286,7 @@ namespace PETScWrappers MatrixBase::Tmmult(C, B, V); } +# ifndef DOXYGEN // Explicit instantiations // template SparseMatrix::SparseMatrix(const SparsityPattern &, const bool); @@ -301,6 +302,7 @@ namespace PETScWrappers SparseMatrix::do_reinit(const SparsityPattern &, const bool); template void SparseMatrix::do_reinit(const DynamicSparsityPattern &, const bool); +# endif } // namespace PETScWrappers diff --git a/source/lac/petsc_vector_base.cc b/source/lac/petsc_vector_base.cc index 328af05d32..bf041f291d 100644 --- a/source/lac/petsc_vector_base.cc +++ b/source/lac/petsc_vector_base.cc @@ -32,6 +32,7 @@ namespace PETScWrappers { namespace internal { +# ifndef DOXYGEN VectorReference::operator PetscScalar() const { AssertIndexRange(index, vector.size()); @@ -109,6 +110,7 @@ namespace PETScWrappers return value; } +# endif } // namespace internal VectorBase::VectorBase() diff --git a/source/lac/read_write_vector.cc b/source/lac/read_write_vector.cc index a40c0e4e43..66fd754fc6 100644 --- a/source/lac/read_write_vector.cc +++ b/source/lac/read_write_vector.cc @@ -40,6 +40,7 @@ namespace LinearAlgebra #undef TEMPL_COPY_CONSTRUCTOR +#ifndef DOXYGEN template void ReadWriteVector::import( const distributed::Vector &, @@ -51,7 +52,7 @@ namespace LinearAlgebra const distributed::Vector &, VectorOperation::values, const std::shared_ptr &); -#ifdef DEAL_II_WITH_COMPLEX_VALUES +# ifdef DEAL_II_WITH_COMPLEX_VALUES template void ReadWriteVector>::import( const distributed::Vector, ::dealii::MemorySpace::Host> @@ -65,6 +66,7 @@ namespace LinearAlgebra &, VectorOperation::values, const std::shared_ptr &); +# endif #endif } // namespace LinearAlgebra diff --git a/source/lac/sparsity_pattern.cc b/source/lac/sparsity_pattern.cc index a47a6e04a0..7aceed174c 100644 --- a/source/lac/sparsity_pattern.cc +++ b/source/lac/sparsity_pattern.cc @@ -1043,6 +1043,7 @@ SparsityPattern::memory_consumption() const +#ifndef DOXYGEN // explicit instantiations template void SparsityPattern::copy_from(const FullMatrix &); @@ -1055,7 +1056,7 @@ SparsityPattern::add_entries( const size_type *, const size_type *, const bool); -#ifndef DEAL_II_VECTOR_ITERATOR_IS_POINTER +# ifndef DEAL_II_VECTOR_ITERATOR_IS_POINTER template void SparsityPattern::add_entries< std::vector::const_iterator>( @@ -1063,12 +1064,13 @@ SparsityPattern::add_entries< std::vector::const_iterator, std::vector::const_iterator, const bool); -#endif +# endif template void SparsityPattern::add_entries::iterator>( const size_type, std::vector::iterator, std::vector::iterator, const bool); +#endif DEAL_II_NAMESPACE_CLOSE diff --git a/source/lac/trilinos_block_sparse_matrix.cc b/source/lac/trilinos_block_sparse_matrix.cc index 39c9e763da..6c0f5b55ac 100644 --- a/source/lac/trilinos_block_sparse_matrix.cc +++ b/source/lac/trilinos_block_sparse_matrix.cc @@ -38,6 +38,7 @@ namespace TrilinosWrappers +# ifndef DOXYGEN void BlockSparseMatrix::reinit(const size_type n_block_rows, const size_type n_block_columns) @@ -63,6 +64,7 @@ namespace TrilinosWrappers this->sub_objects[r][c] = p; } } +# endif @@ -366,6 +368,7 @@ namespace TrilinosWrappers +# ifndef DOXYGEN // -------------------- explicit instantiations ----------------------- // template void @@ -387,6 +390,7 @@ namespace TrilinosWrappers const dealii::BlockDynamicSparsityPattern &, const MPI_Comm &, const bool); +# endif // DOXYGEN } // namespace TrilinosWrappers diff --git a/source/lac/trilinos_precondition.cc b/source/lac/trilinos_precondition.cc index b8512ae3ad..9cf2f2ca94 100644 --- a/source/lac/trilinos_precondition.cc +++ b/source/lac/trilinos_precondition.cc @@ -788,6 +788,7 @@ namespace TrilinosWrappers dst = src; } +# ifndef DOXYGEN void PreconditionIdentity::vmult( LinearAlgebra::distributed::Vector & dst, @@ -803,6 +804,7 @@ namespace TrilinosWrappers { dst = src; } +# endif // DOXYGEN } // namespace TrilinosWrappers DEAL_II_NAMESPACE_CLOSE diff --git a/source/lac/trilinos_precondition_ml.cc b/source/lac/trilinos_precondition_ml.cc index efa499f45b..38855b1346 100644 --- a/source/lac/trilinos_precondition_ml.cc +++ b/source/lac/trilinos_precondition_ml.cc @@ -339,6 +339,7 @@ namespace TrilinosWrappers +# ifndef DOXYGEN // explicit instantiations template void PreconditionAMG::initialize(const ::dealii::SparseMatrix &, @@ -350,6 +351,7 @@ namespace TrilinosWrappers const AdditionalData &, const double, const ::dealii::SparsityPattern *); +# endif diff --git a/source/lac/trilinos_precondition_muelu.cc b/source/lac/trilinos_precondition_muelu.cc index 55f0b78f16..ed1ae4ee58 100644 --- a/source/lac/trilinos_precondition_muelu.cc +++ b/source/lac/trilinos_precondition_muelu.cc @@ -259,6 +259,7 @@ namespace TrilinosWrappers +# ifndef DOXYGEN // explicit instantiations template void PreconditionAMGMueLu::initialize(const ::dealii::SparseMatrix &, @@ -270,6 +271,7 @@ namespace TrilinosWrappers const AdditionalData &, const double, const ::dealii::SparsityPattern *); +# endif } // namespace TrilinosWrappers diff --git a/source/lac/trilinos_sparsity_pattern.cc b/source/lac/trilinos_sparsity_pattern.cc index 968631b477..290bfa848e 100644 --- a/source/lac/trilinos_sparsity_pattern.cc +++ b/source/lac/trilinos_sparsity_pattern.cc @@ -1192,6 +1192,7 @@ namespace TrilinosWrappers } +# ifndef DOXYGEN // explicit instantiations // template void @@ -1245,6 +1246,7 @@ namespace TrilinosWrappers const dealii::DynamicSparsityPattern &, const MPI_Comm &, bool); +# endif } // namespace TrilinosWrappers diff --git a/source/lac/trilinos_vector.cc b/source/lac/trilinos_vector.cc index bcf72804de..408f32af22 100644 --- a/source/lac/trilinos_vector.cc +++ b/source/lac/trilinos_vector.cc @@ -38,6 +38,7 @@ DEAL_II_NAMESPACE_OPEN namespace TrilinosWrappers { +# ifndef DOXYGEN namespace internal { VectorReference::operator TrilinosScalar() const @@ -62,6 +63,7 @@ namespace TrilinosWrappers return (*(vector.vector))[0][local_index]; } } // namespace internal +# endif namespace MPI { @@ -882,15 +884,12 @@ namespace TrilinosWrappers this->local_size() * (sizeof(double) + sizeof(TrilinosWrappers::types::int_type)); } - } /* end of namespace MPI */ -} /* end of namespace TrilinosWrappers */ -namespace TrilinosWrappers -{ - namespace MPI - { -# include "trilinos_vector.inst" - } + // explicit instantiations +# ifndef DOXYGEN +# include "trilinos_vector.inst" +# endif + } // namespace MPI } // namespace TrilinosWrappers DEAL_II_NAMESPACE_CLOSE diff --git a/source/lac/vector.cc b/source/lac/vector.cc index c747e14c22..10267c0976 100644 --- a/source/lac/vector.cc +++ b/source/lac/vector.cc @@ -17,13 +17,14 @@ DEAL_II_NAMESPACE_OPEN -#include "vector.inst" +#ifndef DOXYGEN +# include "vector.inst" -#ifndef DEAL_II_WITH_COMPLEX_VALUES +# ifndef DEAL_II_WITH_COMPLEX_VALUES // instantiate for std::complex since we are using it internally in // FESeries. template class Vector>; -#endif +# endif // instantiate for integers: template class Vector; @@ -44,36 +45,36 @@ template long double Vector:: // arguments is covered by the default copy constructor and copy operator that // is declared separately) -#define TEMPL_COPY_CONSTRUCTOR(S1, S2) \ - template Vector::Vector(const Vector &); \ - template Vector &Vector::operator=(const Vector &) +# define TEMPL_COPY_CONSTRUCTOR(S1, S2) \ + template Vector::Vector(const Vector &); \ + template Vector &Vector::operator=(const Vector &) TEMPL_COPY_CONSTRUCTOR(double, float); TEMPL_COPY_CONSTRUCTOR(float, double); -#ifdef DEAL_II_WITH_COMPLEX_VALUES +# ifdef DEAL_II_WITH_COMPLEX_VALUES TEMPL_COPY_CONSTRUCTOR(std::complex, std::complex); TEMPL_COPY_CONSTRUCTOR(std::complex, std::complex); -#endif +# endif -#undef TEMPL_COPY_CONSTRUCTOR +# undef TEMPL_COPY_CONSTRUCTOR -#define TEMPL_OP_EQ(S1, S2) \ - template void Vector::scale(const Vector &); \ - template void Vector::equ(const S1, const Vector &) +# define TEMPL_OP_EQ(S1, S2) \ + template void Vector::scale(const Vector &); \ + template void Vector::equ(const S1, const Vector &) TEMPL_OP_EQ(double, float); TEMPL_OP_EQ(float, double); -#ifdef DEAL_II_WITH_COMPLEX_VALUES +# ifdef DEAL_II_WITH_COMPLEX_VALUES TEMPL_OP_EQ(std::complex, std::complex); TEMPL_OP_EQ(std::complex, std::complex); -#endif - -#undef TEMPL_OP_EQ +# endif +# undef TEMPL_OP_EQ +#endif template <> diff --git a/source/numerics/time_dependent.cc b/source/numerics/time_dependent.cc index d58f5e8e72..0a8f7331bf 100644 --- a/source/numerics/time_dependent.cc +++ b/source/numerics/time_dependent.cc @@ -432,6 +432,7 @@ TimeStepBase_Tria::TimeStepBase_Tria() +#ifndef DOXYGEN template TimeStepBase_Tria::TimeStepBase_Tria( const double time, @@ -444,6 +445,7 @@ TimeStepBase_Tria::TimeStepBase_Tria( , flags(flags) , refinement_flags(refinement_flags) {} +#endif -- 2.39.5