const PetscInt petsc_i = index;
+ PetscScalar cast_value = static_cast<PetscScalar> (value);
+
const int ierr
- = VecSetValues (vector, 1, &petsc_i, &value, INSERT_VALUES);
+ = VecSetValues (vector, 1, &petsc_i, &cast_value, INSERT_VALUES);
AssertThrow (ierr == 0, ExcPETScError(ierr));
vector.last_action = VectorOperation::insert;
void
SolverBase::solve (const PETScWrappers::MatrixBase &A,
const PETScWrappers::MatrixBase &B,
- std::vector<double> &eigenvalues,
+ std::vector<PetscScalar> &eigenvalues,
std::vector<OutputVector> &eigenvectors,
const unsigned int n_eigenpairs)
{ ... }
template <typename OutputVector>
void
solve (const PETScWrappers::MatrixBase &A,
- std::vector<double> &eigenvalues,
+ std::vector<PetscScalar> &eigenvalues,
std::vector<OutputVector> &eigenvectors,
const unsigned int n_eigenpairs = 1);
void
solve (const PETScWrappers::MatrixBase &A,
const PETScWrappers::MatrixBase &B,
- std::vector<double> &eigenvalues,
+ std::vector<PetscScalar> &eigenvalues,
std::vector<OutputVector> &eigenvectors,
const unsigned int n_eigenpairs = 1);
* default, no target is set.
*/
void
- set_target_eigenvalue (const double &this_target);
+ set_target_eigenvalue (const PetscScalar &this_target);
/**
* Indicate which part of the spectrum is to be computed. By
template <typename OutputVector>
void
SolverBase::solve (const PETScWrappers::MatrixBase &A,
- std::vector<double> &eigenvalues,
+ std::vector<PetscScalar> &eigenvalues,
std::vector<OutputVector> &eigenvectors,
const unsigned int n_eigenpairs)
{
void
SolverBase::solve (const PETScWrappers::MatrixBase &A,
const PETScWrappers::MatrixBase &B,
- std::vector<double> &eigenvalues,
+ std::vector<PetscScalar> &eigenvalues,
std::vector<OutputVector> &eigenvectors,
const unsigned int n_eigenpairs)
{