#include <basic/function.h>
#include <fe/fe.h>
#include <fe/quadrature.h>
-
-#include "../../../mia/control.h"
-#include "../../../mia/vectormemory.h"
-#include "../../../mia/cg.h"
+#include <lac/solver_cg.h>
+#include <lac/vector_memory.h>
#include <map>
#include <numeric>
void ProblemBase<dim>::solve () {
Assert ((tria!=0) && (dof_handler!=0), ExcNoTriaSelected());
- int max_iter = 4000;
- double tolerance = 1.e-16;
-
- Control control1(max_iter,tolerance);
+ SolverControl control(4000, 1e-16);
PrimitiveVectorMemory<dVector> memory(right_hand_side.size());
- CG<dSMatrix,dVector> cg(control1,memory);
+ SolverCG<dSMatrix,dVector> cg(control,memory);
// solve
- cg (system_matrix, solution, right_hand_side);
+ cg.solve (system_matrix, solution, right_hand_side);
// distribute solution
constraints.distribute (solution);
};
#include <numerics/matrices.h>
#include <lac/dvector.h>
#include <lac/dsmatrix.h>
-
-#include "../../../mia/control.h"
-#include "../../../mia/vectormemory.h"
-#include "../../../mia/cg.h"
+#include <lac/solver_cg.h>
+#include <lac/vector_memory.h>
#include <numeric>
#include <algorithm>
MatrixTools<dim>::apply_boundary_values (boundary_values,
mass_matrix, vec, tmp);
- int max_iter = 1000;
- double tolerance = 1.e-16;
- Control control1(max_iter,tolerance);
+ SolverControl control(1000,1e-16);
PrimitiveVectorMemory<dVector> memory(tmp.size());
- CG<dSMatrix,dVector> cg(control1,memory);
+ SolverCG<dSMatrix,dVector> cg(control,memory);
// solve
- cg (mass_matrix, vec, tmp);
+ cg.solve (mass_matrix, vec, tmp);
// distribute solution
constraints.distribute (vec);
dVector boundary_projection (rhs.size());
- int max_iter = 1000;
- double tolerance = 1.e-16;
- Control control1(max_iter,tolerance);
+ SolverControl control(1000, 1e-16);
PrimitiveVectorMemory<dVector> memory(rhs.size());
- CG<dSMatrix,dVector> cg(control1,memory);
+ SolverCG<dSMatrix,dVector> cg(control,memory);
// solve
- cg (mass_matrix, boundary_projection, rhs);
+ cg.solve (mass_matrix, boundary_projection, rhs);
// fill in boundary values
for (unsigned int i=0; i<dof_to_boundary_mapping.size(); ++i)