Thread Previous • Date Previous • Date Next • Thread Next |
If you're looking at SFC generated code, there is no such thing as quad rules in the Poisson.h file. Thus it is unclear to me what you're doing now. There may be a translation and scaling of the rules from the .py file to the generated code. I think the source rules are defined on [-1, 1] as opposed to the UFC reference cell on [0, 1]. The generated *_integral*.cpp code should have the scaled quad rules embeddded as arrays. Martin On Mon, Jun 22, 2009 at 11:33 PM, Shawn Walker<walker@xxxxxxxxxxxxxxx> wrote: > Alright. I'm looking at these quad rules, the 4-pt rule doesn't match the > weights that show up in the Poisson.h file I have right now. Also, the > coordinates seem weird. Are all of these points evaluated outside the ref > triangle? > > - Shawn > > On Mon, 22 Jun 2009, Martin Sandve Alnæs wrote: > >> SFC doesn't use the same quadrature rules as >> FFC, so that makes no sense in my head. >> Either install SyFi properly with dependencies, >> or keep using FFC and ignore my suggestion. >> >> (If you still want them, the rules SFC use are in >> site-packages/sfc/quadrature/quad_tables.py) >> >> Martin >> >> >> >> On Mon, Jun 22, 2009 at 11:09 PM, Shawn Walker<walker@xxxxxxxxxxxxxxx> >> wrote: >>> >>> Actually, would it be possible for you to just give me the 4-pt quad rule >>> on >>> a triangle. The problem is, I don't have GiNAC setup, which is needed to >>> run SyFi, right? >>> >>> - Shawn >>> >>> On Mon, 22 Jun 2009, Martin Sandve Alnæs wrote: >>> >>>> Ok. Temporarily, maybe you'll be happy with the code >>>> generated by SFC (see the demo/*/cpp/ directories in SyFi). >>>> There both weights and points are embedded directly in the code. >>>> >>>> Martin >>>> >>>> >>>> >>>> On Mon, Jun 22, 2009 at 10:50 PM, Shawn Walker<walker@xxxxxxxxxxxxxxx> >>>> wrote: >>>>> >>>>> >>>>> On Mon, 22 Jun 2009, Anders Logg wrote: >>>>> >>>>>> I think Shawn just wants to get the quadrature points so he can >>>>>> hand-modify the code for tabulate_tensor to handle higher-order mapped >>>>>> elements (to make a prototype for higher-order elements). >>>>>> >>>>>> Correct me if I'm wrong. >>>>> >>>>> Yes! >>>>> >>>>>> In that case, we won't need to make them available since they are >>>>>> available to the form compiler when the code is being generated, but >>>>>> it would help if they were available in a comment in the generated >>>>>> code. >>>>> >>>>> I agree that having them in a comment would be good. >>>>> >>>>> - Shawn >>>>> >>>>>> >>>>>> On Mon, Jun 22, 2009 at 10:28:29PM +0200, Martin Sandve Alnæs wrote: >>>>>>> >>>>>>> On Mon, Jun 22, 2009 at 9:10 PM, Kristian >>>>>>> Oelgaard<k.b.oelgaard@xxxxxxxxxx> wrote: >>>>>>>> >>>>>>>> Quoting Shawn Walker <walker@xxxxxxxxxxxxxxx>: >>>>>>>> >>>>>>>>> Actually, I am still a little confused. Whenever you compute an >>>>>>>>> integral >>>>>>>>> by quadrature, you need to evaluate the integrand at the quadrature >>>>>>>>> points. Those are the points I need. >>>>>>>> >>>>>>>> If you have a quadrature element in your form >>>>>>>> >>>>>>>> element = FiniteElement("Quadrature", triangle, 2) >>>>>>>> >>>>>>>> you can call the >>>>>>>> tabulate_coordinates() function of the dof_map associated with the >>>>>>>> quadrature >>>>>>>> element. If you don't have a quadrature element there is no direct >>>>>>>> way >>>>>>>> of >>>>>>>> getting the quadrature points. >>>>>>>> >>>>>>>>> I just need the quad rule that is used in a particular case. I see >>>>>>>>> the >>>>>>>>> weights are defined in the tabulate_tensor routine. Are the points >>>>>>>>> listed >>>>>>>>> in a comment somewhere? >>>>>>>> >>>>>>>> No, currently not. But it might be a natural thing to have. I'll >>>>>>>> look >>>>>>>> into it. >>>>>>> >>>>>>> It could be an idea to make it available through UFC, >>>>>>> but then again each ufc::*_integral may use different >>>>>>> quadrature rules for different terms... >>>>>>> However, an exception can be thrown if there is no unique rule in >>>>>>> use. >>>>>>> >>>>>>> Martin >>>>>>> _______________________________________________ >>>>>>> FFC-dev mailing list >>>>>>> FFC-dev@xxxxxxxxxx >>>>>>> http://www.fenics.org/mailman/listinfo/ffc-dev >>>>> >>>>> _______________________________________________ >>>>> FFC-dev mailing list >>>>> FFC-dev@xxxxxxxxxx >>>>> http://www.fenics.org/mailman/listinfo/ffc-dev >>>>> >>>>> >>>> >>> >> >
Thread Previous • Date Previous • Date Next • Thread Next |