Menu

how to change quadrature rules in python?

2016-07-19
2016-07-22
  • Guosheng Fu

    Guosheng Fu - 2016-07-19

    Hey guys,

    I have a sourceterm that is highly oscillatory, and I want to integrate the linear form with a very high order quadrature so that I am computing the L2 projection of the source term.

    source = sin(100*(x+y))
    f += SymbolicLFI(f*v) # v is a test function
    f.Assemble() ##FIXME: change quadrature rule??
    

    Is there an easy way to do so?

    Best,
    Guosheng

     
  • schruste

    schruste - 2016-07-20

    Hey Guosheng,

    This was not possible from python. We are working on it.
    You can use the "setintorder" branch from gitlab for now. There you have the possibility to use something like the following

    source = sin(100*(x+y))
    f += SymbolicLFI(source*v,order=12)
    f.Assemble()
    

    This or something similar will probably also be available from the master branch soon.

    Best,
    Christoph

     
    • Guosheng Fu

      Guosheng Fu - 2016-07-20

      Hi Christoph,

      I where is "setintorder" branch?
      I am in ngsolve-git, I did

      git fetch origin
      git branch -v -a

      I didn't see the branch "setintorder"

      Best,
      Guosheng

       
      • schruste

        schruste - 2016-07-20

        Hi,

        are you using the gitlab-repo as master-repo or the sourceforge? The setintorder branch is only on gitlab.

        Otherwise you can apply the attached patch which has the same effect.

        Best,
        Christoph

         
        • Guosheng Fu

          Guosheng Fu - 2016-07-22

          Thanks for the patch.
          It works now.

           

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.