[petsc-users] Non-official C++ binding for PETSc

Jack Poulson jack.poulson at gmail.com
Tue Sep 13 13:39:03 CDT 2011


Hi Caner,

Is the templating more than aesthetic? It would seem to me from, for
instance,
https://github.com/canercandan/petsc-cxx/blob/master/src/petsc_cxx/Vector.h
that only a single datatype is supported for your Vec and Matrix wrappers
(PetscScalar).

So, for example, in this test
https://github.com/canercandan/petsc-cxx/blob/master/test/t-create_vector_cxx.cpp
could the Vector's x and y instead be built on top of int rather than
Scalar? If not, why bother with the template parameter? It would seem that
the main advantage of these wrappers is the syntactic sugar for printing.

Jack

On Tue, Sep 13, 2011 at 5:58 AM, Caner Candan <caner at candan.fr> wrote:

> Hi PETSc users,
>
> Let's introduce a non-official C++ version of PETSc developed during
> my MSc's degree, this work does not include all the components of the
> library, however you can already find some operators like KSPSolver,
> MultiplyMatVec and Dot. The framework uses a functors-based design
> requiring all components to define an operator function. There are
> also a Matrix and Vector data structure classes.
>
> The sources are available as free software under the terms of the GNU
> GPL license at https://github.com/canercandan/petsc-cxx
>
> Have a look also into the "test" folder in order to see how it works.
> (https://github.com/canercandan/petsc-cxx/tree/master/test)
>
> To build the project, kindly read the README file at
> https://github.com/canercandan/petsc-cxx/blob/master/README
>
> BR,
> Caner Candan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110913/346af772/attachment.htm>


More information about the petsc-users mailing list