Symbolic computation of a finite element

Hello everyone,
I desire to implement my own finite element, where I made a semi-analytical integration. Using symbolic computation symbolic expressions were found to determine the components of the stiffness matrix. This analytical integration is much more efficient at run time compared with calculations by numerical integration. However, I have been looking for ways to edit the way to calculate the stiffness matrix is made and find nothing. That is, I do not find how to edit the way that this matrix is evaluated. Immensely grateful if someone could guide me to edit files. Or at least see if I can or can not do that edition.
Thanks in advance.

Hello Enzo,
it seems like you need to implement a new term - if that is the case, have a look at [1]. Or do you want to modify an existing term? An example of what you want to achieve would help. The stiffness matrix is assembled from (already integrated) contributions of individual terms.
r.
[1] http://sfepy.org/doc-devel/developer_guide.html#how-to-implement-a-new-term
On 10/05/2015 02:56 AM, Enzo Garofalo wrote:
Hello everyone,
I desire to implement my own finite element, where I made a semi-analytical integration. Using symbolic computation symbolic expressions were found to determine the components of the stiffness matrix. This analytical integration is much more efficient at run time compared with calculations by numerical integration. However, I have been looking for ways to edit the way to calculate the stiffness matrix is made and find nothing. That is, I do not find how to edit the way that this matrix is evaluated. Immensely grateful if someone could guide me to edit files. Or at least see if I can or can not do that edition.
Thanks in advance.

Hello Sir Cimrman,
First, I want to thank you for responding so quickly. I read what you said about the creation of new terms. Excellent tool and very good documentation.
I can see that numerical integration is used and I could infer, it is integrated using Gauss quadrature, perhaps. I'm interested in implementing an integration over the stiffness matrix of an customized element, not numerical way, but semi-analytical.
As an example of what I want to do, in the following equation, which corresponds to a stiffness sub-matrix of an axisymmetric element with isoparametric formulation, I desire to introduce my own terms, not from the numerical integration Smith-Griffiths, for example, but my own expressions.
<https://lh3.googleusercontent.com/-Uu2l84eJG4k/VhJnkvn-iwI/AAAAAAAABh8/nq0zp...>
Would it be possible to create a customized finite element and continue using all the advantages of SfePy?
Thank you for your help.

On 10/05/2015 02:25 PM, Enzo Garofalo wrote:
Hello Sir Cimrman,
First, I want to thank you for responding so quickly. I read what you said about the creation of new terms. Excellent tool and very good documentation.
Thanks!
I can see that numerical integration is used and I could infer, it is integrated using Gauss quadrature, perhaps. I'm interested in implementing an integration over the stiffness matrix of an customized element, not numerical way, but semi-analytical.
Yes, it is integrated using the Gauss quadrature (the quadrature tables are in sfepy/discrete/quadratures.py - see also script/plot_quadratures.py).
As an example of what I want to do, in the following equation, which corresponds to a stiffness sub-matrix of an axisymmetric element with isoparametric formulation, I desire to introduce my own terms, not from the numerical integration Smith-Griffiths, for example, but my own expressions.
<https://lh3.googleusercontent.com/-Uu2l84eJG4k/VhJnkvn-iwI/AAAAAAAABh8/nq0zp...>
Would it be possible to create a customized finite element and continue using all the advantages of SfePy?
A SfePy term has to be able to return the following: given the values of FE field variables, return the residual/stiffness matrix in all cells (elements) integrated over each element. The integration is done over a reference element, so a mapping to a physical element is needed, see Term.get_mapping() - this works with quadrature points.
So I would say that the answer is yes, provided you can do the integration/mapping yourself, given only the values of variables - those can be evaluated in any point inside the domain.
r.

Thank you very much Mr. Cimrman. I will review and digest yours advices. I'll keep you posted if I manage integration.
2015-10-05 8:40 GMT-04:30 Robert Cimrman <cimr...@ntc.zcu.cz>:
On 10/05/2015 02:25 PM, Enzo Garofalo wrote:
Hello Sir Cimrman,
First, I want to thank you for responding so quickly. I read what you said about the creation of new terms. Excellent tool and very good documentation.
Thanks!
I can see that numerical integration is used and I could infer, it is integrated using Gauss quadrature, perhaps. I'm interested in implementing an integration over the stiffness matrix of an customized element, not numerical way, but semi-analytical.
Yes, it is integrated using the Gauss quadrature (the quadrature tables are in sfepy/discrete/quadratures.py - see also script/plot_quadratures.py).
As an example of what I want to do, in the following equation, which
corresponds to a stiffness sub-matrix of an axisymmetric element with isoparametric formulation, I desire to introduce my own terms, not from the numerical integration Smith-Griffiths, for example, but my own expressions.
< https://lh3.googleusercontent.com/-Uu2l84eJG4k/VhJnkvn-iwI/AAAAAAAABh8/nq0zp...
Would it be possible to create a customized finite element and continue using all the advantages of SfePy?
A SfePy term has to be able to return the following: given the values of FE field variables, return the residual/stiffness matrix in all cells (elements) integrated over each element. The integration is done over a reference element, so a mapping to a physical element is needed, see Term.get_mapping() - this works with quadrature points.
So I would say that the answer is yes, provided you can do the integration/mapping yourself, given only the values of variables - those can be evaluated in any point inside the domain.
r.
-- You received this message because you are subscribed to a topic in the Google Groups "sfepy-devel" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/sfepy-devel/TM1axxW3RHQ/unsubscribe. To unsubscribe from this group and all its topics, send an email to sfepy-devel...@googlegroups.com. To post to this group, send email to sfepy...@googlegroups.com. Visit this group at http://groups.google.com/group/sfepy-devel.
-- *Atte. Ing. Felix Enzo Garofalo* Web: www.felixenzogarofalo.com Correo eléctrónico: felixenz...@gmail.com / @outlook.com Telf. Local: 0212-8835784 Telf. Celular: 0426-5364387
participants (2)
-
Enzo Garofalo
-
Robert Cimrman