[petsc-users] Matrices - Arrays

Anthony Vergottis a.vergottis at gmail.com
Tue May 14 16:12:42 CDT 2013


P.S I am writing in C/C++


On 14 May 2013 22:06, Anthony Vergottis <a.vergottis at gmail.com> wrote:

> To whom it may concern,
>
> I am very new to Petsc and I would very much appreciate some assistance.
>
> What would be the best way to create an array of matrix objects? The
> number of matrix objects required would be determined during run time.
>
> For example, I am looking into the FEM and I would like to create a matrix
> for each element (I know how to set up the matrix objects). Therefore, if I
> am using a mesh with 100 element I would like to determine during runtime
> that I will need to create 100 "Mat    A[100]" etc, something along those
> lines. Hope I explained it well.
>
> Sorry if this is a trivial question but your help would go a long way.
>
> Thanks, keep up the great job guys!!
>
> Regards,
> Anthony Vergottis
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130514/757c829a/attachment.html>


More information about the petsc-users mailing list