}
else
{
- (*os) << ' ' << step;
- for (unsigned int i=0; i<vectors.size(); ++i)
- for (unsigned int j=0; j<vectors(i)->size(); ++j)
- (*os) << ' ' << (*vectors(i))(j);
- (*os) << std::endl;
+ /* (*os) << ' ' << step; */
+ /* for (unsigned int i=0; i<vectors.size(); ++i) */
+ /* for (unsigned int j=0; j<vectors(i)->size(); ++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;
}
BlockVectorBase<VectorType>::mean_value () const
{
value_type sum = 0.;
- for (size_type i=0; i<n_blocks(); ++i)
- sum += components[i].mean_value() * components[i].size();
- return sum/size();
+/* @whattodo */
+ /* for (size_type i=0; i<n_blocks(); ++i) */
+ /* sum += components[i].mean_value() * components[i].size(); */
+ /* return sum/size(); */
+
+ Assert ((false),
+ ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex "
+ "but this function is not defined for complex types."));
+
+ return sum;
}
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
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<n_local_dofs; ++i)
{
// inhomogeneity, we set those to:
// inhomogeneity(i)*global_matrix (i,i).
if (use_inhomogeneities_for_rhs == true)
- global_vector(global_row) += constraints.get_inhomogeneity(global_row) * new_diagonal;
+ {
+/* @whattodo */
+ /* global_vector(global_row) += constraints.get_inhomogeneity(global_row) * new_diagonal; */
+
+ Assert ((false),
+ ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex "
+ "but this function is not defined for complex types."));
+ }
}
}
}
}
}
- internals::set_matrix_diagonals (global_rows, local_dof_indices,
- local_matrix, *this,
- global_matrix, global_vector, use_inhomogeneities_for_rhs);
+/* @whattodo */
+ /* internals::set_matrix_diagonals (global_rows, local_dof_indices, */
+ /* local_matrix, *this, */
+ /* global_matrix, global_vector, use_inhomogeneities_for_rhs); */
+ Assert ((false),
+ ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex "
+ "but this function is not defined for complex types."));
}
Assert (n_values == (size_type)(val_ptr - &vals[0]),
ExcInternalError());
if (n_values > 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."));
+ }
+
}
}
// 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));
ierr = VecGetArray(locally_stored_elements, &ptr);
AssertThrow (ierr == 0, ExcPETScError(ierr));
- for (i = 0; i < n_idx; i++) {
+ for (PetscInt i=0; i<n_idx; i++) {
const unsigned int index = *(indices_begin+i);
if ( index>=static_cast<unsigned int>(begin)
&& index<static_cast<unsigned int>(end) )
{
//local entry
- *(values_begin+i) = *(ptr+index-begin);
+/* @whattodo */
+// *(values_begin+i) = *(ptr+index-begin);
+
+/* @testcheck */
+ /* std::double<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);
}
}
Assert(index>=static_cast<unsigned int>(begin)
&& index<static_cast<unsigned int>(end), ExcInternalError());
- *(values_begin+i) = *(ptr+index-begin);
+/* @whattodo */
+ /* *(values_begin+i) = *(ptr+index-begin); */
}
ierr = VecRestoreArray(vector, &ptr);
for (unsigned int i=0; i<n; ++i)
if (p_select[i])
{
- s += v(i);
+/* @whattodo */
+ /* s += v(i); */
+
+ Assert ((false),
+ ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex "
+ "but this function is not defined for complex types."));
++counter;
}
// Error out if we have not constrained anything. Note that in this
for (types::global_dof_index i=0; i<dof2.n_dofs(); ++i)
if (locally_owned_dofs.is_element(i))
{
- Assert(touch_count(i)!=0, ExcInternalError());
+// @whattodo
+ // Assert(touch_count(i)!=0, ExcInternalError());
u2(i) /= touch_count(i);
}
get_vector_element (const VectorType &vector,
const types::global_dof_index cell_number)
{
- return vector[cell_number];
+// @whattodo
+ // return vector[cell_number];
}
// to get the array of values from PETSc
// in every iteration), but works
PetscScalar m = 0;
- for (unsigned int i=0; i<criteria.size(); ++i)
- m = std::max (m, criteria(i));
+// @whattodo
+ // for (unsigned int i=0; i<criteria.size(); ++i)
+ // m = std::max (m, criteria(i));
+ Assert ((false),
+ ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex "
+ "but this function is not defined for complex types."));
return m;
}
// to get the array of values from PETSc
// in every iteration), but works
PetscScalar m = criteria(0);
- for (unsigned int i=1; i<criteria.size(); ++i)
- m = std::min (m, criteria(i));
+// @whattodo
+ // for (unsigned int i=1; i<criteria.size(); ++i)
+ // m = std::min (m, criteria(i));
+ Assert ((false),
+ ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex "
+ "but this function is not defined for complex types."));
return m;
}
#endif
// entry from within the part of the
// matrix that we can see. if we can't
// find such an entry, take one
-#ifndef PETSC_USE_COMPLEX
- 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;
- }
-#else
- PetscScalar average_nonzero_diagonal_entry = (PetscScalar) std::complex<double> (1,1);
- for (types::global_dof_index i=local_range.first; i<local_range.second; ++i)
- if (matrix.diag_element(i) != std::complex<double> (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<local_range.second; ++i)
+ // if (matrix.diag_element(i) != 0)
+ // {
+ // average_nonzero_diagonal_entry = std::fabs(matrix.diag_element(i));
+ // break;
+ // }
+
+// @testcheck
+ // PetscScalar average_nonzero_diagonal_entry = (PetscScalar) std::complex<double> (1,1);
+ // for (types::global_dof_index i=local_range.first; i<local_range.second; ++i)
+ // if (matrix.diag_element(i) != std::complex<double> (0,0)) // PETSC_NULL?
+// @endtestcheck
// figure out which rows of the matrix we
// have to eliminate on this processor
// 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<types::global_dof_index> indices;
std::vector<PetscScalar> solution_values;