Showing posts with label Finite Element. Show all posts
Showing posts with label Finite Element. Show all posts

Friday, April 27, 2007

ALBERTA on Mac

System: MacBook Intel-Mac OS X 10.4


1. Make sure development libraries are installed.

They are available from OS X installation DVD. Or you can go to HPC for Mac. They have everything.

2. If you want to use gltools, see the following instruction by Omar Lakkis.

Before installing gltools, one must make sure GL are present. A quick check can be performed by doing

$ locate libGL.a
[which in my case gave me]
/usr/X11R6/lib/libGL.a
[this information is important for later.]

and
locate include/GL

/usr/X11R6/include/GL
/usr/X11R6/include/GL/gl.h
/usr/X11R6/include/GL/glext.h
/usr/X11R6/include/GL/glu.h
/usr/X11R6/include/GL/GLwDrawA.h
/usr/X11R6/include/GL/GLwDrawAP.h
/usr/X11R6/include/GL/GLwMDrawA.h
/usr/X11R6/include/GL/GLwMDrawAP.h
/usr/X11R6/include/GL/glx.h
/usr/X11R6/include/GL/glxext.h
/usr/X11R6/include/GL/glxint.h
/usr/X11R6/include/GL/glxmd.h
/usr/X11R6/include/GL/glxproto.h
/usr/X11R6/include/GL/glxtokens.h
/usr/X11R6/include/GL/osmesa.h

INFOS TO RETAIN FROM HERE ARE:
the lib directory /usr/X11R6/lib and the include directory /usr/X11R6/include

Now we must edit the Makefile, namely
[here we use the information retained above from checking the presence of GL]
-----------------------------------------------------------

######
#uncomment or correct these
LIBRARY_PATH=-L/usr/X11R6/lib #this is changed from original
INCLUDE_PATH=-I/usr/X11R6/include #this is changed from original
#GL_LIB=MesaGL

CC=gcc #this is changed from original
CCOPT=-O2

------------------------------------------------------------

Then

# make lib

# make bin


3. Then just config and make install; see my old post.

Before "config", do the following

ln -s /usr/include/malloc/malloc.h /usr/include/malloc.h

otherwise it cannot find the head file "malloc.h".


It seems dynamic library does not work for Alberta on Mac. But if you add an argument "-static" to "EXTRA_LIBS" in "include/Makefile.alberta". I would like to know if there is any other way out.


Acknowledgment:

I would like to thank Dr. Omar Lakkis and Dr. Andera Bonito for sharing their invaluable experience.

Wednesday, November 15, 2006

A New Version of AFEM@matlab released!

In this new version:

1. Many not so efficient commands are replaced by more efficient ones.

2. More comments are added.

3. A new test example Lbig is added. In this example, the maximal degree of freedom is about 110,000. It costs only 60 sec on a Pentium IV 1.4GHz desktop PC.

4. Corrections made according to the M-Lint suggestions.


To download the package, go to:

Matlab Central File Exchange

M-files Database.

Friday, October 20, 2006

AFEM@matlab

AFEM@matlab is a MATLAB package of adaptive finite element methods (AFEMs) for stationary and evolution partial differential equations in two spatial dimensions. It contains robust, efficient, and easy-following codes for the main building blocks of adaptive finite element methods. This will benefit not only finite element method education but also future research and
method development.

The aim of AFEM@matlab is to implement main blocks of AFEMs using MATLAB. It is in the sprit to the ``Ten digit, five seconds, and one page" For the easy of communication and education, our main algorithm will be written in one page long using compact data structures with useful and well laid-out comments. It is good for the academics and it opens the doors wider to non-academics. In spite of its brevity, the package is by no means a ``toy" software. All the codes are written and optimized using MATLAB's vectored addressing and built-in functions. Preliminary numerical tests show that our program can solve a middle size problem (about 10,000 unknowns) in seconds on a desktop PC.

We are still working on this project to extend the package for other problems. To download the package, go to:

Matlab Central File Exchange

M-files Database.

Here is the bib term if you need to cite:

@techreport{Chen.L;Zhang.C2006,
Author = {Long Chen and Chen-Song Zhang},
Institution = {University of Maryland at College Park},
Title = {AFEM@matlab: a Matlab package of adaptive finite element methods},
Year = {2006}}

Wednesday, February 08, 2006

Short note: install ALBERTA

ALBERTA is a great tool for adaptive finite element program design.

For introduction to ALBERTA-1.2, see the official website: ALBERTA.

Before you install ALBERTA, make sure you have BLAS and Fortran libs installed in your system. Furthermore, you'd better install gltools and GRAPE first. They are great graphical tools to present your solutions in 2d and 3d.
  • For gltools, see gltools website. Version 2-4 works fine in ALBERTA-1.2. For Fedora, you first need to make sure you XFree86-devel package has been properly installed in your systme (it is required by gltools). And you may need to modify Makefile to specify your X11 directory because the default one is X11, but you may have X11R6.
  • For GRAPE, see GRAPE website. Whence you have GRAPE and ALBERTA installed together, there will be 4 executable commands you can use to call GRAPE to generate pictures and movies in both 2d and 3d.
Now you can begin to install ALBERTA-1.2. To install with gltools and GRAPE, you may use option --with-gltools-dir=... and --with-grape-dir=... to specify the local directories of these two packages. Everything should be smooth and fine. For installation instruction, see INSTALL document in the alberta dirctory. More detailed options can be found in README.