This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Pre-impose values at quadrature points

0 votes

Hi everyone,

for a project I'm working on I need to assign certain values to the quadrature points using an external defined function, and then used these stored values for the computation of the load vector in a problem of linear elasticity. Schematically what I need to do is:

  1. Access all the quadrature points in the global reference system

  2. Apply certain values to them from an external function

  3. Use the applied values to compute the load vector

Is there a straightforward way to do this in FEniCS?

If not can, you help me in where to find the point in the source codes where the actual evaluation of the load vector takes place? I'm looking inside the Dolfin sources but any hint would be really appreciated.

Thanks a lot for your help,
Fabrizio

asked Apr 3, 2017 by frov FEniCS Novice (160 points)

Hi, why exactly do they have to be the quadrature points? It seems like you could define an expression for that, and then the assembly process could take care of evaluating at the points you need.

Hi, thank you for your reply, I can't use an expression because the external function that I will use to create the load vector is composed by a very large sum over a variable number of terms that depend on the output of another code.

The fact is that each single term in this sum is spatially confined so I will use an efficient search algorithm (such as a bounding box tree) to evaluate each term only on the required quadrature points.

But I will take care of this part with an external code so my problem inside FEniCS is actually how to access quadrature points and define a value on them that the code can use when assembling the load vector.

...