← Back to team overview

dolfin team mailing list archive

Re: Cleanup of linear algebra

 

I would be happy to help out, for example with renaming or updating the
manual.

Although, I seem to have some problems compiling the current dolfin hg
version. Anyone who recognize this? Is there a bug, or do I have some
problem with my linking?

/Johan


 g++ -DPACKAGE_NAME=\"dolfin\" -DPACKAGE_TARNAME=\"dolfin\"
-DPACKAGE_VERSION=\"0.6.1\" "-DPACKAGE_STRING=\"dolfin 0.6.1\""
-DPACKAGE_BUGREPORT=\"dolfin@xxxxxxxxxx\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-I. -I. -I../../../src/kernel/common -I../../../src/kernel/fem
-I../../../src/kernel/form -I../../../src/kernel/function
-I../../../src/kernel/io -I../../../src/kernel/la
-I../../../src/kernel/main -I../../../src/kernel/math
-I../../../src/kernel/mesh -I../../../src/kernel/nls
-I../../../src/kernel/ode -I../../../src/kernel/pde
-I../../../src/kernel/quadrature -I../../../src/kernel/parameter
-I../../../src/kernel/log -DHAVE_PETSC_H=1 -I/usr/local/petsc-2.3.0/
-I/usr/local/petsc-2.3.0//bmake/linux-gnu
-I/usr/local/petsc-2.3.0//include -I/usr/local/petsc-2.3.0/include/mpiuni
-I/usr/include/libxml2 -g -O2 -DNDEBUG -pedantic -Wno-long-long
-std=c++98 -MT FEM.lo -MD -MP -MF .deps/FEM.Tpo -c FEM.cpp  -fPIC -DPIC
-o .libs/FEM.o
In file included from ../../../src/kernel/la/dolfin/ublas.h:12,
                 from ../../../src/kernel/la/dolfin/uBlasMatrix.h:18,
                 from ../../../src/kernel/la/dolfin/uBlasDenseMatrix.h:10,
                 from ../../../src/kernel/la/dolfin/DenseMatrix.h:12,
                 from ./dolfin/FEM.h:18,
                 from FEM.cpp:10:
/usr/include/boost/numeric/ublas/vector_of_vector.hpp:17:2: #error class
generalized_vector_of_vector is experiment and currently does not work
In file included from ../../../src/kernel/la/dolfin/ublas.h:12,
                 from ../../../src/kernel/la/dolfin/uBlasMatrix.h:18,
                 from ../../../src/kernel/la/dolfin/uBlasDenseMatrix.h:10,
                 from ../../../src/kernel/la/dolfin/DenseMatrix.h:12,
                 from ./dolfin/FEM.h:18,
                 from FEM.cpp:10:
/usr/include/boost/numeric/ublas/vector_of_vector.hpp:1203: error:
declaration of `class T'
/usr/include/boost/numeric/ublas/vector_of_vector.hpp:32: error:  shadows
template parm `class T'
/usr/include/boost/numeric/ublas/vector_of_vector.hpp:1203: error:
declaration of `class F'
/usr/include/boost/numeric/ublas/vector_of_vector.hpp:32: error:  shadows
template parm `class F'
/usr/include/boost/numeric/ublas/vector_of_vector.hpp:1203: error:
declaration of `class A'
/usr/include/boost/numeric/ublas/vector_of_vector.hpp:32: error:  shadows
template parm `class A'
/usr/include/boost/numeric/ublas/vector_of_vector.hpp:1208: error: type
`boost::numeric::ublas::generalized_vector_of_vector<T, F, A>' is not
derived from type `boost::numeric::ublas::generalized_vector_of_vector<T,
F, A>'
/usr/include/boost/numeric/ublas/vector_of_vector.hpp:1208: error: ISO C++
forbids initialization of member `zero_'
/usr/include/boost/numeric/ublas/vector_of_vector.hpp:1208: error: making
`zero_' static
/usr/include/boost/numeric/ublas/vector_of_vector.hpp:1208: error:
template declaration of `const typename
boost::numeric::ublas::generalized_vector_of_vector<T, F, A>::value_type
boost::numeric::ublas::generalized_vector_of_vector<T, F, A>::zero_'
/usr/include/boost/numeric/ublas/vector_of_vector.hpp:1208: confused by
earlier errors, bailing out
make[4]: *** [FEM.lo] Error 1
make[4]: Leaving directory
`/afs/nada.kth.se/home/m/u1qo8adm/work/computing2/dolfin/src/kernel/fem'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/afs/nada.kth.se/home/m/u1qo8adm/work/computing2/dolfin/src/kernel/fem'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/afs/nada.kth.se/home/m/u1qo8adm/work/computing2/dolfin/src/kernel'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/afs/nada.kth.se/home/m/u1qo8adm/work/computing2/dolfin/src'
make: *** [all-recursive] Error 1





