*
* FGMRES needs two vectors in each iteration steps yielding a total
* of @p{2*AdditionalData::max_basis_size+1} auxiliary vectors.
+ *
+ * Caveat: documentation of this class is not up to date. There are
+ * also a few parameters of GMRES we would like to introduce here.
+ *
+ * @author Guido Kanschat, 2003
*/
template <class VECTOR = Vector<double> >
class SolverFGMRES : public Solver<VECTOR>
// Generate an object where basis
// vectors are stored.
- typename SolverGMRES<VECTOR>::TmpVectors v (basis_size, this->memory);
- typename SolverGMRES<VECTOR>::TmpVectors z (basis_size, this->memory);
+ typename internal::SolverGMRES::TmpVectors<VECTOR> v (basis_size, this->memory);
+ typename internal::SolverGMRES::TmpVectors<VECTOR> z (basis_size, this->memory);
// number of the present iteration; this
// number is not reset to zero upon a
* info see the @p{Solver} class.
*/
void set_data(const typename SolverGMRES<VECTOR>
+ ::AdditionalData &data);
+
+ /**
+ * Set the additional data. For more
+ * info see the @p{Solver} class.
+ */
+ void set_data(const typename SolverFGMRES<VECTOR>
::AdditionalData &data);
/**
* Stores the additional data.
*/
typename SolverGMRES<VECTOR>::AdditionalData gmres_data;
+
+ /**
+ * Stores the additional data.
+ */
+ typename SolverFGMRES<VECTOR>::AdditionalData fgmres_data;
};
/*@}*/
gmres_data);
solver.solve(A,x,b,precond);
}
+ else if (solver_name=="fgmres")
+ {
+ SolverFGMRES<VECTOR> solver(*control,*vector_memory,
+ fgmres_data);
+ solver.solve(A,x,b,precond);
+ }
else
Assert(false,ExcSolverDoesNotExist(solver_name));
}
template <class VECTOR>
std::string SolverSelector<VECTOR>::get_solver_names()
{
- return "richardson|cg|bicgstab|gmres";
+ return "richardson|cg|bicgstab|gmres|fgmres";
}
}
+template <class VECTOR>
+void SolverSelector<VECTOR>::set_data(
+ const typename SolverFGMRES<VECTOR>::AdditionalData &data)
+{
+ fgmres_data=data;
+}
+
+
template <class VECTOR>
void SolverSelector<VECTOR>::set_data(
const typename SolverRichardson<VECTOR>::AdditionalData &data)