Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

New user NGSolve coding issue

  • Dori
  • New Member
  • New Member
More
1 year 9 months ago #4444 by Dori
Hello,

I am new to NGSolve, I am trying to write the bilinear form and the linear form for the Stokes problem, but I get an error as follows
.
f = LinearForm(X)  
f +=InnerProduct(rhs,v)*dx #Use the code to calc the righthandside
f +=InnerProduct(U_ex,v)*ita/h*ds(skeleton=True)
f +=InnerProduct(grad(v)*n,U_ex)
f.Assemble()
---> 33 f +=InnerProduct(rhs,v)*dx #Use the code to calc the righthandside 34 f +=InnerProduct(U_ex,v)*ita/h*ds(skeleton=True) 35 f +=InnerProduct(grad(v)*n,U_ex)
NgException: In MakeLinearFormIntegrator: must not have TrialFunction
v is a test function not a trial function
Any help would be really appreciated
Thank you
More
1 year 9 months ago #4446 by christopher
How is U_ex, ita, h defined? Does it contain a trialfunction?
  • Dori
  • New Member
  • New Member
More
1 year 9 months ago #4447 by Dori
Replied by Dori on topic New user NGSolve coding issue
No, U_ex is the manufactured solution. The trial function is u and is not in any of the functions included in the linear form.
More
1 year 9 months ago #4448 by hvwahl
Could you maybe provide a minimal working example of your problem?
Time to create page: 0.117 seconds