From e22039f70a51267b8201c594e584685af8fecb7c Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Sat, 28 Jan 2017 15:37:39 -0500 Subject: [PATCH] update template-arguments.in - document template-arguments.in - delete DERIVATIVE_TENSORS FEVALUES_BASES DOFHANDLERS (now unused) - update instantiations --- cmake/config/template-arguments.in | 46 +++++++++++++++++------ source/dofs/dof_tools_constraints.inst.in | 17 ++++++--- 2 files changed, 46 insertions(+), 17 deletions(-) diff --git a/cmake/config/template-arguments.in b/cmake/config/template-arguments.in index 7830833e12..0ef726287e 100644 --- a/cmake/config/template-arguments.in +++ b/cmake/config/template-arguments.in @@ -1,7 +1,19 @@ +// input file that will be processed into build/share/deal.II/template-arguments +// and used by expand_instantiations to process .inst.in files. + + +// booleans BOOL := { true; false } + +// real scalar floating point types REAL_SCALARS := { double; float } + +// complex scalar types COMPLEX_SCALARS := { std::complex; std::complex } + +// scalar types that have a corresponding MPI datatype and that we can +// therefore use in calls like MPI_Allreduce MPI_SCALARS := { int; long int; unsigned int; @@ -11,12 +23,12 @@ MPI_SCALARS := { int; double; long double } -DERIVATIVE_TENSORS := { double; - Tensor<1,deal_II_dimension>; - Tensor<2,deal_II_dimension> } - +// template names for serial vectors that we can instantiate as T where +// S=REAL_SCALARS for example DEAL_II_VEC_TEMPLATES := { Vector; BlockVector } +// Serial vector types +// TODO: why are parallel vectors in here? SERIAL_VECTORS := { Vector; Vector ; @@ -43,6 +55,7 @@ SERIAL_VECTORS := { Vector; @DEAL_II_EXPAND_PETSC_MPI_BLOCKVECTOR@; } +// TODO: why is this the same as SERIAL_VECTORS? REAL_SERIAL_VECTORS := { Vector; Vector ; @@ -69,6 +82,7 @@ REAL_SERIAL_VECTORS := { Vector; @DEAL_II_EXPAND_PETSC_MPI_BLOCKVECTOR_REAL@; } +// real vector types excluding block vectors REAL_NONBLOCK_VECTORS := { Vector; Vector ; @@ -84,18 +98,24 @@ REAL_NONBLOCK_VECTORS := { Vector; @DEAL_II_EXPAND_PETSC_MPI_VECTOR_REAL@; } +// wrappers for non-MPI vectors (PETSc/Trilinos) EXTERNAL_SEQUENTIAL_VECTORS := { @DEAL_II_EXPAND_TRILINOS_VECTOR@; @DEAL_II_EXPAND_TRILINOS_BLOCKVECTOR@; @DEAL_II_EXPAND_PETSC_VECTOR@; @DEAL_II_EXPAND_PETSC_BLOCKVECTOR@ } +// wrappers for MPI vectors (PETSc/Trilinos) EXTERNAL_PARALLEL_VECTORS := { @DEAL_II_EXPAND_TRILINOS_MPI_VECTOR@; @DEAL_II_EXPAND_TRILINOS_MPI_BLOCKVECTOR@; @DEAL_II_EXPAND_PETSC_MPI_VECTOR@; @DEAL_II_EXPAND_PETSC_MPI_BLOCKVECTOR@ } +// TODO: I don't understand this one. LA::distributed::Vector does not have a +// native matrix type, especially if we don't compile with Trilinos. Currently +// only used: mg_transfer_prebuilt.inst.in and +// mg_level_global_transfer.inst.in VECTORS_WITH_MATRIX := { Vector; Vector ; @@ -108,32 +128,32 @@ VECTORS_WITH_MATRIX := { Vector; @DEAL_II_EXPAND_TRILINOS_MPI_VECTOR@; } -DOFHANDLERS := { DoFHandler; - hp::DoFHandler } - +// DoFHandler and hp::DoFHandler templates DOFHANDLER_TEMPLATES := { DoFHandler; hp::DoFHandler } +// Triangulation and DoFHandler templates TRIANGULATION_AND_DOFHANDLER_TEMPLATES := { Triangulation; parallel::shared::Triangulation; parallel::distributed::Triangulation; DoFHandler; hp::DoFHandler } +// concrete sequential Triangulation and DoFHandler types with hard-coded +// SEQUENTIAL_TRIANGULATION_AND_DOFHANDLERS := { Triangulation; DoFHandler; hp::DoFHandler } +// concrete Triangulation and DoFHandler types (all types you can iterate over cells from) +// with hard-coded TRIANGULATION_AND_DOFHANDLERS := { Triangulation; parallel::shared::Triangulation; parallel::distributed::Triangulation; DoFHandler; hp::DoFHandler } - -FEVALUES_BASES := { FEValuesBase; - FEFaceValuesBase } - +// serial and parallel sparsity pattern types SPARSITY_PATTERNS := { SparsityPattern; DynamicSparsityPattern; @DEAL_II_EXPAND_TRILINOS_SPARSITY_PATTERN@; @@ -142,12 +162,16 @@ SPARSITY_PATTERNS := { SparsityPattern; BlockDynamicSparsityPattern; @DEAL_II_EXPAND_TRILINOS_BLOCK_SPARSITY_PATTERN@; } +// all supported logical dimensions DIMENSIONS := { 1; 2; 3 } +// all supported spacial dimensions SPACE_DIMENSIONS := { 1; 2; 3 } +// all ranks used for instantiating tensors RANKS := { 1; 2; 3; 4 } +// Flags that are allowed in DataOutInterface::set_flags OUTPUT_FLAG_TYPES := { DXFlags; UcdFlags; GnuplotFlags; PovrayFlags; EpsFlags; GmvFlags; TecplotFlags; VtkFlags; SvgFlags; Deal_II_IntermediateFlags } diff --git a/source/dofs/dof_tools_constraints.inst.in b/source/dofs/dof_tools_constraints.inst.in index d5873bb030..663045403b 100644 --- a/source/dofs/dof_tools_constraints.inst.in +++ b/source/dofs/dof_tools_constraints.inst.in @@ -13,21 +13,26 @@ // // --------------------------------------------------------------------- - -for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : DIMENSIONS) +// co-dim instantiations not for hp-DoFHandler +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : DIMENSIONS) { -#if deal_II_dimension <= deal_II_space_dimension +#if deal_II_dimension < deal_II_space_dimension template void DoFTools::make_hanging_node_constraints ( - const DH &, - ConstraintMatrix &); + const DoFHandler &, + ConstraintMatrix &); #endif } - for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS) { + template + void + DoFTools::make_hanging_node_constraints ( + const DH &, + ConstraintMatrix &); + #if deal_II_dimension != 1 template void -- 2.39.5