[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamic allocation of Non zeros?
- To: petsc-users@xxxxxxxxxxx
- Subject: Re: Dynamic allocation of Non zeros?
- From: "Matthew Knepley" <knepley@xxxxxxxxx>
- Date: Thu, 1 Nov 2007 18:05:07 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=cpbhdLAzIAInDTlx8Tv4nC+8IbfsPf3NXn2KK6UssP0=; b=BrMC0FGFKxHvgTDvtcl4ZBC5/2bdsdI36cxLVUKjDPUuqGc5tub7a6EB/kFtWRzNp3H8X52TS8GKiwwWfF7NDw+fW+pv92NZ7RTXy9oWwCHwQtIsEMCMEcr7/LyTZuBgB6A4mokqNssOlD5aArQipIgpKKP9+x4spfBkFS0fPLE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Gb1POp033N5sBHwpqOD43S7F59R37EVlkP8cvq4CvCC15B/ytc4SN71D0OcDmeYzL+HHQKvbs1LsqBickiYRGe9Ye7ldLmzw1gTP1LVQue4kpPOUc1rPgkpTCqR0BeG3F2b1+PCLLhnnQ3qXILj1p/SXyHf7TnQDltcHvCh2STE=
- In-reply-to: <472A424E.1000608@chalmers.se>
- References: <4729CC2A.6010703@ewi.tudelft.nl> <E63FB52F-1504-4AF3-8578-43B144024C03@mcs.anl.gov> <472A424E.1000608@chalmers.se>
- Reply-to: petsc-users@xxxxxxxxxxx
- Sender: owner-petsc-users@xxxxxxxxxxx
The short answer is that preallocation looks exactly like an assembly, but
individual values are not calculated, just sizes. You can look at the routines
I have for this for the Mesh class in preallocateOperator() in
src/dm/mesh/mesh.c.
Matt
On Nov 1, 2007 4:17 PM, Berend van Wachem <berend@xxxxxxxxxxx> wrote:
> Hi Barry,
>
>
> > Perhaps you could describe how your matrix entries are generated and
> > we can suggest a
> > preallocation scheme?
>
> Are there examples of preallocation schemes for PETSc? For instance, if
> I would like to solve Poisson equation on an irregular grid (9 point
> stencil in 2d and 27 in 3d) on n processors?
>
> Thanks,
> Berend.
>
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener