Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
are there any examples of solving heat conduction problems in 2D with fourier's law as main equation with finite elements and using either libmesh or deal.II libraries?
The 2D heat equation is the only way to solve heat conduction problems. Lots of examples using finite difference, finite element, and boundary element methods. All require meshes of some kind. Which one do you want to apply?
OK, so now we know you want to solve 2D heat conduction problems using FEA. It's a three step process:
Pre-process (create the mesh for your geometry, apply material properties, boundary conditions, and initial conditions (if transient or non-linear).
Perform the analysis (formulate and solve the matrix equations for node and element unknowns).
Post-process (graphical display of results is best, since pictures are worth thousands of words).
Which solver do you wish to use? Is your objective to write one or just use one? Do you want open source? Must it be written in C++? (Not likely. FORTRAN is by far the most common language for such programs.)
Is yours a large problem? I'm guessing no, but massive parallelization might be of interest to you:
http://www.cas.usf.edu/~cconnor/parallel/2dheat/2dheat.html
FEMHub likes Python, probably because of the nice libraries NumPy and SciPy.
Here's a site that lists open source libraries for Java.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 months ago.
Improve this question
I need to solve the heat equation for 2D object using C++. I've found many sources explaining the mathematics behind it. I am using the Crank-Nicholson scheme, but given that I need a 1001 x 1001 discretization, the resulting linear system is huge and memory would blow in case of a "traditional" implementation.
Therefore, I am recurring to methods for solving sparse linear systems. I have been looking online and cannot find any source explaining an algorithm to solve this sparse system efficiently. I've found several packages that do solve it (like csparse, eigen, SciPy under-the-hood implementation), but found no theoretical explanation to really code it myself. For the moment I am trying to do "reverse engineering" on the source code of SuperLU.
What I am looking for is an algorithm that you may know to solve sparse linear systems.
Thanks in advance
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
It seems there are some libraries including CGAL to generate meshes from a 2D or 3D model.
Question: In C++ environment, what is the best way to obtain a set of regular nodes to represent an object that is given by a 3d file format such as the STL?
To explain the question, let me provide an example. In a 2D case, a square can be represented by the set of '1's and the empty space can be by the set of '0's.
Is there any C++ library that can deal with this task?
00000000000000
00000111000000
00000111000000
00000111000000
00000000000000
Thank you in advance.
CGAL it self is already a very good option, if you can match the licenses (many modules are GPL or must pay a fee for proprietary use). This answer shows an example of use.
Another complete library is the Point Clouds Library (PCL) (license compatible with commercial). If your input data is ordered (like the one shown in the question) you can use the pcl::OrganizedFastMesh class.
If your data is un-ordered,
then a pcl::GreedyProjectionTriangulation may be better.
Finally, if using PCL, you can save your triangle mesh to STL using [pcl::io::savePolygonFileSTL](http://docs.pointclouds.org/1.7.0/group__io.html#ga3223bdca3003262efbd8c475d4ab7cc6].
As a final note, better than trying to find a library that exactly matches your input format, find a library that can generate the result you want and then accommodate your input and output to it through convertors. Of course, if your input doesn't provide the required data, such as normals, then you must either compute it previously or search for another method ;).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I have a large 3D matrix and a small 3D matrix which I want to use 3D fft based convolution to find the best match for my small 3D matrix in the larger matrix. Do you have any code in C++ that can do it?
Stackoverflow is no community where one can request a code then gets it done by us, yet we can help you find the necessary resources and information so you are able to do so for yourself (usually questions on how to use libraries and help on specific topics are ok).
Let's come to your question: you already mentioned that you want to use FFT which is by far the best approach - a suitable library would be FFTW, so please take a look at it and keep the following things in mind:
To improve performace try to pad to powers of two which will speed up the process a lot!
Using real FFT and not complex will simplify and speed up this, too.
Usually single precision should be enough to achieve the desired results.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm looking for a library to operate on dynamical graphs. I have a simulation where I must repeatedly calculate the average geodesic length for a graph after doing some changes in its structure (adding and deleting edges, on an undirected graph, all edges have the same weights).
I was using a quick C++ wrap over igraph that I made. igraph is for static graphs, so I was recalculating the geodesic distances from scratch every time I changed the graph. It's a monte carlo simulation, so I must do this millions of times to recover some statistics. It's starting to get real slow.
So I looked for libraries with algorithms for dynamical graphs, that could recalculate just update the average length after I delete or add an edge. I found some papers on the subject, but I'm really no specialist (I'm just a physicist, I'm just incidentally using graphs on a problem... I have almost no knowledge of data structures and algorithms) so I can't even read the papers, let alone implement the algorithms.
I found this library LEDA (http://www.algorithmic-solutions.com/leda/) which seems to have a dynamic graph extension, but it seems to be unmaintained (the links to download the free version are broken) and it's proprietary.
Are there any alternatives? I'm looking for C/C++ libraries. Maybe Haskell if I must, and I'm absolutely desperate.
Since you're doing Monte Carlo anyway, I assume that it would be acceptable to approximate the average shortest-path length. At each step, you could sample a handful of nodes and report the average shortest-path length for paths starting at one of those nodes, which has the same expectation and hopefully reasonable variance.
Alternatively, reference [3] of the JACM paper you mentioned on dynamic shortest-paths is an experimental study from 2004; perhaps the authors would let you use their code.
I know this late, but have you looked at LEMON?
Have you looked at Boost Graph Library
I haven't used it myself, but as part of Boost you can expect it to be very high quality, but it will demand a measure of C++ expertise.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I need to plot my simulation (which I do in a C++ application) for use in a Latex document (so I would prefer some vector output like EPS). My function is of 2 arguments, so I am after a 3D plot, ideally with colouring indicating the function value (similar to what Mathematica does). Could anyone recommend any library?
Why not use gnuplot? I use it for this sort of thing. If you really need a library, then I'd look at gnuplot++
MathGL have large set of 1D (curves), 2D (surfaces) and 3D (volume) plot types. It also have export to EPS and parse some of TeX formulas.
Take a look at QwtPlot3d (http://qwtplot3d.sourceforge.net/), if you can use Qt in your project.
(Basically it is OpenGL rendering library, but AFAIK it has ability to produce EPS output)
PS.I had never used it, but have experience in QwtPlot (related 2d ploting library), and it is pretty well designed and flexible library.
Edit:
From features list of this library:
"..."
"- Vector output (PostScript, EPS and PDF) via gl2ps"
"..."