View License

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

» Watch video

Highlights from

4.0 | 5 ratings Rate this file 35 Downloads (last 30 days) File Size: 6.49 MB File ID: #31141 Version: 1.2.0
image thumbnail



Shawn Walker (view profile)


21 Apr 2011 (Updated )

Finite ELement Implementation and Computational Interface Tool for You

| Watch this File

File Information

See the GitHub wiki:
for more info.
The following utilities are included:
- 3-D mesh generator for iso-surfaces.
- Closest point searching on meshes, including surface triangulations in 3-D.
NOTE: fixed error with MATLAB's triangulation class.

- Now includes H(curl) elements! Nedelec's 1st kind finite element is implemented.


Example Matlab Class Wrapper For A C++ Class inspired this file.

Required Products Symbolic Math Toolbox
MATLAB release MATLAB 8.3 (R2014a)
MATLAB Search Path
Other requirements C++ compiler
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (13)
18 Oct 2016 yongchao

Dear Shawn,
I want to implement some adaptive mesh for solving my PDE with the toolbox, so I'm wondering is there one example using the adaptive mesh?


Comment only
17 Oct 2016 Shawn Walker

Shawn Walker (view profile)

Hello Ahmed.

There is a tutorial here on solving the Stokes eqn in 2-D. That involves a piecewise quadratic finite element space:

You can also find more info here:

On managing DoFs for higher order finite element spaces.

- Shawn

Comment only
05 Oct 2016 Ahmed Ismaeel

Hello Shawn,
Thank you very much for this great toolbox.
Can you please send me modified two m files (MatAssem_Laplace_1D.m and test_Laplace_1D.m) to solve the same problem but using piecewise quadratic space.
Thank you very much

29 Jun 2016 Shawn Walker

Shawn Walker (view profile)

Hello Jesse.

Thanks for the comment.

As for citing, you can cite the GitHub or Wiki site. There is no official paper for it yet. If you use the TIGER mesher, there is a paper for that

Comment only
28 Jun 2016 jesse chan

