From: young Date: Thu, 3 Oct 2013 13:21:55 +0000 (+0000) Subject: By-pass a load of errors until we figure out how to deal with them - grep @whattodo. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c08b32ad7084222072983cdc39773dfa4c47b821;p=dealii-svn.git By-pass a load of errors until we figure out how to deal with them - grep @whattodo. git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@31083 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/algorithms/operator.templates.h b/deal.II/include/deal.II/algorithms/operator.templates.h index 173d10b9b7..d3bb3a047a 100644 --- a/deal.II/include/deal.II/algorithms/operator.templates.h +++ b/deal.II/include/deal.II/algorithms/operator.templates.h @@ -72,11 +72,15 @@ namespace Algorithms } else { - (*os) << ' ' << step; - for (unsigned int i=0; isize(); ++j) - (*os) << ' ' << (*vectors(i))(j); - (*os) << std::endl; + /* (*os) << ' ' << step; */ + /* for (unsigned int i=0; isize(); ++j) */ + /* (*os) << ' ' << (*vectors(i))(j); */ + /* (*os) << std::endl; */ + + Assert ((false), + ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex " + "but this function is not defined for complex types.")); } return *this; } diff --git a/deal.II/include/deal.II/lac/block_vector_base.h b/deal.II/include/deal.II/lac/block_vector_base.h index 8991123408..c1285ef8f4 100644 --- a/deal.II/include/deal.II/lac/block_vector_base.h +++ b/deal.II/include/deal.II/lac/block_vector_base.h @@ -2046,10 +2046,17 @@ typename BlockVectorBase::value_type BlockVectorBase::mean_value () const { value_type sum = 0.; - for (size_type i=0; i::extract_subvector_to (ForwardIterator const ForwardIterator indices_end, OutputIterator values_begin) const { - while (indices_begin != indices_end) { - *values_begin = operator()(*indices_begin); - indices_begin++; values_begin++; - } + while (indices_begin != indices_end) + { +/* @whattodo */ + /* *values_begin = operator()(*indices_begin); */ + + Assert ((false), + ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex " + "but this function is not defined for complex types.")); + + indices_begin++; values_begin++; + } } #endif // DOXYGEN diff --git a/deal.II/include/deal.II/lac/constraint_matrix.templates.h b/deal.II/include/deal.II/lac/constraint_matrix.templates.h index 4a1ce1888c..ffcea009a9 100644 --- a/deal.II/include/deal.II/lac/constraint_matrix.templates.h +++ b/deal.II/include/deal.II/lac/constraint_matrix.templates.h @@ -861,7 +861,13 @@ distribute_local_to_global (const Vector &local_vector, const size_type n_local_dofs = local_vector.size(); if (lines.empty()) - global_vector.add(local_dof_indices, local_vector); + { +/* @whattodo */ + // global_vector.add(local_dof_indices, local_vector); + Assert ((false), + ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex " + "but this function is not defined for complex types.")); + } else for (size_type i=0; i 0) - global_matrix.add(row, n_values, &cols[0], &vals[0], false, true); +/* @whattodo */ + /* global_matrix.add(row, n_values, &cols[0], &vals[0], false, true); */ + { + Assert ((false), + ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex " + "but this function is not defined for complex types.")); + } + } } diff --git a/deal.II/include/deal.II/lac/petsc_vector_base.h b/deal.II/include/deal.II/lac/petsc_vector_base.h index 709e1e6185..930aef000b 100644 --- a/deal.II/include/deal.II/lac/petsc_vector_base.h +++ b/deal.II/include/deal.II/lac/petsc_vector_base.h @@ -1263,29 +1263,19 @@ namespace PETScWrappers // if we are dealing // with a parallel vector - if (ghosted ) + if (ghosted) { int ierr; - // there is the possibility - // that the vector has - // ghost elements. in that - // case, we first need to - // figure out which - // elements we own locally, - // then get a pointer to - // the elements that are - // stored here (both the - // ones we own as well as - // the ghost elements). in - // this array, the locally - // owned elements come - // first followed by the - // ghost elements whose - // position we can get from - // an index set - PetscInt begin, end, i; + // there is the possibility that the vector has ghost + // elements. in that case, we first need to figure out which + // elements we own locally, then get a pointer to the elements + // that are stored here (both the ones we own as well as the + // ghost elements). in this array, the locally owned elements + // come first followed by the ghost elements whose position we + // can get from an index set + PetscInt begin, end; ierr = VecGetOwnershipRange (vector, &begin, &end); AssertThrow (ierr == 0, ExcPETScError(ierr)); @@ -1301,22 +1291,29 @@ namespace PETScWrappers ierr = VecGetArray(locally_stored_elements, &ptr); AssertThrow (ierr == 0, ExcPETScError(ierr)); - for (i = 0; i < n_idx; i++) { + for (PetscInt i=0; i=static_cast(begin) && index(end) ) { //local entry - *(values_begin+i) = *(ptr+index-begin); +/* @whattodo */ +// *(values_begin+i) = *(ptr+index-begin); + +/* @testcheck */ + /* std::double cheese = *(values_begin+i); */ + /* PetscScalar fish = *(ptr+index-begin); ok */ +/* @endtestcheck */ } else { //ghost entry - const unsigned int ghostidx - = ghost_indices.index_within_set(index); + const unsigned int ghostidx + = ghost_indices.index_within_set(index); - Assert(ghostidx+end-begin<(unsigned int)lsize, ExcInternalError()); - *(values_begin+i) = *(ptr+ghostidx+end-begin); + Assert(ghostidx+end-begin<(unsigned int)lsize, ExcInternalError()); +/* @whattodo */ +// *(values_begin+i) = *(ptr+ghostidx+end-begin); } } @@ -1348,7 +1345,8 @@ namespace PETScWrappers Assert(index>=static_cast(begin) && index(end), ExcInternalError()); - *(values_begin+i) = *(ptr+index-begin); +/* @whattodo */ + /* *(values_begin+i) = *(ptr+index-begin); */ } ierr = VecRestoreArray(vector, &ptr); diff --git a/deal.II/include/deal.II/numerics/vector_tools.templates.h b/deal.II/include/deal.II/numerics/vector_tools.templates.h index 92670d6ac5..46c67c939e 100644 --- a/deal.II/include/deal.II/numerics/vector_tools.templates.h +++ b/deal.II/include/deal.II/numerics/vector_tools.templates.h @@ -5594,7 +5594,12 @@ namespace VectorTools for (unsigned int i=0; i (1,1); - for (types::global_dof_index i=local_range.first; i (0,0)) // PETSC_NULL? - { - average_nonzero_diagonal_entry = std::fabs(matrix.diag_element(i)); - break; - } -#endif + +// @whattodo Note: this is a real mess, though no harder to fix than +// the other messes (cast?). Please compare with trunk before making +// any serious changes here! + PetscScalar average_nonzero_diagonal_entry; + // PetscScalar average_nonzero_diagonal_entry = 1; + // for (types::global_dof_index i=local_range.first; i (1,1); + // for (types::global_dof_index i=local_range.first; i (0,0)) // PETSC_NULL? +// @endtestcheck // figure out which rows of the matrix we // have to eliminate on this processor @@ -2460,7 +2461,7 @@ namespace MatrixTools // preserving it. this is different from // the case of deal.II sparse matrices // treated in the other functions. - matrix.clear_rows (constrained_rows, average_nonzero_diagonal_entry); + matrix.clear_rows (constrained_rows, average_nonzero_diagonal_entry); std::vector indices; std::vector solution_values;