From 352537aca67097f2903fa6dfa7a212b042187953 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Mon, 25 Apr 2016 22:07:20 +0200 Subject: [PATCH] Remove long double instantiations. --- cmake/config/template-arguments.in | 17 ++--------- include/deal.II/lac/full_matrix.h | 8 ++---- include/deal.II/lac/vector.h | 8 ++---- include/deal.II/lac/vector_view.h | 8 ++---- .../numerics/matrix_creator.templates.h | 17 ----------- source/lac/constraint_matrix.cc | 4 --- source/lac/full_matrix.cc | 25 ++++++++--------- source/lac/vector.cc | 28 +++---------------- source/matrix_free/matrix_free.cc | 1 - source/matrix_free/matrix_free.inst.in | 3 -- source/meshworker/mesh_worker.cc | 1 - source/meshworker/mesh_worker_info.inst.in | 7 ----- source/multigrid/mg_level_global_transfer.cc | 5 ++-- .../mg_level_global_transfer.inst.in | 3 -- tests/base/functions_13.cc | 2 -- tests/lac/la_vector_accumulation_01.cc | 3 -- tests/lac/la_vector_add_and_dot.cc | 3 -- tests/lac/la_vector_add_and_dot.output | 5 ---- tests/lac/la_vector_norms.cc | 3 -- tests/lac/la_vector_vector.cc | 4 --- tests/lac/la_vector_vector.output | 25 ----------------- 21 files changed, 30 insertions(+), 150 deletions(-) diff --git a/cmake/config/template-arguments.in b/cmake/config/template-arguments.in index fea18cf762..b3e4595a62 100644 --- a/cmake/config/template-arguments.in +++ b/cmake/config/template-arguments.in @@ -1,8 +1,7 @@ BOOL := { true; false } -REAL_SCALARS := { double; float; long double } +REAL_SCALARS := { double; float } COMPLEX_SCALARS := { std::complex; - std::complex; - std::complex } + std::complex } DERIVATIVE_TENSORS := { double; Tensor<1,deal_II_dimension>; @@ -12,19 +11,15 @@ DEAL_II_VEC_TEMPLATES := { Vector; BlockVector } SERIAL_VECTORS := { Vector; Vector ; - Vector; BlockVector; BlockVector; - BlockVector; parallel::distributed::Vector; parallel::distributed::Vector ; - parallel::distributed::Vector; parallel::distributed::BlockVector; parallel::distributed::BlockVector ; - parallel::distributed::BlockVector; @DEAL_II_EXPAND_TRILINOS_VECTOR@; @DEAL_II_EXPAND_TRILINOS_MPI_VECTOR@; @@ -39,24 +34,20 @@ SERIAL_VECTORS := { Vector; REAL_SERIAL_VECTORS := { Vector; Vector ; - Vector; BlockVector; BlockVector; - BlockVector; parallel::distributed::Vector; parallel::distributed::Vector ; - parallel::distributed::Vector; parallel::distributed::BlockVector; parallel::distributed::BlockVector ; - parallel::distributed::BlockVector; @DEAL_II_EXPAND_TRILINOS_VECTOR@; @DEAL_II_EXPAND_TRILINOS_MPI_VECTOR@; @DEAL_II_EXPAND_PETSC_VECTOR_REAL@; - @DEAL_II_EXPAND_PETSC_MPI_VECTOR_REAL@; + @DEAL_II_EXPAND_PETSC_MPI_VECTOR_REAL@; @DEAL_II_EXPAND_TRILINOS_BLOCKVECTOR@; @DEAL_II_EXPAND_TRILINOS_MPI_BLOCKVECTOR@; @@ -78,11 +69,9 @@ EXTERNAL_PARALLEL_VECTORS := { @DEAL_II_EXPAND_TRILINOS_MPI_VECTOR@; VECTORS_WITH_MATRIX := { Vector; Vector ; - Vector; BlockVector; BlockVector; - BlockVector; parallel::distributed::Vector; diff --git a/include/deal.II/lac/full_matrix.h b/include/deal.II/lac/full_matrix.h index 9cadd62a46..7ebaf927cf 100644 --- a/include/deal.II/lac/full_matrix.h +++ b/include/deal.II/lac/full_matrix.h @@ -52,11 +52,9 @@ template class LAPACKFullMatrix; * matrix number type is used. * * @note Instantiations for this template are provided for @, - * @, @, @@>, - * @@>, @@>; others - * can be generated in application programs (see the section on - * @ref Instantiations - * in the manual). + * @, @@>, + * @@>. Others can be generated in application + * programs (see the section on @ref Instantiations in the manual). * * @author Guido Kanschat, Franz-Theo Suttmeier, Wolfgang Bangerth, 1993-2004 */ diff --git a/include/deal.II/lac/vector.h b/include/deal.II/lac/vector.h index 6123fe7a76..47dba123e0 100644 --- a/include/deal.II/lac/vector.h +++ b/include/deal.II/lac/vector.h @@ -104,11 +104,9 @@ struct VectorOperation * suitable for numerical computations. * * @note Instantiations for this template are provided for @, - * @, @, @@>, - * @@>, @@>; others - * can be generated in application programs (see the section on - * @ref Instantiations - * in the manual). + * @, @@>, @@>; + * others can be generated in application programs (see the section on + * @ref Instantiations in the manual). * * @author Guido Kanschat, Franz-Theo Suttmeier, Wolfgang Bangerth */ diff --git a/include/deal.II/lac/vector_view.h b/include/deal.II/lac/vector_view.h index 1d3dcc9536..298ead3026 100644 --- a/include/deal.II/lac/vector_view.h +++ b/include/deal.II/lac/vector_view.h @@ -120,11 +120,9 @@ DEAL_II_NAMESPACE_OPEN * * * @note Instantiations for this template are provided for @, - * @, @, @@>, - * @@>, @@>; others - * can be generated in application programs (see the section on - * @ref Instantiations - * in the manual). + * @, @@>, @@>; + * others can be generated in application programs (see the section on + * @ref Instantiations in the manual). * * @author Luca Heltai, 2009 */ diff --git a/include/deal.II/numerics/matrix_creator.templates.h b/include/deal.II/numerics/matrix_creator.templates.h index 72c90ddc36..685d5e2028 100644 --- a/include/deal.II/numerics/matrix_creator.templates.h +++ b/include/deal.II/numerics/matrix_creator.templates.h @@ -1177,23 +1177,6 @@ namespace MatrixCreator Assert(false,ExcNotImplemented()); } - template <> - void - inline - create_boundary_mass_matrix_1<1,3,long double> (DoFHandler<1,3>::active_cell_iterator const &/*cell*/, - MatrixCreator::internal::AssemblerBoundary::Scratch const &, - MatrixCreator::internal::AssemblerBoundary::CopyData,long double > &/*copy_data*/, - Mapping<1,3> const &, - FiniteElement<1,3> const &, - Quadrature<0> const &, - std::map*> const &/*boundary_functions*/, - Function<3,long double> const *const /*coefficient*/, - std::vector const &/*component_mapping*/) - { - Assert(false,ExcNotImplemented()); - } - } diff --git a/source/lac/constraint_matrix.cc b/source/lac/constraint_matrix.cc index 0391d54e33..2ed652a1c5 100644 --- a/source/lac/constraint_matrix.cc +++ b/source/lac/constraint_matrix.cc @@ -1295,14 +1295,12 @@ PARALLEL_VECTOR_FUNCTIONS(TrilinosWrappers::MPI::BlockVector); bool , \ internal::bool2type) const -MATRIX_FUNCTIONS(SparseMatrix); MATRIX_FUNCTIONS(SparseMatrix); MATRIX_FUNCTIONS(SparseMatrix); MATRIX_FUNCTIONS(FullMatrix); MATRIX_FUNCTIONS(FullMatrix); MATRIX_FUNCTIONS(FullMatrix >); MATRIX_FUNCTIONS(SparseMatrix >); -MATRIX_FUNCTIONS(SparseMatrix >); MATRIX_FUNCTIONS(SparseMatrix >); BLOCK_MATRIX_FUNCTIONS(BlockSparseMatrix); @@ -1420,10 +1418,8 @@ namespace internals SCRATCH_INITIALIZER(double,double); SCRATCH_INITIALIZER(float,float); - SCRATCH_INITIALIZER(long double,ldouble); SCRATCH_INITIALIZER(std::complex,cdouble); SCRATCH_INITIALIZER(std::complex,cfloat); - SCRATCH_INITIALIZER(std::complex,cldouble); #undef SCRATCH_INITIALIZER } diff --git a/source/lac/full_matrix.cc b/source/lac/full_matrix.cc index 7994f58b96..1d92039af5 100644 --- a/source/lac/full_matrix.cc +++ b/source/lac/full_matrix.cc @@ -20,6 +20,18 @@ DEAL_II_NAMESPACE_OPEN #include "full_matrix.inst" +// instantiate for long double manually because we use it in a few places +// inside the library +template class FullMatrix; +template void FullMatrix::invert (const FullMatrix &); +template void FullMatrix::mmult (FullMatrix &, const FullMatrix &, const bool) const; +template void FullMatrix::Tmmult (FullMatrix &, const FullMatrix &, const bool) const; +template void FullMatrix::mTmult (FullMatrix &, const FullMatrix &, const bool) const; +template void FullMatrix::TmTmult (FullMatrix &, const FullMatrix &, const bool) const; +template void FullMatrix::vmult(Vector &, const Vector &, bool) const; +template void FullMatrix::Tvmult(Vector &, const Vector &, bool) const; +template void FullMatrix::add (const long double, const FullMatrix &); + // This is needed if PETSc was compiled with complex, though, it may // be used elsewhere too. template void dealii::FullMatrix::vmult >(dealii::Vector > &, dealii::Vector > const &, bool) const; @@ -36,22 +48,9 @@ template void dealii::FullMatrix::vmult >(dealii::V TEMPL_OP_EQ(double,float); TEMPL_OP_EQ(float,double); -TEMPL_OP_EQ(long double,double); -TEMPL_OP_EQ(double,long double); - -TEMPL_OP_EQ(long double,float); -TEMPL_OP_EQ(float,long double); - - TEMPL_OP_EQ(std::complex,std::complex); TEMPL_OP_EQ(std::complex,std::complex); -TEMPL_OP_EQ(std::complex,std::complex); -TEMPL_OP_EQ(std::complex,std::complex); - -TEMPL_OP_EQ(std::complex,std::complex); -TEMPL_OP_EQ(std::complex,std::complex); - #undef TEMPL_OP_EQ DEAL_II_NAMESPACE_CLOSE diff --git a/source/lac/vector.cc b/source/lac/vector.cc index e7bf7fbe34..4f23c08d2d 100644 --- a/source/lac/vector.cc +++ b/source/lac/vector.cc @@ -26,6 +26,10 @@ template Vector &Vector::operator= (const dealii::Vector::reinit(const Vector &, const bool); +// instantiate for long double manually because we use it in a few places: +template class Vector; +template long double Vector::operator *(const Vector &) const; + // do a few functions that currently don't fit the scheme because they have // two template arguments that need to be different (the case of same @@ -40,22 +44,10 @@ void Vector::reinit(const Vector &, const bool); TEMPL_COPY_CONSTRUCTOR(double,float); TEMPL_COPY_CONSTRUCTOR(float,double); -TEMPL_COPY_CONSTRUCTOR(long double,double); -TEMPL_COPY_CONSTRUCTOR(double,long double); - -TEMPL_COPY_CONSTRUCTOR(long double,float); -TEMPL_COPY_CONSTRUCTOR(float,long double); - TEMPL_COPY_CONSTRUCTOR(std::complex,std::complex); TEMPL_COPY_CONSTRUCTOR(std::complex,std::complex); -TEMPL_COPY_CONSTRUCTOR(std::complex,std::complex); -TEMPL_COPY_CONSTRUCTOR(std::complex,std::complex); - -TEMPL_COPY_CONSTRUCTOR(std::complex,std::complex); -TEMPL_COPY_CONSTRUCTOR(std::complex,std::complex); - #endif #undef TEMPL_COPY_CONSTRUCTOR @@ -68,22 +60,10 @@ TEMPL_COPY_CONSTRUCTOR(std::complex,std::complex); TEMPL_OP_EQ(double,float); TEMPL_OP_EQ(float,double); -TEMPL_OP_EQ(long double,double); -TEMPL_OP_EQ(double,long double); - -TEMPL_OP_EQ(long double,float); -TEMPL_OP_EQ(float,long double); - TEMPL_OP_EQ(std::complex,std::complex); TEMPL_OP_EQ(std::complex,std::complex); -TEMPL_OP_EQ(std::complex,std::complex); -TEMPL_OP_EQ(std::complex,std::complex); - -TEMPL_OP_EQ(std::complex,std::complex); -TEMPL_OP_EQ(std::complex,std::complex); - #undef TEMPL_OP_EQ DEAL_II_NAMESPACE_CLOSE diff --git a/source/matrix_free/matrix_free.cc b/source/matrix_free/matrix_free.cc index 21622d873a..d6a07ec0f4 100644 --- a/source/matrix_free/matrix_free.cc +++ b/source/matrix_free/matrix_free.cc @@ -26,6 +26,5 @@ DEAL_II_NAMESPACE_OPEN template struct internal::MatrixFreeFunctions::ShapeInfo; template struct internal::MatrixFreeFunctions::ShapeInfo; -template struct internal::MatrixFreeFunctions::ShapeInfo; DEAL_II_NAMESPACE_CLOSE diff --git a/source/matrix_free/matrix_free.inst.in b/source/matrix_free/matrix_free.inst.in index 6e1115a1ae..f1feaf3d16 100644 --- a/source/matrix_free/matrix_free.inst.in +++ b/source/matrix_free/matrix_free.inst.in @@ -39,8 +39,5 @@ for (deal_II_dimension : DIMENSIONS) template void internal::MatrixFreeFunctions::ShapeInfo::reinit (const Quadrature<1> &, const FiniteElement &, const unsigned int); - template void internal::MatrixFreeFunctions::ShapeInfo::reinit - (const Quadrature<1> &, const FiniteElement - &, const unsigned int); #endif } diff --git a/source/meshworker/mesh_worker.cc b/source/meshworker/mesh_worker.cc index 5b50bc2933..d8936cf7c1 100644 --- a/source/meshworker/mesh_worker.cc +++ b/source/meshworker/mesh_worker.cc @@ -56,7 +56,6 @@ namespace MeshWorker template class LocalResults; template class LocalResults; - template class LocalResults; template LocalIntegrator::LocalIntegrator () diff --git a/source/meshworker/mesh_worker_info.inst.in b/source/meshworker/mesh_worker_info.inst.in index 2cf38c8fe2..0b3e620e6e 100644 --- a/source/meshworker/mesh_worker_info.inst.in +++ b/source/meshworker/mesh_worker_info.inst.in @@ -35,13 +35,6 @@ namespace MeshWorker template void IntegrationInfo::fill_local_data( const DoFInfo&, bool); - template class DoFInfo; - template class DoFInfoBox >; - - template void IntegrationInfo::fill_local_data( - const DoFInfo&, bool); - // template void IntegrationInfo // ::initialize >( // const FiniteElement&, const Mapping&, diff --git a/source/multigrid/mg_level_global_transfer.cc b/source/multigrid/mg_level_global_transfer.cc index 936865af18..12c2ed4698 100644 --- a/source/multigrid/mg_level_global_transfer.cc +++ b/source/multigrid/mg_level_global_transfer.cc @@ -579,10 +579,9 @@ MGLevelGlobalTransfer >::memory_consumptio // explicit instantiation #include "mg_level_global_transfer.inst" -// create two additional instantiations currently not supported by the -// automatic template instantiation scheme +// create an additional instantiation currently not supported by the automatic +// template instantiation scheme template class MGLevelGlobalTransfer >; -template class MGLevelGlobalTransfer >; DEAL_II_NAMESPACE_CLOSE diff --git a/source/multigrid/mg_level_global_transfer.inst.in b/source/multigrid/mg_level_global_transfer.inst.in index 8e7a292c3e..4fee9d260e 100644 --- a/source/multigrid/mg_level_global_transfer.inst.in +++ b/source/multigrid/mg_level_global_transfer.inst.in @@ -45,9 +45,6 @@ for (deal_II_dimension : DIMENSIONS) template void MGLevelGlobalTransfer< parallel::distributed::Vector >::fill_and_communicate_copy_indices( const DoFHandler &mg_dof); - template - void MGLevelGlobalTransfer< parallel::distributed::Vector >::fill_and_communicate_copy_indices( - const DoFHandler &mg_dof); } for (deal_II_dimension : DIMENSIONS; S1, S2 : REAL_SCALARS) diff --git a/tests/base/functions_13.cc b/tests/base/functions_13.cc index 4cad108c96..96d08d00b1 100644 --- a/tests/base/functions_13.cc +++ b/tests/base/functions_13.cc @@ -45,11 +45,9 @@ int main() MyFunction<1, std::complex > function_1; MyFunction<2, std::complex > function_2; - MyFunction<3, std::complex > function_3; MyTensorFunction<1, 1, std::complex > tensor_function_1; MyTensorFunction<2, 2, std::complex > tensor_function_2; - MyTensorFunction<3, 3, std::complex > tensor_function_3; deallog << "OK" << std::endl; } diff --git a/tests/lac/la_vector_accumulation_01.cc b/tests/lac/la_vector_accumulation_01.cc index c8b2b9d179..6cecb47fd5 100644 --- a/tests/lac/la_vector_accumulation_01.cc +++ b/tests/lac/la_vector_accumulation_01.cc @@ -58,9 +58,6 @@ int main() check_norms(); check_norms(); - check_norms(); check_norms >(); deallog << "OK" << std::endl; } - - diff --git a/tests/lac/la_vector_add_and_dot.cc b/tests/lac/la_vector_add_and_dot.cc index d4f7524acc..9b71237c59 100644 --- a/tests/lac/la_vector_add_and_dot.cc +++ b/tests/lac/la_vector_add_and_dot.cc @@ -83,9 +83,6 @@ int main() check(); check(); - check(); check >(); deallog << "OK" << std::endl; } - - diff --git a/tests/lac/la_vector_add_and_dot.output b/tests/lac/la_vector_add_and_dot.output index 000e9a6333..c732258cab 100644 --- a/tests/lac/la_vector_add_and_dot.output +++ b/tests/lac/la_vector_add_and_dot.output @@ -12,11 +12,6 @@ DEAL::Add and dot should be 13.40, is 13.40 DEAL::Add and dot should be 26.50, is 26.50 DEAL::Add and dot should be 39.61, is 39.61 DEAL::Add and dot should be 52.71, is 52.71 -DEAL::Add and dot should be 0.30, is 0.30 -DEAL::Add and dot should be 13.40, is 13.40 -DEAL::Add and dot should be 26.50, is 26.50 -DEAL::Add and dot should be 39.61, is 39.61 -DEAL::Add and dot should be 52.71, is 52.71 DEAL::Add and dot should be (0.30,0.00), is (0.30,0.00) DEAL::Add and dot should be (13.40,0.00), is (13.40,0.00) DEAL::Add and dot should be (26.50,0.00), is (26.50,0.00) diff --git a/tests/lac/la_vector_norms.cc b/tests/lac/la_vector_norms.cc index 4789c47882..102030fcb5 100644 --- a/tests/lac/la_vector_norms.cc +++ b/tests/lac/la_vector_norms.cc @@ -108,10 +108,7 @@ int main() check_norms(); check_norms(); - check_norms(); check_complex_norms(); check_complex_norms(); deallog << "OK" << std::endl; } - - diff --git a/tests/lac/la_vector_vector.cc b/tests/lac/la_vector_vector.cc index 218f1009c4..01258177a6 100644 --- a/tests/lac/la_vector_vector.cc +++ b/tests/lac/la_vector_vector.cc @@ -142,7 +142,6 @@ int main() LinearAlgebra::Vector d1(N), d2(N); LinearAlgebra::Vector f1(N), f2(N); - LinearAlgebra::Vector l1(N), l2(N); // cross-tests with double/float // vectors at the same time are not @@ -152,7 +151,4 @@ int main() // arguments check_vectors (d1, d2); check_vectors (f1, f2); - check_vectors (l1, l2); } - - diff --git a/tests/lac/la_vector_vector.output b/tests/lac/la_vector_vector.output index 46bd0872f1..201372ce00 100644 --- a/tests/lac/la_vector_vector.output +++ b/tests/lac/la_vector_vector.output @@ -49,28 +49,3 @@ DEAL::-3.75 -1.88 0.00 1.88 3.75 5.62 7.50 9.38 11.25 13.12 DEAL::10.00 13.00 16.00 19.00 22.00 25.00 28.00 31.00 34.00 37.00 DEAL::equ DEAL::2.50 3.25 4.00 4.75 5.50 6.25 7.00 7.75 8.50 9.25 -DEAL::Fill & Swap -DEAL::0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -DEAL::0.00 2.00 4.00 6.00 8.00 10.00 12.00 14.00 16.00 18.00 -DEAL::0.00 2.00 8.00 18.00 32.00 50.00 72.00 98.00 128.00 162.00 -DEAL::2.00 1.50 1.00 0.50 0.00 -0.50 -1.00 -1.50 -2.00 -2.50 -DEAL::0.00 2.00 8.00 18.00 32.00 50.00 72.00 98.00 128.00 162.00 -DEAL::0.00 2.00 4.00 6.00 8.00 10.00 12.00 14.00 16.00 18.00 -DEAL::2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 -DEAL::0.00 1.10 2.20 3.30 -DEAL::Extract number -DEAL::-105.00 -105.00 -DEAL::33.76 33.76 -DEAL::12.50 12.50 -DEAL::2.50 2.50 -DEAL::add & sub -DEAL::2.50 4.50 6.50 8.50 10.50 12.50 14.50 16.50 18.50 20.50 -DEAL::-2.50 -2.50 -2.50 -2.50 -2.50 -2.50 -2.50 -2.50 -2.50 -2.50 -DEAL::6.50 7.50 8.50 9.50 10.50 11.50 12.50 13.50 14.50 15.50 -DEAL::2.50 3.25 4.00 4.75 5.50 6.25 7.00 7.75 8.50 9.25 -DEAL::sadd & scale -DEAL::-2.50 -1.75 -1.00 -0.25 0.50 1.25 2.00 2.75 3.50 4.25 -DEAL::-3.75 -1.88 0.00 1.88 3.75 5.62 7.50 9.38 11.25 13.12 -DEAL::10.00 13.00 16.00 19.00 22.00 25.00 28.00 31.00 34.00 37.00 -DEAL::equ -DEAL::2.50 3.25 4.00 4.75 5.50 6.25 7.00 7.75 8.50 9.25 -- 2.39.5