Hi Shawn
Tried out FELICITY - installed and tests all passed! One small note - on the tutorial (, when generating a 3D volumetric mesh for the sphere, the line "LS.Param.sign=1" is missing from the tutorial.

Also, how do we cite FELICITY if we use it?

06 Jul 2012 Charles Nelatury

02 Aug 2011 Shawn Walker

Shawn Walker (view profile)

I'm not sure what is wrong. Make sure you verify that your version of MATLAB supports the compiler. If it is a recent version R2010 or later, then you should be fine. But double check the version/compiler compatibility on the MATLAB web site.

Also, did you try this link:

They walk you through the full install.

If that doesn't work, you should email the MATLAB helpdesk.

Comment only
02 Aug 2011 Robin Jens

Hi Shawn

Now I installed the following version of Microsoft Windows SDK 7.1

x64 ISO File Name: GRMSDKX_EN_DVD.iso

CRC#: 0x04F59E55

SHA1: 0x9203529F5F70D556A60C37F118A95214E6D10B5A

First I installed Microsoft Visual C++ 2010 Express as you proposed, but still it cannot find the C++ compiler in matlab when I write mex -setup

Comment only
01 Aug 2011 Shawn Walker

Shawn Walker (view profile)

Let me add another comment. You have to install TWO things (separately) to make MATLAB see MS Visual C++. They are:

1. Microsoft Visual C++ 2010 Express

2. Microsoft Windows SDK 7.1

Both are free and must be installed in that order (sorry I forgot about this).

The following link should be useful for those who want to use MS Visual C++ (Windows):

Comment only
31 Jul 2011 Shawn Walker

Shawn Walker (view profile)

Here is the link I found:

Visual C++ 2010 Express:

It says that it supports 64bit versions, and Windows 7. You may have to register as a user, but that isn't a big deal. Once you have it installed, MATLAB should see it by typing "mex -setup".

Comment only
31 Jul 2011 Robin Jens

Hi Shawn

Which version of Visual C++ edition did you install? In fact I have a 64bit version of matlab R2010a on a Windows 7 computer. Could you send a link where I can download a 64 bit version of Visual C++ express for free?

30 Jul 2011 Shawn Walker

Shawn Walker (view profile)

YES, you do need a 64-bit compiler. When I tested this on Windows 7, I installed Visual C++ express edition (64-bit), and it worked.

Comment only
30 Jul 2011 Robin Jens

Hi Shawn

I have a 64-bit version of matlab installede and tried to install Visual C++ 2010 Express from the following link:
When I wrote m -setup in the command window it could not find the compiler. Do you know if I need a 64bit compiler?

24 Apr 2011 1.1

just changed how my web-site is referenced.

28 Jul 2011 1.3

I replaced the .fml input file (for matrix assembly) by an easier to use MATLAB script.

04 Aug 2011 1.4

Updated web-site to include a brief online tutorial.

22 Sep 2011 1.6

Fully integrated Rivara bisection of triangular meshes with the MeshTriangle class. Also included an Eikonal solver. Various other bug fixes.

09 Feb 2012 1.7

Fixed a few minor issues. Fixed a missing file problem that caused the unit tests to crash on other people's MATLAB installation.

28 Mar 2012 1.8

I cleaned up the internal code considerably; should make future additions easier. This new version now has a framework for H(div) elements, with lowest order Raviart-Thomas (RT0) implemented.

25 Apr 2012 1.9

Fixed some minor bugs related to the matrix assembly code generation.

03 May 2012 1.10

Fixed some minor bugs. Added some helper classes. Updated the documentation.

03 Jul 2012 1.11

Major rewrite of code generation for matrix assembly. Can now define bilinear, linear, and ``real'' forms that involve integrating over multiple sub-domains of different topological dimensions within the same script file. Updated documentation.

11 Sep 2012 1.12

Fixed a few minor bugs. Added some methods to the FiniteElementSpace class (useful for sorting through DoF indices on sub-domains, etc.). Added a chapter in the manual discussing the FiniteElementSpace class and some other convenience routines.

16 Oct 2012 1.13

FELICITY now includes a stand-alone 3-D tetrahedral mesh generator for iso-surfaces. See the Google-Code page for more details.

10 Jan 2013 1.15

Fixed a bug related to MATLAB not successfully copying files. Also updated TIGER meshing interface, as well as the meshing tutorials on the Google-Code page.

13 Feb 2013 1.16

Added automatic code generation for interpolating finite element coefficient functions. Added unit tests, demos, and docs for this. Added tutorial on the Google-Code page. Also added a discussion forum for FELICITY (link is on Google-Code page).

07 Mar 2013 1.17

Added **a lot** of help comments. Now you use MATLAB's help command to get useful information for the user relevant classes. Cleaned up some internal code.

26 Apr 2013 1.18

Fixed a bug with matrix re-assembly. Added a mesh smoother (optimizer). Added tutorials to the Google-Code page.

20 May 2013 1.19

Fixed a stupid bug when using Append_Subdomain in the mesh classes. Added tutorials to Google-Code page and made other changes. Updated PDF manual. Made some improvements to the error checking and error messages in the FiniteElementSpace class.

09 Aug 2013 1.20

Made the generated MEX file for DoF allocation easier to use. Various bug fixes.

16 Jan 2014 1.25

Implemented a point-region (PR) binary tree, quadtree, and octree for fast point searching and nearest neighbors.

17 Jan 2014 1.26

Implemented a point-region (PR) binary tree, quadtree, and octree for fast point searching and nearest neighbors.

10 Jun 2014 1.27

Can mix geometric information from different sub-domains when defining bilinear and linear forms. Added helper classes for saving and loading simulation data, and for running a FE simulation.

05 Aug 2014 1.28

fixed some minor bugs. Added a point searcher for 1-D, 2-D, and 3-D meshes (this includes curves and surfaces embedded in 3-D). Added a quick reference PDF, updated the manual, and Google-Code page.

09 Jan 2015 1.29

Fixed minor bugs. Implemented the second derivative, hessian operator for functions defined on 1-D, 2-D, and 3-D domains (includes curves and surfaces embedded in 3-D). Added the shape operator. Updated FEL_SaveLoad and FEL_Visualize class.

12 Jan 2015 1.30

fixed required products.

12 Jan 2015 1.31

fixed minor bug with some unit tests.

12 Jan 2015 1.32

fixed minor bug with some unit tests.

12 Jan 2015 1.33

fixed minor bug with some unit tests.

23 Aug 2015 1.0.953

Added unit test for solving the heat equation on a surface. Updated image segmentation demo. Fixed bug when matching variable text names (this was in the code generation part of FELICITY). Made some other minor functionality changes.

05 Oct 2015 1.1.0

Moved software version number format to "standard" format; we've made it to version 1.1.0! Added test routine for quadrature rules. Fixed tolerance issue with point searching in meshes. See VERSION_HISTORY.txt.

17 Jan 2016 1.1.1

Fixed some minor bugs that stopped the unit tests.

19 Mar 2016 1.1.2

Added routine for making equilateral triangle meshes in the plane. Moved Google-Code page to GitHub. Added error detection code when given cell indices are out of range (for matrix assembly and interpolation MEX files). Other minor changes.

20 May 2016 1.1.3

Updated compile script for generating MEX files to assemble forms/matrices. Completed the move to GitHub's wiki for the tutorials. Fixed a minor bug with the symbolic toolbox for MATLAB r2016a.

16 Jun 2016 1.1.5

Modified the C++ matrix assembly to be more efficient when lots of sub-matrices are present; this only modifies the internals of FELICITY. This is an initial step to implementing OpenMP for matrix assembly.

17 Nov 2016 1.2.0

Modified mesh class to use MATLAB's triangulation class. Automated point searches on meshes. Changed m-file format for storing/defining a finite element. Implemented H(curl) in 2-D and 3-D! Updated the manual. See readme for more info.

Contact us