To run the code, type "start_Friedrichs' in the Matlab window.
Mass and stiffness matrices are generated on nested uniform meshes starting from a coarse mesh with 2 elements (level 0) and ending with a finest mesh with 524288 elements (level 9). The Friedrichs' constant is computed as the largest value of a generalized eigenvalue problem. Discrete values are compared with an analytical value known for the unit square domain.
Geometry of interest can be easily changed for instance to L-shape domain by modifying matrices coordinates, elements3, dirichlet.
This is the first part of software generating results for the paper
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)
The paper can be downloaded from the author web
Please cite the paper when using the code.