numerical integration

Asked by Dupront

Hello,

 I would like to know if I can choose an integration rule
or if an integration rule is automatically attached to the element I select ?
In the latter case how can I know which rule it is ?

Thanks
Michel

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Dupront (michel-dupront) said :
#1

 I have an additional question regarding integration rules.

 Playing with the c++ hyperelasticity demo, I started running the test
with the largangien element of order 1. Than I tried the element of order 2. I noticed
that with element of order 2 the assembly phase was really long.
Looking at the array of quadrature weights in the
file HyperElasticity.h, the size was 1 in the case
of elements of order 1 and 125 in the case of elements of order 2.
Why 125 ? I would have expected a smaller number.
I guess there is something that I don't understand.
If somebody could be nice enough to help me with that ...

Thanks a lot.

> To: <email address hidden>
> From: <email address hidden>
> Subject: [Question #149904]: numerical integration
> Date: Mon, 21 Mar 2011 15:15:08 +0000
>
> New question #149904 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/149904
>
>
> Hello,
>
> I would like to know if I can choose an integration rule
> or if an integration rule is automatically attached to the element I select ?
> In the latter case how can I know which rule it is ?
>
> Thanks
> Michel
>
> --
> You received this question notification because you are a direct
> subscriber of the question.

Revision history for this message
Kent-Andre Mardal (kent-and) said :
#2

You can play around with the numerical quadrature, eg: order can be set as
parameters ["form_compiler"]["quadrature_degree"] = "2"

There are other parameters as well. Look at parameters.keys() etc.

FFC takes an conservative approach which means that
the form is integrated exactly. This may not be what you want.

Kent

On 23 March 2011 21:42, Dupront <email address hidden>wrote:

> Question #149904 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/149904
>
> Dupront gave more information on the question:
>
>
> I have an additional question regarding integration rules.
>
> Playing with the c++ hyperelasticity demo, I started running the test
> with the largangien element of order 1. Than I tried the element of order
> 2. I noticed
> that with element of order 2 the assembly phase was really long.
> Looking at the array of quadrature weights in the
> file HyperElasticity.h, the size was 1 in the case
> of elements of order 1 and 125 in the case of elements of order 2.
> Why 125 ? I would have expected a smaller number.
> I guess there is something that I don't understand.
> If somebody could be nice enough to help me with that ...
>
> Thanks a lot.
>
>
> > To: <email address hidden>
> > From: <email address hidden>
> > Subject: [Question #149904]: numerical integration
> > Date: Mon, 21 Mar 2011 15:15:08 +0000
> >
> > New question #149904 on DOLFIN:
> > https://answers.launchpad.net/dolfin/+question/149904
> >
> >
> > Hello,
> >
> > I would like to know if I can choose an integration rule
> > or if an integration rule is automatically attached to the element I
> select ?
> > In the latter case how can I know which rule it is ?
> >
> > Thanks
> > Michel
> >
> > --
> > You received this question notification because you are a direct
> > subscriber of the question.
>
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~dolfin
> More help : https://help.launchpad.net/ListHelp
>

Can you help with this problem?

Provide an answer of your own, or ask Dupront for more information if necessary.

To post a message you must log in.