* adding/inserting local data into
* the (large) sparse matrix.
*/
-#ifdef PETSC_USE_64BIT_INDICES
std::vector<PetscInt> column_indices;
-#else
- std::vector<int> column_indices;
-#endif
/**
* An internal array of double values
{
prepare_action(LastAction::insert);
-#ifdef PETSC_USE_64BIT_INDICES
const PetscInt petsc_i = row;
PetscInt *col_index_ptr;
-#else
- const int petsc_i = row;
- int *col_index_ptr;
-#endif
+
PetscScalar const *col_value_ptr;
int n_columns;
{
prepare_action(LastAction::add);
-#ifdef PETSC_USE_64BIT_INDICES
const PetscInt petsc_i = row;
PetscInt *col_index_ptr;
-#else
- const int petsc_i = row;
- int *col_index_ptr;
-#endif
PetscScalar const *col_value_ptr;
int n_columns;
bool
MatrixBase::in_local_range (const unsigned int index) const
{
-#ifdef PETSC_USE_64BIT_INDICES
PetscInt begin, end;
-#else
- int begin, end;
-#endif
+
const int ierr = MatGetOwnershipRange (static_cast<const Mat &>(matrix),
&begin, &end);
AssertThrow (ierr == 0, ExcPETScError(ierr));
int
#endif
convergence_test (KSP ksp,
-#ifdef PETSC_USE_64BIT_INDICES
const PetscInt iteration,
-#else
- const int iteration,
-#endif
const PetscReal residual_norm,
KSPConvergedReason *reason,
void *solver_control);
int
#endif
convergence_test (KSP ksp,
-#ifdef PETSC_USE_64BIT_INDICES
const PetscInt iteration,
-#else
- const int iteration,
-#endif
const PetscReal residual_norm,
KSPConvergedReason *reason,
void *solver_control);
Assert (!vector.has_ghost_elements(), ExcGhostsPresent());
-#ifdef PETSC_USE_64BIT_INDICES
const PetscInt petsc_i = index;
-#else
- const signed int petsc_i = index;
-#endif
const int ierr
= VecSetValues (vector, 1, &petsc_i, &value, INSERT_VALUES);
return *this;
// use the PETSc function to add something
-#ifdef PETSC_USE_64BIT_INDICES
const PetscInt petsc_i = index;
-#else
- const signed int petsc_i = index;
-#endif
const int ierr
= VecSetValues (vector, 1, &petsc_i, &value, ADD_VALUES);
AssertThrow (ierr == 0, ExcPETScError(ierr));
// use the PETSc function to
// add something
-#ifdef PETSC_USE_64BIT_INDICES
const PetscInt petsc_i = index;
-#else
- const signed int petsc_i = index;
-#endif
const PetscScalar subtractand = -value;
const int ierr
= VecSetValues (vector, 1, &petsc_i, &subtractand, ADD_VALUES);
if (value == 1.)
return *this;
-#ifdef PETSC_USE_64BIT_INDICES
const PetscInt petsc_i = index;
-#else
- const signed int petsc_i = index;
-#endif
-
const PetscScalar new_value
= static_cast<PetscScalar>(*this) * value;
if (value == 1.)
return *this;
-#ifdef PETSC_USE_64BIT_INDICES
const PetscInt petsc_i = index;
-#else
- const signed int petsc_i = index;
-#endif
-
const PetscScalar new_value
= static_cast<PetscScalar>(*this) / value;
bool
VectorBase::in_local_range (const unsigned int index) const
{
-#ifdef PETSC_USE_64BIT_INDICES
PetscInt begin, end;
-#else
- int begin, end;
-#endif
-
const int ierr = VecGetOwnershipRange (static_cast<const Vec &>(vector),
&begin, &end);
AssertThrow (ierr == 0, ExcPETScError(ierr));