Thread Previous • Date Previous • Date Next • Thread Next |
Great work. I think we should avoid using the PETSc types KSPType/PCType and provide our own types to minimize the amount of PETSc that is visible and also be consistent with the rest of the code. In other cases, we have a nested enum type called Type in classes where a type is specified. I found the following type declarations in the current code: Function.h: enum Type { user, functionpointer, discrete }; File.h: enum Type { xml, matlab, matrixmarket, octave, opendx, gid, tecplot, vtk, python }; Vector.h: enum NormType { l1, l2, linf }; Buffer.h: enum Type { info, debug, warning, error }; LogStream.h: enum Type {COUT, ENDL}; Cell.h: enum Type { triangle, tetrahedron, none }; Mesh.h: enum Type { triangles, tetrahedra }; Method.h: enum Type { cG, dG, none }; Parameter.h: enum Type { REAL, INT, BOOL, STRING, NONE }; As you see, we have not been very consistent with capitalization of the identifiers. Any thoughts on this? The current standard seems to be that we don't capitalize at all. We used to capitalize everything (XML, MATLAB, TRIANGLE) etc but I thought it was ugly so I changed. /Anders On Mon, Dec 05, 2005 at 11:46:45AM +0100, dolfin@xxxxxxxxxx wrote: > Commit from garth (2005-12-05 11:46 CET) > ----------------- > > LA: > > Add functions to KrylovSolver to choose PETSc preconditioner. > > For GMRES, > GMRES solver; // GMRES solver + default preconditioner > GMRES solver(PCILU); // GMRES solver + incomplete LU preconditioner > > For KrylovSolver > KrylovSolver solver; // default solver + preconditioner > KrylovSolver solver(KSPBCGS); // BiCGStab + default preconditioner > KrylovSolver solver (KSPBCGS, PCICC); // BiCGStab + incomplete Cholesky precon. > > dolfin src/kernel/la/GMRES.cpp 1.16 > dolfin src/kernel/la/KrylovSolver.cpp 1.35 > dolfin src/kernel/la/dolfin/GMRES.h 1.12 > dolfin src/kernel/la/dolfin/KrylovSolver.h 1.17 > dolfin src/kernel/la/dolfin/Preconditioner.h 1.6 > > _______________________________________________ > DOLFIN-dev mailing list > DOLFIN-dev@xxxxxxxxxx > http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev > -- Anders Logg Research Assistant Professor Toyota Technological Institute at Chicago http://www.tti-c.org/logg/
Thread Previous • Date Previous • Date Next • Thread Next |