Thread Previous • Date Previous • Date Next • Thread Next |
// Number of operations to compute entry = 18A[j*6 + k] += ((Jinv_00*FE0_D10[ip][j] + Jinv_10*FE0_D01[ip][j])*(Jinv_00*FE0_D10[ip][k] + Jinv_10*FE0_D01[ip][k]) + (Jinv_01*FE0_D10[ip][j] + Jinv_11*FE0_D01[ip][j])*(Jinv_01*FE0_D10[ip][k] + Jinv_11*FE0_D01[ip][k]))*W4[ip]*det;
My question is, can I just change Jinv_00 to Jinv_00[ip]? That FE0_D10 variable seems to be a special case structure. Isn't the quadrature rule here built SPECIFICALLY for the case of a constant jacobian? If I have a variable jacobian, won't that mess this up?
I can also just throw out the code that is there, and put in my own quad loop. But that kind of defeats the purpose of this `proof-of-concept'.
- Shawn 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. 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. -- Anders 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
Thread Previous • Date Previous • Date Next • Thread Next |