[petsc-users] Appending to vector / numerical continuation / slepc
Kevin Green
kevin.richard.green at gmail.com
Tue Oct 11 16:18:57 CDT 2011
Successfully updated to petsc-3.2 and slepc-dev.
A note about slepc-dev:
configure failed, with the error
Traceback (most recent call last):
File "./configure", line 10, in <module>
execfile(os.path.join(os.path.dirname(__file__), 'config',
'configure.py'))
File "./config/configure.py", line 344, in <module>
generatefortranstubs.main(petscconf.BFORT)
AttributeError: 'module' object has no attribute 'BFORT'
when I commented out the offending if statement in configure.py, the build
worked, but the tests for fortran examples failed... Not really an issue for
me, but thought I should point this out.
DMcomposite examples:
src/snes/examples/tutorials/ex21.c (the example that seems most useful for
my purpose) fails to run, as the jacobian isn't set within the code... I
thought maybe running it with the -snes_fd option would work, but that
results in a null object somewhere within snes.c. My guess is that an mffd
needs to be in place for this. Or am I missing something?
Up until this point, I have been setting the jacobian on a 2D (periodic in x
and y) DM analytically. To preallocate the nonzero structure of the
jacobian, I use DMDASetBlockFills(...). Now that I wish to use a
DMComposite with the original DM and an array, I presume I'll have to use
DMCompositeSetCoupling(...) to preallocate the jacobian structure, but the
only example quoted in that documentation points this out, but doesn't
actually use it. So...
1. Can I still manage to use DMDASetBlockFills(...) for the DM part of the
composite?
2. How would the array coupling then get "wiggled in" to the structure?
3. It seems like this process could get ugly if the above is not
possible... so if I move away from setting the Jacobian explicitly, do
things become simpler?
That's all for now, it seems fairly intuitive on how to make use of the
composite once it gets set up.
Cheers,
Kevin
On Wed, Oct 5, 2011 at 10:59 PM, Kevin Green
<kevin.richard.green at gmail.com>wrote:
> Jose - Thank you, I'll see if I can get this working.
>
> Barry - This seems to be exactly what I'm looking for. Glancing at the
> documentation briefly, some questions do spring to mind, but I will not ask
> until I look at some of the examples!
>
> Mike - Thanks for the updated link, I didn't even notice that Barry's was
> for 3.0.0.
>
> In the meantime, I'll update to petsc 3.2, and slepc-dev, and get looking
> at these examples. This isn't at the immediate top of my todo list, but I
> expect I'll have some detailed questions on DMCOMPOSITE in a week or so.
>
> Kevin
>
>
>
> On Wed, Oct 5, 2011 at 5:35 PM, Mike McCourt <mccomic at mcs.anl.gov> wrote:
>
>> If you're gonna use PETSc 3.2, make sure to check out the updated
>> documentation:
>>
>>
>> http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/DM/DMCompositeCreate.html
>>
>> It has a more accurate list of examples.
>>
>> -Mike
>>
>> ----- Original Message -----
>> From: "Barry Smith" <bsmith at mcs.anl.gov>
>> To: "PETSc users list" <petsc-users at mcs.anl.gov>
>> Sent: Wednesday, October 5, 2011 4:29:14 PM
>> Subject: Re: [petsc-users] Appending to vector / numerical continuation /
>> slepc
>>
>>
>> Kevin,
>>
>> The DMCOMPOSITE is designed exactly for this purpose. See the manual
>> page
>> http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.0.0/docs/manualpages/DA/DMCompositeCreate.html#DMCompositeCreateand examples it links to. Essentially you create a DMCOMPOSITE and then use
>> DMCompositeAddDM() to put in the DM which will be parallel and
>> DMCompositeAddArray() for the "k" extra things (like continuation
>> parameters). After you read the manual pages and look at the examples and
>> start your code using the DMCOMPOSITE, feel free to ask specific questions
>> about its usage.
>>
>> You definitely should switch to PETSc 3.2 before working because the DM
>> has been markedly improved in places for this type of thing,
>>
>> Barry
>>
>>
>>
>> On Oct 5, 2011, at 12:46 PM, Kevin Green wrote:
>>
>> > Greetings,
>> >
>> > I was just wondering what the simplest way to create a new N+k dim where
>> the first N come from a DA. It seems to me that I would have to go the
>> round about way of getting the array, then writing that to the first N
>> components of the new vector... I think there would be a bit of a pain for
>> the parallel case when doing this though, like in managing the change in the
>> local sizes when going from N to N+k... perhaps it's not that tricky. Also,
>> with DAs I don't have to worry about orderings, correct?
>> >
>> > Essentially I want to get pseudo-arclength continuation working using
>> the SNES solver. Another option I'm thinking is that rather than using an
>> extended vector, I could use a MatShell where the added components are
>> located within its context, and updated upon matmult...since k is typically
>> small, this seems reasonable. Do you know of any code/projects that make
>> use of the SNES module for continuation? Any thoughts on what would be the
>> better or simpler way of doing this?
>> >
>> > I'm using petsc-3.1 right now, as I also need slepc...which hasn't been
>> updated to work with 3.2 yet, as far as I know. I'm fairly new to
>> petsc/slepc... so I have to ask, what is the timescale like between the
>> release of a new petsc, and update of slepc? Or is there a way to get slepc
>> working with the new release?
>> >
>> > Cheers,
>> > Kevin
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111011/3d405bc7/attachment.htm>
More information about the petsc-users
mailing list