const Epetra_Operator &preconditioner);
-
/**
* An implementation of the solver interface using the Trilinos CG solver.
*
class SolverCG : public SolverBase
{
public:
- /**
- * Standardized data struct to pipe additional data to the solver.
- */
-
- struct AdditionalData : public SolverBase::AdditionalData
- {
- /**
- * Set the additional data field to the desired output format.
- */
- explicit AdditionalData(const bool output_solver_details = false);
- };
-
/**
* Constructor. In contrast to deal.II's own solvers, there is no need to
* give a vector memory object.
* flags for tuning.
*/
SolverCG(SolverControl &cn, const AdditionalData &data = AdditionalData());
-
- protected:
- /**
- * Store a copy of the flags for this particular solver.
- */
- const AdditionalData additional_data;
};
class SolverCGS : public SolverBase
{
public:
- /**
- * Standardized data struct to pipe additional data to the solver.
- */
- struct AdditionalData : public SolverBase::AdditionalData
- {
- /**
- * Set the additional data field to the desired output format.
- */
- explicit AdditionalData(const bool output_solver_details = false);
- };
-
/**
* Constructor. In contrast to deal.II's own solvers, there is no need to
* give a vector memory object.
* flags for tuning.
*/
SolverCGS(SolverControl &cn, const AdditionalData &data = AdditionalData());
-
- protected:
- /**
- * Store a copy of the flags for this particular solver.
- */
- const AdditionalData additional_data;
};
class SolverGMRES : public SolverBase
{
public:
- /**
- * Standardized data struct to pipe additional data to the solver.
- */
- struct AdditionalData : public SolverBase::AdditionalData
- {
- /**
- * Constructor. By default, set the number of temporary vectors to 30,
- * i.e. do a restart every 30 iterations.
- */
- explicit AdditionalData(const bool output_solver_details = false,
- const unsigned int restart_parameter = 30);
- };
-
/**
* Constructor. In contrast to deal.II's own solvers, there is no need to
* give a vector memory object.
*/
SolverGMRES(SolverControl & cn,
const AdditionalData &data = AdditionalData());
-
- protected:
- /**
- * Store a copy of the flags for this particular solver.
- */
- const AdditionalData additional_data;
};
class SolverBicgstab : public SolverBase
{
public:
- /**
- * Standardized data struct to pipe additional data to the solver.
- */
- struct AdditionalData : public SolverBase::AdditionalData
- {
- /**
- * Set the additional data field to the desired output format.
- */
- explicit AdditionalData(const bool output_solver_details = false);
- };
-
/**
* Constructor. In contrast to deal.II's own solvers, there is no need to
* give a vector memory object.
*/
SolverBicgstab(SolverControl & cn,
const AdditionalData &data = AdditionalData());
-
- protected:
- /**
- * Store a copy of the flags for this particular solver.
- */
- const AdditionalData additional_data;
};
class SolverTFQMR : public SolverBase
{
public:
- /**
- * Standardized data struct to pipe additional data to the solver.
- */
- struct AdditionalData : public SolverBase::AdditionalData
- {
- /**
- * Set the additional data field to the desired output format.
- */
- explicit AdditionalData(const bool output_solver_details = false);
- };
-
/**
* Constructor. In contrast to deal.II's own solvers, there is no need to
* give a vector memory object.
*/
SolverTFQMR(SolverControl & cn,
const AdditionalData &data = AdditionalData());
-
- protected:
- /**
- * Store a copy of the flags for this particular solver.
- */
- const AdditionalData additional_data;
};
/* ---------------------- SolverCG ------------------------ */
- SolverCG::AdditionalData::AdditionalData(const bool output_solver_details)
- : SolverBase::AdditionalData(output_solver_details)
- {}
-
-
-
SolverCG::SolverCG(SolverControl &cn, const AdditionalData &data)
- : SolverBase(cn, data)
- , additional_data(data)
- {
- solver_name = cg;
- }
-
-
- /* ---------------------- SolverGMRES ------------------------ */
-
- SolverGMRES::AdditionalData::AdditionalData(
- const bool output_solver_details,
- const unsigned int restart_parameter)
- : SolverBase::AdditionalData(output_solver_details, restart_parameter)
+ : SolverBase(cg, cn, data)
{}
+ /* ---------------------- SolverGMRES ------------------------ */
SolverGMRES::SolverGMRES(SolverControl &cn, const AdditionalData &data)
- : SolverBase(cn, data)
- , additional_data(data)
- {
- solver_name = gmres;
- }
-
-
- /* ---------------------- SolverBicgstab ------------------------ */
-
- SolverBicgstab::AdditionalData::AdditionalData(
- const bool output_solver_details)
- : SolverBase::AdditionalData(output_solver_details)
+ : SolverBase(gmres, cn, data)
{}
+ /* ---------------------- SolverBicgstab ------------------------ */
SolverBicgstab::SolverBicgstab(SolverControl &cn, const AdditionalData &data)
- : SolverBase(cn, data)
- , additional_data(data)
- {
- solver_name = bicgstab;
- }
-
-
- /* ---------------------- SolverCGS ------------------------ */
-
- SolverCGS::AdditionalData::AdditionalData(const bool output_solver_details)
- : SolverBase::AdditionalData(output_solver_details)
+ : SolverBase(bicgstab, cn, data)
{}
+ /* ---------------------- SolverCGS ------------------------ */
SolverCGS::SolverCGS(SolverControl &cn, const AdditionalData &data)
- : SolverBase(cn, data)
- , additional_data(data)
- {
- solver_name = cgs;
- }
-
-
- /* ---------------------- SolverTFQMR ------------------------ */
-
- SolverTFQMR::AdditionalData::AdditionalData(const bool output_solver_details)
- : SolverBase::AdditionalData(output_solver_details)
+ : SolverBase(cgs, cn, data)
{}
+ /* ---------------------- SolverTFQMR ------------------------ */
SolverTFQMR::SolverTFQMR(SolverControl &cn, const AdditionalData &data)
- : SolverBase(cn, data)
- , additional_data(data)
- {
- solver_name = tfqmr;
- }
+ : SolverBase(tfqmr, cn, data)
+ {}