numerical lib for C++

P

Philipp Kraus

Hello,

I have a lot differential equation and would solve
the problem with finite element method. Is there
any good open-source lib which I can use with
the boost ublas structures?

Thanks for help

Phil
 
D

DeMarcus

Philipp said:
Hello,

I have a lot differential equation and would solve
the problem with finite element method. Is there
any good open-source lib which I can use with
the boost ublas structures?

I don't know of any library directly compatible with boost, however,
with a couple of adapters, GSL may be a good library for your needs.

http://www.gnu.org/software/gsl/
 
R

Rui Maciel

Philipp said:
I have a lot differential equation and would solve
the problem with finite element method. Is there
any good open-source lib which I can use with
the boost ublas structures?

I'm also writing a FEM program in C++. I've also started using boost::ublas to handle the
matrix algebra and solving the FEM equation but I have to say that it left me a bit
disappointed. It's documentation is rather lacking (it covers data types and not much beyond
that) and basically you are forced to either rely on external routines for basic tasks such as
factorization/solving, dig through the source code to search for undocumented routines or even
implement them yourself. Neither of those is a good option. So, in essence boost::ublas
implements a set of data types that are used to represent vectors and matrices, it offers a
set of algebraic operators but you don't get much more than that.

Another issue I'm having with my code is that generating the FEM equation is taking an awful
lot of time. To be more precise, it takes my code over 2 seconds to build the stiffness
matrix of a 27-node hexahedron for a 3D elasticity problem. After running a code profiler it
pointed out that nearly 80% of that time was spent running boost::ublas routines.
Nonetheless, as I haven't tested this further nor I've compared to any other library then
quite possibly this may very well be due to my appallingly sloppy code. Hey, it happens.

As a consequence I'm currently searching for alternatives to boost::ublas. Eigen[¹] appears
very promising (much better documentation, provides factorization routines which are also
documented) but I haven't had time to test it yet.


Hope this helps,
Rui Maciel


[¹] http://eigen.tuxfamily.org/index.php?title=Main_Page
 
R

Rui Maciel

DeMarcus said:
I don't know of any library directly compatible with boost, however,
with a couple of adapters, GSL may be a good library for your needs.

http://www.gnu.org/software/gsl/

I believe GSL doesn't support sparse matrices, which ends up being terribly limiting and even
needlessly slow for FEM applications.


Rui Maciel
 
P

Philipp Kraus

I believe GSL doesn't support sparse matrices, which ends up being
terribly limiting and even
needlessly slow for FEM applications.

That's correct. GSL don't handle FEM systems. I can write my own FEM
structures, but I need time
to write code. But a lot of FEM systems creates a sparse matrix
structur and there a many kind
to solve this structures on cluster systems (with MPI). I know Abaqus,
but it isn't free.
 
P

Philipp Kraus

Another issue I'm having with my code is that generating the FEM
equation is taking an awful
lot of time. To be more precise, it takes my code over 2 seconds to
build the stiffness
matrix of a 27-node hexahedron for a 3D elasticity problem. After
running a code profiler it
pointed out that nearly 80% of that time was spent running boost::ublas
routines.
Nonetheless, as I haven't tested this further nor I've compared to any
other library then
quite possibly this may very well be due to my appallingly sloppy code.
Hey, it happens.

I use boost::ublas with Atlas and LAPACK lib for some numerical
operations (eigenvalues,
LU factor, ....) In my testing the boost structurs holds only the data
and every numerical
operation is calculatest by Atlas with netlib-lapack.

As a consequence I'm currently searching for alternatives to
boost::ublas. Eigen[¹] appears
very promising (much better documentation, provides factorization
routines which are also
documented) but I haven't had time to test it yet.

It seems that is a little nice lib, but I need more operations
(spectral radius for example).

I have found the DUNE lib on http://www.dune-project.org/ but I don't
take a look at the moment

Thank

Phil
 
Joined
Jul 18, 2010
Messages
1
Reaction score
0
hi,
i too am trying to write a C++ code for FEM... but my aim is top provide provision for other systems as well like molecular dynamics and DFT...
I've tried out the DUNE solvers.... they are good.... however they are specifically for Sparse Matrices..... I would like something which is also has a generic matrix functionality like SCALAPACK for my other calculuations........
then there is MTL4 and MTL though its in development and i have no experience.... does anybody?? is it suitable for MPI based programming.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,146
Messages
2,570,831
Members
47,374
Latest member
anuragag27

Latest Threads

Top