REAL_SCALARS := { double; float }
// complex scalar types
-COMPLEX_SCALARS := { std::complex<double>;
- std::complex<float> }
+COMPLEX_SCALARS := {
+ @DEAL_II_EXPAND_COMPLEX_SCALARS@;
+ }
// real scalar floating point types
-REAL_AND_COMPLEX_SCALARS := { double;
- float;
- std::complex<double>;
- std::complex<float> }
+REAL_AND_COMPLEX_SCALARS := {
+ double;
+ float;
+ @DEAL_II_EXPAND_COMPLEX_SCALARS@;
+ }
// differentiable ADOL-C scalar types
DIFFERENTIABLE_ADOLC_REAL_SCALARS := {
// all possible scalar types
ALL_SCALAR_TYPES := {
- double; float ; std::complex<double>; std::complex<float>;
+ double;
+ float;
+ @DEAL_II_EXPAND_COMPLEX_SCALARS@;
@DEAL_II_EXPAND_ADOLC_TYPES@;
@DEAL_II_EXPAND_TRILINOS_SACADO_TYPES_FAD@;
@DEAL_II_EXPAND_TRILINOS_SACADO_TYPES_RAD@;
float;
double;
long double;
- std::complex<double>;
- std::complex<float> }
+ @DEAL_II_EXPAND_COMPLEX_SCALARS@;
+ }
// template names for serial vectors that we can instantiate as T<S> where
// S=REAL_SCALARS for example
VECTOR_TYPES := { Vector<double>;
Vector<float> ;
- Vector<std::complex<double> >;
- Vector<std::complex<float> >;
-
BlockVector<double>;
BlockVector<float>;
- BlockVector<std::complex<double> >;
- BlockVector<std::complex<float> >;
-
LinearAlgebra::Vector<double>;
LinearAlgebra::Vector<float> ;
- LinearAlgebra::Vector<std::complex<double> >;
- LinearAlgebra::Vector<std::complex<float> > ;
-
LinearAlgebra::distributed::Vector<double>;
LinearAlgebra::distributed::Vector<float> ;
- LinearAlgebra::distributed::Vector<std::complex<double> >;
- LinearAlgebra::distributed::Vector<std::complex<float> > ;
-
LinearAlgebra::distributed::BlockVector<double>;
LinearAlgebra::distributed::BlockVector<float> ;
- LinearAlgebra::distributed::BlockVector<std::complex<double> >;
- LinearAlgebra::distributed::BlockVector<std::complex<float> > ;
+ @DEAL_II_EXPAND_COMPLEX_VECTORS@;
+ @DEAL_II_EXPAND_COMPLEX_BLOCK_VECTORS@;
+ @DEAL_II_EXPAND_COMPLEX_LA_VECTORS@;
+ @DEAL_II_EXPAND_COMPLEX_LA_PARALLEL_VECTORS@;
+ @DEAL_II_EXPAND_COMPLEX_LA_PARALLEL_BLOCK_VECTORS@;
@DEAL_II_EXPAND_TRILINOS_MPI_VECTOR@;
@DEAL_II_EXPAND_EPETRA_VECTOR@;
# Components and miscellaneous options:
#
# DEAL_II_WITH_64BIT_INDICES
+# DEAL_II_WITH_COMPLEX_VALUES
# DEAL_II_DOXYGEN_USE_MATHJAX
# DEAL_II_COMPILE_EXAMPLES
# DEAL_II_CPACK_BUNDLE_NAME
)
LIST(APPEND DEAL_II_FEATURES 64BIT_INDICES)
+OPTION(DEAL_II_WITH_COMPLEX_VALUES
+ "If set to OFF, the classes that take a number type are not explicitly instantiated for std::complex<float> and std::complex<double>. If PETSc is built with complex scalar type, this option must be ON."
+ ON
+ )
+LIST(APPEND DEAL_II_FEATURES COMPLEX_VALUES)
+IF(${DEAL_II_WITH_COMPLEX_VALUES})
+ SET(DEAL_II_EXPAND_COMPLEX_SCALARS
+ "std::complex<double>"
+ "std::complex<float>"
+ )
+ SET(DEAL_II_EXPAND_COMPLEX_VECTORS
+ "Vector<std::complex<double> >"
+ "Vector<std::complex<float> >"
+ )
+ SET(DEAL_II_EXPAND_COMPLEX_BLOCK_VECTORS
+ "BlockVector<std::complex<double> >"
+ "BlockVector<std::complex<float> >"
+ )
+ SET(DEAL_II_EXPAND_COMPLEX_LA_VECTORS
+ "LinearAlgebra::Vector<std::complex<double> >"
+ "LinearAlgebra::Vector<std::complex<float> >"
+ )
+
+ SET(DEAL_II_EXPAND_COMPLEX_LA_PARALLEL_VECTORS
+ "LinearAlgebra::distributed::Vector<std::complex<double> >"
+ "LinearAlgebra::distributed::Vector<std::complex<float> >"
+ )
+ SET(DEAL_II_EXPAND_COMPLEX_LA_PARALLEL_BLOCK_VECTORS
+ "LinearAlgebra::distributed::BlockVector<std::complex<double> >"
+ "LinearAlgebra::distributed::BlockVector<std::complex<float> >"
+ )
+ENDIF()
+
OPTION(DEAL_II_DOXYGEN_USE_MATHJAX
"If set to ON, doxygen documentation is generated using mathjax"
OFF
#cmakedefine DEAL_II_WITH_ADOLC
#cmakedefine DEAL_II_WITH_ARPACK
#cmakedefine DEAL_II_WITH_ASSIMP
+#cmakedefine DEAL_II_WITH_COMPLEX_VALUES
#cmakedefine DEAL_II_WITH_CUDA
#cmakedefine DEAL_II_WITH_CXX14
#cmakedefine DEAL_II_WITH_CXX17
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
AffineConstraints<float> &);
+# ifdef DEAL_II_WITH_COMPLEX_VALUES
template void DoFTools::make_hanging_node_constraints(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
AffineConstraints<std::complex<double>> &);
+# endif
#endif
}
const DH<deal_II_dimension, deal_II_dimension> &,
AffineConstraints<float> &);
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
template void DoFTools::make_hanging_node_constraints(
const DH<deal_II_dimension, deal_II_dimension> &,
AffineConstraints<std::complex<double>> &);
+#endif
#if deal_II_dimension != 1
template void DoFTools::make_periodicity_constraints(