File Exchange

image thumbnail

Computation of the Friedrich's, Poincare and Maxwell constants in 2D/3D

version 2.0 (59.7 KB) by

Computation of Friedrichs', Poincare and Maxwell constants in 2D/3D from eigenvalue problems.

1 Download

Updated

View License

To run the code, type 'start_2D' or 'start_3D' in the MATLAB window.
Mass and stiffness matrices are assembled for nested uniform meshes (triangles in 2D and tetrahedral in 3D) starting from a coarse mesh (level=1 mesh) with few elements and ending up with a finest mesh (level=levels, where levels is predefined) with up to a milion of elements, depending on the memory available.

The Friedrichs', the Poincare and the Maxwell constants are computed from corresponding generalized eigenvalue problems. Their computed values are compared with exact values if these are known (eg. for the unit square domain in 2D and the unit cube domain in 3D) and eigenfunctions are visualized. Domains geometry can be easily changed by modifying input matrices nodes2coords, elems2nodes, dirichlet.
This code generalizes the original computations of the Friedrichs constant explained in the section 3.1. of [1]. The original code to [1] is saved in the 'original_code' folder and can be run as the file 'start_Friedrichs' in the MATLAB window. This code exploits vectorization concepts of FEM assemblies exaplained in [2] and [3] and runs therefore much faster. There will be a separate report explaining analysis and numeric behind a code (in preparation).

Literature:
[1] Jan Valdman, Minimization of Functional Majorant in A Posteriori Error Analysis based on H(div) Multigrid-Preconditioned CG Method, Advances in Numerical Analysis, vol. 2009, Article ID 164519 (2009)

[2] Talal Rahman, Jan Valdman, Fast MATLAB assembly of FEM matrices in 2D and 3D: nodal elements. Applied Mathematics and Computation 219, 7151–7158 (2013)

[3] Immanuel Anjam, Jan Valdman, Fast MATLAB assembly of FEM matrices in 2D and 3D: Edge elements. Applied Mathematics and Computation 267, 252–263 (2015)

The paper can be downloaded from the author's web
http://sites.google.com/site/janvaldman/publications

Comments and Ratings (1)

Nikola Toljic

Works good.

Updates

2.0

This is a major update. Features: now both 2D and 3D computations, vectorized assembly of FEM matrices

1.5

paper citation added

1.4

Faster performance. Almost scalable generation of stiffness and mass matrices.

1.3

description

1.2

description + screenshot

1.1

description

MATLAB Release
MATLAB 8.4 (R2014b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

original_code/

path/

path/library_fem/

path/library_integration/

path/library_meshing/

path/library_vectorization/

path/library_visualization/

path/SparseNullOrth/