I maintain (and am the main coder of) a simulation software that has been developed for ~8 years and is used by few hundreds people. It all started as a side project during my PhD, and it clearly outgrew itself. It is both over- and under-engineered: the architecture of some parts is too complicated for their own good, whereas some other parts (whose ...
"developers lack the skills".
I think it's much more likely that the developers lack the incentives. Making solid code is difficult and expensive and, in academia, comes with minimal-to-negative reward. You're asking for a list of things of guidelines, but all of your examples are specific to the technical situation, not the social situation. That'...
Using an Eigen matrix type where the number of rows and columns is encoded into the type at compile time gives you an edge over LAPACK, where the matrix size is known only at runtime.
This extra information allows the compiler to do full or partial loop unrolling, eliminating lots of branch instructions.
If you're looking at using an existing library rather ...
The appropriate and fastest library depends on several things. Which Bessel functions (only J, Y & Hankel or modified Bessel functions I & K too), for which types of arguments (real or complex, integer, fractional or general order)?
Amos's libraries are written in Fortran-77 (there are Fortran-90 coverted versions of TOMS 644 on a mirror of Alan ...
deal.II (see http://www.dealii.org/) does support Nedelec elements and, as a consequence, can solve the problems you're interested in. (Full disclaimer: I'm one of the principal developers of deal.II.)
Another idea could be to use a generative approach (a program writing a program). Author a (meta)program that spits out the sequence of C/C++ instructions to perform unpivoted** LU on a 10x10 system.. basically taking the k/i/j loop nest and flattening it into O(1000) or so lines of scalar arithmetic. Then feed that generated program into whichever ...
Before I answer your question, I just want to clarify one key point: Solving PDE's, like Navier Stokes equations, requires a two step process:
Geometry Discretization (meshing)
Solution of the linear equations
Usually this is done with two separate programs. Meshing can be a very costly operation by itself and should be done carefully according to ...
ParaView should be your best bet.
I would try different versions as each behaves differently (go back as far as 3.12)
You also need to make sure that parallel is switched on (New versions have a "Use Multi-core" checkbox in settings)
You might need to compile your own version if you are unlucky (I had to do this once to get 64 bit headers working)
Hypre has several built-in preconditioners for solving the Maxwell equations. There are several packages that interface to it (you can use hypre from PETSc) as a solver for linear algebraic systems, but it also has a structured grid and finite element interface too.
I'd consider these questions:
Do you want your code to become a fairly general purpose code that you can reuse later, or is this just a bit of code that you're using for one research project or paper that you don't plan to reuse? If you have no plans to reuse the code, then it's probably not worth spending time and effort improving on the code.
Have you ...
We have collected the legal and personal concerns of colleagues and the head of the department and compiled a form that
defines the form, content, and scope of software publication
names the developer
addresses competing interests within the lab
can be signed by the head of the department
to grant a general but well defined approval for software ...
My question is this: to what extent should I try to incorporate these tools into my research code?
Only as much as you feel will pay off for whatever you're trying to do. If you're mostly doing MATLAB scripts, version control and maybe unit testing are going to be all you need. If you have MEX files, it's probably good to have a Makefile that compiles them, ...
OpenFOAM has turbulence models built in, which is helpful. I think it's easier to use OpenFOAM as a black-box solver than to modify its internals (which I found was very difficult given the lack of developer documentation and OpenFOAM coding style). If you're solving the Navier-Stokes equations, there's probably already a solver available in OpenFOAM, in ...
If this is all you need, you might have a look at FreeFem++. There are several working examples (look at the manual, sections 3.9 for a simple example, 3.11 with turbulence), it is very easy to use and you can change the geometry easily, without having to create a mesh with another software.
(However, you have to stick with 2D, and it's not a real library).
This is really going to require some testing with regards to speed, but here are some examples I remember coming across that aren't Boost or GSL:
A wrapper of the Fortran routines by DE Amos is here and on Github
Integer order in ALGLIB here
Also, a related SO question here with links to other C implementations
Your question leads to two different considerations.
First, you need to pick the right algorithm. Hence, the question if the matrices have any structure, should be considered. E.g., when the matrices are symmetric, a Cholesky decomposition is more efficient than LU. When you only need a limited amount of accuracy an iterative method can be faster.
I would try blockwise inversion.
Eigen uses an optimized routine to calculate the inverse of a 4x4 matrix, which is probably the best you're going to get. Try using that as much as possible.
Top left: 8x8. Top right: 8x2. ...
If the main idea is to
highlight the advantages of open-source over commercial software in terms of parallel processing
one has to first answer the question of what one wants to achieve from the simulation. Commercial software packages offer more than just solution of PDE/ODE, meshing, etc. They offer support, documentation, convenient graphical ...
The followings links will help you to find out more.
deal II is a nice advanced open source FEM code. See their page for more information. It also has the support for windows.
Also, this link provides some experience of other experts in this field.
The are Windows ports of the open source FEM code Code_Aster, although these ports are not up to date with the main project, which is available on Linux or FreeBSD.
Code_Aster is part of the Salome software collection, see also Wikipedia an Salome.
People typically agree that the monolithic approach is the conceptually better one, but of course more difficult to implement.
If you want to use a code that already does most of what you need, I would suggest to look at this paper and its accompanying code: http://journals.ub.uni-heidelberg.de/index.php/ans/issue/view/1244
The way this is done in the deal.II library (http://www.dealii.org; disclaimer: this is a project I am affiliated with) is that we describe an unstructured data set of 3d points and then create cells that happen to be two-dimensional. In other words, just output a set of quadrilaterals that happen to live in a three-dimensional space.
To give an example, ...
I suggest taking a look at ADINA.
They have functionality for both fluid-structure-interaction and electrodynamic fluids. This paper may give you more insights into the ADINA functionality and also provide some background on computational techniques for the class of problems you are interested in.
ADINA Electromagnetics ...
Some n-body simulators I aware of are:
1. Gadget: http://www.mpa-garching.mpg.de/gadget/
2. nbody6: http://www.ast.cam.ac.uk/~sverre/web/pages/nbody.htm
3. swift: http://www.boulder.swri.edu/~hal/swift.html (but this may be hard to install)
I would suggest gerris. It does not have a very steep learning curve for simple problems/configurations and it is still being actively developed. It also has adaptive mesh refinement and you can import complex geometry from CAD software. For simpler geometry like boxes, cylinders etc. you can directly define them in the input file. Try starting with tutorial ...