@DEAL_II_EXPAND_PETSC_MPI_BLOCKVECTOR@;
}
++REAL_SERIAL_VECTORS := { Vector<double>;
++ Vector<float> ;
++ Vector<long double>;
++
++ BlockVector<double>;
++ BlockVector<float>;
++ BlockVector<long double>;
++
++ parallel::distributed::Vector<double>;
++ parallel::distributed::Vector<float> ;
++ parallel::distributed::Vector<long double>;
++
++ parallel::distributed::BlockVector<double>;
++ parallel::distributed::BlockVector<float> ;
++ parallel::distributed::BlockVector<long double>;
++
++ @DEAL_II_EXPAND_TRILINOS_VECTOR@;
++ @DEAL_II_EXPAND_TRILINOS_MPI_VECTOR@;
++
++ @DEAL_II_EXPAND_TRILINOS_BLOCKVECTOR@;
++ @DEAL_II_EXPAND_TRILINOS_MPI_BLOCKVECTOR@;
++ }
++
++COMPLEX_SERIAL_VECTORS := { @DEAL_II_EXPAND_PETSC_VECTOR@;
++ @DEAL_II_EXPAND_PETSC_MPI_VECTOR@;
++
++ @DEAL_II_EXPAND_PETSC_BLOCKVECTOR@;
++ @DEAL_II_EXPAND_PETSC_MPI_BLOCKVECTOR@;
++ }
++
EXTERNAL_SEQUENTIAL_VECTORS := { @DEAL_II_EXPAND_TRILINOS_VECTOR@;
@DEAL_II_EXPAND_TRILINOS_BLOCKVECTOR@;
@DEAL_II_EXPAND_PETSC_VECTOR@;
namespace
{
template <class VectorType>
-- double
++ typename VectorType::value_type
get_vector_element (const VectorType &vector,
const types::global_dof_index cell_number)
{
// Declarations of member functions of FEValuesBase::CellIteratorBase
// and derived classes
--for (VEC : SERIAL_VECTORS)
++for (VEC : REAL_SERIAL_VECTORS; S : REAL_SCALARS)
{
/// Call
/// @p get_interpolated_dof_values
virtual
void
get_interpolated_dof_values (const VEC &in,
-- Vector<double> &out) const = 0;
++ Vector<S> &out) const = 0;
++ }
++
++for (VEC : COMPLEX_SERIAL_VECTORS; S : COMPLEX_SCALARS)
++ {
++ /// Call
++ /// @p get_interpolated_dof_values
++ /// of the iterator with the
++ /// given arguments.
++ virtual
++ void
++ get_interpolated_dof_values (const VEC &in,
++ Vector<S> &out) const = 0;
}
// Declarations of member functions of FEValuesBase::CellIteratorBase
// and derived classes
--for (VEC : SERIAL_VECTORS)
++for (VEC : REAL_SERIAL_VECTORS; S : REAL_SCALARS)
{
/// Call
/// @p get_interpolated_dof_values
get_interpolated_dof_values (const VEC &in,
Vector<double> &out) const;
}
++
++for (VEC : COMPLEX_SERIAL_VECTORS; S : COMPLEX_SCALARS)
++ {
++ /// Call
++ /// @p get_interpolated_dof_values
++ /// of the iterator with the
++ /// given arguments.
++ virtual
++ void
++ get_interpolated_dof_values (const VEC &in,
++ Vector<S> &out) const;
++ }
// ---------------------------------------------------------------------
--for (VEC : SERIAL_VECTORS)
++for (VEC : REAL_SERIAL_VECTORS)
{
template <int dim, int spacedim>
template <typename CI>
cell->get_interpolated_dof_values (in, out);
\}
}
++
++for (VEC : COMPLEX_SERIAL_VECTORS)
++ {
++ template <int dim, int spacedim>
++ template <typename CI>
++ void
++ FEValuesBase<dim,spacedim>::CellIterator<CI>::
++ get_interpolated_dof_values (const VEC &in,
++ Vector<std::complex<double> > &out) const
++ \{
++ cell->get_interpolated_dof_values (in, out);
++ \}
++ }
++
// ---------------------------------------------------------------------
--for (VEC : SERIAL_VECTORS)
++for (VEC : REAL_SERIAL_VECTORS)
{
template <int dim, int spacedim>
void
FEValuesBase<dim,spacedim>::TriaCellIterator::
-- get_interpolated_dof_values (const VEC &,
++ get_interpolated_dof_values (const VEC &,
Vector<double> &) const
\{
Assert (false, ExcMessage (message_string));
\}
}
++
++
++for (VEC : COMPLEX_SERIAL_VECTORS)
++ {
++ template <int dim, int spacedim>
++ void
++ FEValuesBase<dim,spacedim>::TriaCellIterator::
++ get_interpolated_dof_values (const VEC &,
++ Vector<std::complex<double> > &) const
++ \{
++ Assert (false, ExcMessage (message_string));
++ \}
++ }
++
--for (VEC : SERIAL_VECTORS; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
++for (VEC : REAL_SERIAL_VECTORS; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
{
#if deal_II_dimension <= deal_II_space_dimension
#if (deal_II_space_dimension == DIM_A) || (deal_II_space_dimension == DIM_B)
--for (VEC : SERIAL_VECTORS; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
++for (VEC : REAL_SERIAL_VECTORS; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
{
#if deal_II_dimension <= deal_II_space_dimension
#if (deal_II_space_dimension == DIM_A) || (deal_II_space_dimension == DIM_B)
\}
}
--for (VECTOR : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS)
++for (VECTOR : REAL_SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS)
{
namespace MeshWorker
\{
Assert (cell_and_face->first->active(), ExcCellNotActiveForCellData());
const unsigned int cell_number
= std::distance (this->triangulation->begin_active(),
- typename Triangulation<DH::dimension,DH::space_dimension>::active_cell_iterator(cell_and_face->first));
+ typename Triangulation<dimension,space_dimension>::active_cell_iterator(cell_and_face->first));
+ // @whattodo - this next line does not cause a problem (yet), but probably will one day.
const double value
= this->cell_data[dataset]->get_cell_data_value (cell_number);
for (unsigned int q=0; q<n_q_points; ++q)
ExcMessage("Cell must be active for cell data"));
const unsigned int cell_number
= std::distance (this->triangulation->begin_active(),
- typename Triangulation<DH::dimension,DH::space_dimension>::active_cell_iterator(*cell));
+ typename Triangulation<dimension,space_dimension>::active_cell_iterator(*cell));
+
+ // @whattodo - this next line does not cause a problem (yet), but probably will one day.
const double value
= this->cell_data[dataset]->get_cell_data_value (cell_number);
- switch (DH::dimension)
+ switch (dimension)
{
case 1:
for (unsigned int x=0; x<n_points; ++x)
// entry from within the part of the
// matrix that we can see. if we can't
// find such an entry, take one
-
- // @whattodo Note: this is a real mess.
- PetscScalar average_nonzero_diagonal_entry;
- // PetscScalar average_nonzero_diagonal_entry = 1;
- // for (types::global_dof_index i=local_range.first; i<local_range.second; ++i)
- // if (matrix.diag_element(i) != 0)
- // {
- // average_nonzero_diagonal_entry = std::fabs(matrix.diag_element(i));
- // break;
- // }
- Assert ((false), ExcMessage ("This function is corrupt: @whattodo"));
- PetscScalar average_nonzero_diagonal_entry = 1;
- for (types::global_dof_index i=local_range.first; i<local_range.second; ++i)
- if (matrix.diag_element(i) != 0)
- {
- average_nonzero_diagonal_entry = std::fabs(matrix.diag_element(i));
- break;
- }
++ PetscScalar average_nonzero_diagonal_entry = 1;
++ for (types::global_dof_index i=local_range.first; i<local_range.second; ++i)
++ if (matrix.diag_element(i) != PetscScalar ())
++ {
++ average_nonzero_diagonal_entry = matrix.diag_element(i);
++ break;
++ }
// figure out which rows of the matrix we
// have to eliminate on this processor