[petsc-users] run option

Xuan YU xxy113 at psu.edu
Mon Jun 28 15:27:36 CDT 2010


On Jun 28, 2010, at 4:17 PM, Barry Smith wrote:

>
> On Jun 28, 2010, at 3:13 PM, Xuan YU wrote:
>
>>
>> On Jun 28, 2010, at 3:47 PM, Barry Smith wrote:
>>
>>>
>>> Do you have a TSSetFromOptions() or a SNESSetFromOptions() or a  
>>> KSPSetFromOptions() or a PCSetFromOptions(). If not then the  
>>> option never gets processed and used.
>>>
>> I only have  ierr = TSSetFromOptions(ts);CHKERRQ(ierr).
>
>   That is fine, that calls PCSetFromOptions() and should process  
> your option. Perhaps you set a prefix for the TS that you need in  
> setting the preconditioner type.
>
This is the petsc code:
         ierr = TSCreate(PETSC_COMM_WORLD,&ts);CHKERRQ(ierr);
         ierr = TSSetProblemType(ts,TS_NONLINEAR);CHKERRQ(ierr);
         ierr =  
TSMonitorSet(ts,Monitor,&appctx,PETSC_NULL);CHKERRQ(ierr);
         ierr = TSSetSolution(ts,CV_Y);CHKERRQ(ierr);
         ierr = TSSetRHSFunction(ts,f,&appctx);CHKERRQ(ierr);
         ierr = TSSetInitialTimeStep(ts,0,1.0);CHKERRQ(ierr);
         ierr =  
TSSetDuration(ts,cData.EndTime,cData.EndTime);CHKERRQ(ierr);
         ierr = TSSetFromOptions(ts);CHKERRQ(ierr);
         ierr = TSSetUp(ts);CHKERRQ(ierr);
         ierr = TSStep(ts,&its,&ftime);CHKERRQ(ierr);
         ierr = VecDestroy(CV_Y);CHKERRQ(ierr);
         ierr = TSDestroy(ts);CHKERRQ(ierr);
         ierr = PetscFinalize();CHKERRQ(ierr);



>   Barry
>
>>
>>
>>
>>> Barry
>>>
>>> On Jun 28, 2010, at 2:24 PM, Xuan YU wrote:
>>>
>>>> Hi,
>>>>
>>>> I run my code by ./xxx -pc_type icc
>>>>
>>>> But it says:
>>>>
>>>> WARNING! There are options you set that were not used!
>>>> WARNING! could be spelling mistake, etc!
>>>> Option left: name:-pc_type value: icc
>>>>
>>>> Could you please tell me what happened?
>>>>
>>>> Xuan YU
>>>> xxy113 at psu.edu
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>>
>>
>>
>
>

Xuan YU (俞烜)
xxy113 at psu.edu




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100628/32391f28/attachment-0001.htm>


More information about the petsc-users mailing list