Vectfem: a generalized MATLAB-based vectorized algorithm for the computation of global matrix/force for finite elements of any type and approximation order in linear elasticity

Baurice Sylvain Sadjiep Tchuigwa, Jan Krmela, Jan Pokorny, Vladimíra Krmelová, Petr Jilek
{"title":"Vectfem: a generalized MATLAB-based vectorized algorithm for the computation of global matrix/force for finite elements of any type and approximation order in linear elasticity","authors":"Baurice Sylvain Sadjiep Tchuigwa, Jan Krmela, Jan Pokorny, Vladimíra Krmelová, Petr Jilek","doi":"10.1007/s00033-024-02293-w","DOIUrl":null,"url":null,"abstract":"<p>In this paper, we introduce a new vectorized MATLAB-based algorithm for efficient serial computation of global matrix/force arising from finite element method (FEM) for meshes of any type and approximation order in linear elasticity. Because for-loops in MATLAB are very slow, we propose a modified process that takes advantage of vectorization and sparse assembly to achieve good performance while using the same memory as the standard algorithm. For this purpose, by using good programming practices, the implementation of this scheme is succinctly described and can be integrated into any MATLAB package dealing with FEM. Specifically, attention is paid to the calculation of the triplet (row index, column index, matrix components) as well as the assembly of the global stiffness matrix, mass matrix and force vector. Additionally, an extension of the proposed approach for Mindlin plate theory and functionally graded materials is outlined. Finally, the accuracy of this strategy is verified on selected numerical tests after comparing the obtained results with those of ABAQUS. In terms of performance, the study conducted on a set of meshes considering the standard algorithm and two other well-known MATLAB vectorized algorithms revealed that: (i) for a 2D beam problem meshed with <span>\\(P_{1}\\)</span>-triangle elements, a speedup of about 8 and 15 is achieved with <span>sparse</span> and <span>fsparse</span>, respectively. (ii) for a 3D plate problem meshed with <span>\\(P_{1}\\)</span>-tetrahedral elements, a speedup of about 4 and 8 is achieved with <span>sparse</span> and <span>fsparse</span>, respectively. When compared to ABAQUS performance, the proposed scheme results in a computational time that is about five times smaller.</p>","PeriodicalId":501481,"journal":{"name":"Zeitschrift für angewandte Mathematik und Physik","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-07-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Zeitschrift für angewandte Mathematik und Physik","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1007/s00033-024-02293-w","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

In this paper, we introduce a new vectorized MATLAB-based algorithm for efficient serial computation of global matrix/force arising from finite element method (FEM) for meshes of any type and approximation order in linear elasticity. Because for-loops in MATLAB are very slow, we propose a modified process that takes advantage of vectorization and sparse assembly to achieve good performance while using the same memory as the standard algorithm. For this purpose, by using good programming practices, the implementation of this scheme is succinctly described and can be integrated into any MATLAB package dealing with FEM. Specifically, attention is paid to the calculation of the triplet (row index, column index, matrix components) as well as the assembly of the global stiffness matrix, mass matrix and force vector. Additionally, an extension of the proposed approach for Mindlin plate theory and functionally graded materials is outlined. Finally, the accuracy of this strategy is verified on selected numerical tests after comparing the obtained results with those of ABAQUS. In terms of performance, the study conducted on a set of meshes considering the standard algorithm and two other well-known MATLAB vectorized algorithms revealed that: (i) for a 2D beam problem meshed with \(P_{1}\)-triangle elements, a speedup of about 8 and 15 is achieved with sparse and fsparse, respectively. (ii) for a 3D plate problem meshed with \(P_{1}\)-tetrahedral elements, a speedup of about 4 and 8 is achieved with sparse and fsparse, respectively. When compared to ABAQUS performance, the proposed scheme results in a computational time that is about five times smaller.

Abstract Image

Vectfem:基于 MATLAB 的通用矢量化算法,用于计算线性弹性中任何类型和近似阶次的有限元的全局矩阵/力
本文介绍了一种新的基于 MATLAB 的矢量化算法,用于高效串行计算有限元法(FEM)的全局矩阵/力,适用于线性弹性中任何类型和近似阶数的网格。由于 MATLAB 中的 for 循环速度非常慢,我们提出了一种修改程序,利用矢量化和稀疏组装的优势,在使用与标准算法相同内存的情况下实现良好性能。为此,通过使用良好的编程实践,我们简明扼要地描述了该方案的实现,并可将其集成到任何处理有限元问题的 MATLAB 软件包中。具体而言,我们关注了三元组(行索引、列索引、矩阵分量)的计算以及全局刚度矩阵、质量矩阵和力矢量的组装。此外,还概述了针对 Mindlin 板理论和功能分级材料提出的方法的扩展。最后,在将获得的结果与 ABAQUS 的结果进行比较后,在选定的数值测试中验证了该策略的准确性。在性能方面,考虑到标准算法和其他两种著名的 MATLAB 矢量化算法,在一组网格上进行的研究表明(i) 对于使用 \(P_{1}\)-triangle 元素网格的二维梁问题,稀疏算法和 fsparse 算法的速度分别提高了约 8 倍和 15 倍。(ii) 对于使用 \(P_{1}\)-tetrahedral 元素网格划分的三维板问题,使用 sparse 和 fsparse 时分别提高了约 4 和 8 的速度。与 ABAQUS 的性能相比,拟议方案的计算时间缩短了约五倍。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信