> On Mon, Aug 07, 2006 at 03:09:57PM +0200, Garth N. Wells wrote:
>>
>>
>> Anders Logg wrote:
>> > On Mon, Aug 07, 2006 at 03:00:58PM +0200, Garth N. Wells wrote:
>> >>
>> >> Anders Logg wrote:
>> >>> I have made a class diagram for the linear algebra classes, which
>> can
>> >>> be found either in doc/manual/{dia,eps}/class-diagram-la.{dia,eps}
>> or
>> >>> at
>> >>>
>> >>>     http://home.simula.no/~logg/tmp/class-diagram.eps
>> >>>
>> >> Something wrong with this link.
>> >
>> > Should be
>> >
>> >    http://home.simula.no/~logg/tmp/class-diagram-la.eps
>> >
>> >>> >From this diagram, it is clear there are some inconsistencies. Here
>> >>> are some suggestions:
>> >>>
>> >>> 1. Rename PETScSparseMatrix --> PETScMatrix since there is only one
>> >>> PETSc matrix.
>> >>>
>> >>> 2. Rename DenseVector --> uBlasVector. DenseVector can be a typedef.
>> >>>
>> >>> 3. Break up LinearSolver in two classes: PETScLinearSolver and
>> >>> uBlasLinearSolver and make both pure virtual interfaces.
>> >>>
>> >>> 4. Rename PETScLU --> PETScLUSolver to make it consistent.
>> >>>
>> >>> 5. Rename VirtualMatrix --> PETScKrylovMatrix to make it consistent
>> >>> with uBlasKrylovMatrix.
>> >>>
>> >>> 6. Rename Preconditioner --> PETScPreconditioner to make it
>> consistent
>> >>> with uBlasPreconditioner.
>> >>>
>> >>> 7. Typedefs for common default types should include the following:
>> >>>
>> >>>    Matrix
>> >>>    Vector
>> >>>
>> >>>    DenseMatrix
>> >>>    DenseVector    (something that works with DenseMatrix)
>> >>>
>> >>>    SparseMatrix
>> >>>    SparseVector   (something that works with SparseVector)
>> >>>
>> >>>    LinearSolver
>> >>>    KrylovSolver
>> >>>    GMRES
>> >>>    LU
>> >>>
>> >>>    VirtualMatrix  (something that works with KrylovSolver)
>> >>>    Preconditioner (something that works with KrylovSolver)
>> >>>
>> >> All looks good. Can add
>> >>
>> >>    Rename EigenvalueSolver --> PETScEigenvalueSolver.
>> >
>> > Agreed.
>> >
>> >>> Here's a little list of things I think we should fix before
>> releasing 0.6.2:
>> >>>
>> >>>  - Fix the above cleanups
>> >>>
>> >>>  - Make sure the linear algebra works nicely in PyDOLFIN
>> >>>
>> >>>  - Update the class diagram
>> >>>
>> >>>  - Complete the linear algebra chapter in the manual
>> >>>
>> >>>  - Add a linear algebra benchmark in src/bench
>> >>>
>> >>>  - Add a linear algebra test in src/test
>> >>>
>> >>>  - Add a linear algebra demo in src/demo
>> >>>
>> >> We should also get everything compiling working with the
>> --disable-petsc
>> >> flag (some demos don't compile at the moment) and remove
>> PETSc-specific
>> >> operations if they're not necessary.
>> >
>> > Agreed.
>> >
>> > Is it possible to divide the labor among us (Hoffman, Jansson, Logg,
>> > Wells) and fix this quickly?
>> >
>>
>> Since I messed up the naming by adding uBlas-based classes, I'm happy to
>> take care of the class renaming. After that I can add some uBlas demos
>> and benchmarks.
>
> Sounds good. (But probably I'm to blame for throwing in all the PETSc
> ifdefs to begin with...:-)
>
> I'll start working on a testing framework for DOLFIN so it's simple to
> add unit test for all modules (including linear algebra).
>
> /Anders
>
>> Garth
>>
>>
>> > /Anders
>> >
>> >> Garth
>> >>
>> >>> It would be great if we could all help out so everyone agrees on and
>> >>> knows the design of the linear algebra library. We would then have a
>> >>> well functioning and stable linear algebra library that would
>> require
>> >>> little maintenance so we can focus on other things (like porting to
>> >>> the new mesh library).
>> >>>
>> >>> /Anders
>> >>> _______________________________________________
>> >>> DOLFIN-dev mailing list
>> >>> DOLFIN-dev@xxxxxxxxxx
>> >>> http://www.fenics.org/mailman/listinfo/dolfin-dev
>> >>
>> >> _______________________________________________
>> >> DOLFIN-dev mailing list
>> >> DOLFIN-dev@xxxxxxxxxx
>> >> http://www.fenics.org/mailman/listinfo/dolfin-dev
>> > _______________________________________________
>> > DOLFIN-dev mailing list
>> > DOLFIN-dev@xxxxxxxxxx
>> > http://www.fenics.org/mailman/listinfo/dolfin-dev
>>
>> _______________________________________________
>> DOLFIN-dev mailing list
>> DOLFIN-dev@xxxxxxxxxx
>> http://www.fenics.org/mailman/listinfo/dolfin-dev
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>




Follow ups

References