[petsc-users] Question on PCGALERKIN from command line

Barry Smith bsmith at petsc.dev
Thu Sep 19 09:25:47 CDT 2024


   Galerkin cannot be used completely from the command line since the Galerkin subspace needs to be defined. This is done with `PCGalerkinSetRestriction`(pc,R) and/or `PCGalerkinSetInterpolation`(pc,P).  So you must construct and provide an appropriate R and or P for your problem.

   Sorry the error message is not very good and is confusing.

   Barry

> On Sep 19, 2024, at 8:53 AM, Edoardo alinovi <edoardo.alinovi at gmail.com> wrote:
> 
> Hi Barry,
> 
> I have a quick question on PC Galerking as I am trying to do the same thing reported in this post: https://urldefense.us/v3/__https://lists.mcs.anl.gov/pipermail/petsc-users/2017-June/032934.html__;!!G_uCfscf7eWS!eDk5piTM0B8YRN07CUs3CsN1qDacIINuAycHQ4UmA5iM2PrAKth8OlTpf-gz8BGsRMVavnxc0O-22jWV2PBPvvc$  <https://urldefense.us/v3/__https://lists.mcs.anl.gov/pipermail/petsc-users/2017-June/032934.html__;!!G_uCfscf7eWS!bQ0VYCU_TuGCB-803OHYrdOURUwlOpEAp1j5pu1v1Kh6eUgPPdRF_wkiLfrW342u8LNZ4mpCiqz4OxsAOywju5ZUi9bIZUs$>
> 
> This my command line:
> mpirun -np 4 flubio_coupled -UPeqn_pc_type composite -UPeqn_pc_composite_pcs galerkin,bjacobi -UPeqn_sub_0_galerkin_ksp_type preonly -UPeqn_sub_0_galerkin_pc_type none
> 
> And this is the error:
> [0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
> [0]PETSC ERROR: Object is in wrong state
> [0]PETSC ERROR: Must set operator of PCGALERKIN KSP with PCGalerkinGetKSP()/KSPSetOperators()
> 
> Do I need to set something for PCGALERKING in my code to make it work from command line? 
> 
> Thank you!
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240919/806f8fb9/attachment.html>


More information about the petsc-users mailing list