[Dune] STL vector and CGSolver
Arne Rekdal
arne at stud.ntnu.no
Thu Oct 9 13:00:18 CEST 2008
Hello all.
I am currently working on implementing a simple FEM solver with DUNE.
I am solving a problem with only Dirichlet boundaries. Currently I
mark the vertices which is part of the boundary, and the unknowns are
all the vertices minus the boundary vertices.
The plan next was to create a linear operator (A*x) so that the global
matrix is not needed to be formed explicitly, and solve the equation
system with conjugate gradients method.
I am encountering problems with this approach. The first problem is
that I try to use vectors of type FieldVector<Type,Size>. In this
class it is needed to know the size at compilation, but this is not
available without finding the number of boundary vertices first. I
have also tried to use std::vector<Type> representation, but this
class does not have the ::field_type type definition which is used in
CGSolver. I also see that a preconditioner is required, but I am not
sure how to create one.
I am looking for explanations for how/why use fixed size vectors. Is
the FieldVector intended for this use? Any help would be greatly
appreciated.
Best regards
Arne Rekdal
More information about the Dune
mailing list