A powerful object oriented programming language.
1
vote
0answers
1 views
Testing if two 12x12 matrices have the same determinant
I am given a $12 \times 12$ matrix $Q$ that is symmetric, invertible, positive definite and dense. I need to test if $$\det(Q) = \det(12I-Q-J) \; \; (1)$$ where $J$ is the all ones matrix.
I am ...
3
votes
3answers
67 views
Finding the correct Molecular Dynamics library
I just started working on some Biophysics research, and I was looking around for a good MD library to use. There is one right now at the university set up in C, with openMC parallelization, but the ...
3
votes
2answers
90 views
Literature material discussing generic frameworks to solve PDEs
I am trying to gather literature material to study how people propose to implement generic frameworks to solve partial differential equations in C++.
Despite my effort to search the web, the only ...
3
votes
2answers
145 views
FEniCS: extracting points from a cell
I'd like to loop over all edges of a simplex (in a mesh). To this end: How can I extract the the points from a cell?
This is for the eval method of a C++ ...
4
votes
2answers
207 views
How to use polylogarithm function in c++?
Is there any preprocessor directives that could be used to use the polylog function? Or is it included in cmath? If so, do you call it by Li or by polylog?
EDIT:
What I really am trying to do is ...
0
votes
1answer
37 views
Cells segregation
There is unstructured grid which contains only quadrangles cells. Each cell has 4 neighbors, and known them (has a pointer to them). I can iterate through all cells in the grid. Some cells are marked ...
1
vote
1answer
40 views
How to skip the header line in a text file and read back the rest of the data to the main function? [closed]
I'm just learning about text file input/output. I have outputted a file which contains a header and 10 rows of data underneath it.
I now want to read this back to the main function. This works for me ...
7
votes
1answer
139 views
What is the impact of C++11 move semantics in the context of scientific computing?
C++11 introduces move semantics which can, for example, improve code performance in situations where C++03 would need to perform a copy construction or copy assignment. This article reports that ...
1
vote
0answers
36 views
Cplex C++ Interface: Repeated calls of setQuadCoef are slow. Is there an alternative?
I noticed that repeated calls of the member function setQuadCoef of the class IloObjective can be prohibitively slow.
The Cplex ...
3
votes
4answers
189 views
How to find more than one root of a polynomial?
This program finds the first root of the function f, defined in the code. There are 5 roots of this function. (x=1,2,3,4,5) I wish to find all of the roots in this program and print them to the ...
3
votes
1answer
54 views
Library for solving a linear selection problem in a distributed memory machine
I need to solve a very large O(10^10) linear selection problem in a distributed memory machine, is there any library that will solve it for me?
In shared memory ...
1
vote
1answer
205 views
In c++, how to calculate the analytical value of the area between the sine curve and the x-axis?
How would I find the definite integral (between any 2 limits, say a and b) of the absolute value of sin(x)?
I can calculate for the interval 0 to Pi, and from 0 to 2*Pi, but what if the user enters a ...
0
votes
0answers
50 views
Memory errors with GSL ODE solver
I am trying to solve a (large) system of ODEs with GSL solvers. When I use driver method I get an error message of could not allocate space for gsl_interp_accel, ...
1
vote
0answers
19 views
C++ library to mutate pdb residues
Are there any open source libraries available to mutate pdb protein residues? If so are do you have any examples of them?
8
votes
9answers
421 views
Do I need to learn C?
I am a PhD student in Scientific Computing and over the past few months, I spent a good amount of time learning Python and C++ the right way. I feel that I have learnt C++ well and I can use Python to ...
4
votes
6answers
381 views
Soft Question: Where does Python fit into the picture?
So I've been debating whether or not I should bother learning Python. From speaking with my professors, Matlab seems to be the common language used in applied mathematics/computational science as far ...
5
votes
1answer
70 views
Use Butterworth and Chebychev filters
I need to calculate frequency response, phase response and apply to signals the Butterworth, Chebychev1 and Chebychev2 band-pass filters.
I'm developing in C++ with Qt, and I'm looking for algorithms ...
1
vote
1answer
294 views
C++ library for nonlinear constrained minimization
I am currently trying to solve nonlinear constrained minimization problem as implemented in matlab "fmincon" function. My expectations are, minimize(fun1,x0,uB,lB,fun2) where x0 is initial state, fun1 ...
5
votes
3answers
308 views
ROOT (CERN C++ Libraries) alternatives
I have been slowly learning C++ and ROOT for over a year now, in order to debug a program made with it.
Now I reached a point where I can really understand that this will never become easier. ...
4
votes
1answer
152 views
Flexible Mesh Framework
I am looking for flexible and easy to learn mesh framework which provides data structure for representing and manipulating meshes in 2D i 3D. I've already found a few:
MSTK ...
3
votes
2answers
85 views
Are matlab C library versions backwards compatible?
I have some C++ code that links to matlab2008b. Are matlab 2012a and 2012b backwards compatible with 2008b?
If it's not trivially compatible, are there some simple steps to make it compatible?
8
votes
4answers
384 views
Hosting site for a small scientific library
For my research work I have been developing a small C++ library aimed at facilitating the communication between C++ computational codes and Octave/Matlab (when the latter is used for post-processing ...
8
votes
3answers
288 views
Recommendations for a lightweight/no-install C or C++ based dense linear algebra solver
Most of my programming is one-off research codes in C for my own use. I have never distributed any code to other than close collaborators. I have developed an algorithm that I am publishing in a ...
3
votes
1answer
122 views
SQP optimization algorithm tuning advice
I am using a stable version of SQP algorithm from a lib. Parameters setting is left to the developer, althought default values are at hands. I launch solver on very simple optimization problems s.a.
...
4
votes
2answers
138 views
transitive floating point comparison with (absolute) tolerance
I want to compare two floating point numbers for equality relative to a known absolute tolerance. However, this is inside an algorithm I wrote quite some time ago, and I believe the logic of that ...
14
votes
4answers
450 views
Is it a good idea to use vector<vector<double>> to form a matrix class for high performance scientific computing code?
Is it a good idea to use vector> to form a matrix class for high performance scientific computing code?
If the answer is no. Why? Thanks
7
votes
2answers
333 views
Boost::mpi or C MPI for high performance scientific applications?
The thing I dislike most about MPI is dealing with datatypes (i.e. data maps/masks) because they don't fit that nicely with object oriented C++. boost::mpi only ...
5
votes
2answers
266 views
Recommendations for a usable, fast GPL-compatible derivative-free numerical optimization library that can be interfaced to C++
I am dealing with optimization of functions for which I do not have derivatives available, and the optimization is not constrained. I am searching for a high quality GNU Public License-compatible ...
0
votes
0answers
86 views
What is the best C++ library for a AABBtree data structure?
what are your experiences with collision detection libraries that utilise AABBtrees, written in the C++ language? Cann you recommend one that is easy to use and communicates easily to other libraries? ...
13
votes
4answers
778 views
Parallel Scientific Computation Software Development Language?
I want to develop a parallel scientific computation software from scratch. I want some thoughts on which language to start. The program involves reading/writing data to txt files and doing heavy ...
9
votes
3answers
517 views
How to build a recursive spline function in C++
At the moment I am working on a differential equation solving method called basis-spline collocation. What I am having trouble with is building a method to build an arbitrary order spline, with the ...
18
votes
8answers
406 views
What is a good way to run parameter studies in C++
The problem
I'm currently working on a Finite Element Navier Stokes simulation and I would like to investigate the effects of a variety of parameters. Some parameters are specified in an input file ...
0
votes
0answers
103 views
Permissive Math Library for Parameter Statistics in C++
I am looking for recommendations for a C++ math library, with a permissive licence, well suited to calculating a wide variety of statistics on segmentations of timebased parameter data.
I would be ...
10
votes
3answers
535 views
Blaze linear algebra library?
The paper "Expression Templates Revisited: A Performance Analysis of Current Methodologies" in SIAM Journal of Scientific Computing references the "Blaze" linear algebra library. I haven't heard of it ...
7
votes
1answer
174 views
Generalized least squares gradient of a vector field
For computing the gradient of a scalar field, one can use the weighted least squares method as described in the paper Revisiting the Least-squares Procedure for Gradient
Reconstruction on Unstructured ...
8
votes
2answers
269 views
Why would a computational scientist need to implement their own version of std::complex?
Many of the better-known C++ libraries in computational science such as Eigen, Trilinos, and deal.II use the standard C++ template header library object, ...
5
votes
1answer
197 views
Why does std::complex<> initialize its value to 0 upon default construction?
Doing so strikes me as a waste of time. Consider
std::complex<double> *a = new std::complex<double>[1<<28];
This could be near-instantaneous ...
9
votes
5answers
576 views
To what extent is generic and meta-programming using C++ templates useful in computational science?
The C++ language provides generic programming and metaprogramming through templates. These techniques have found their way into many large-scale scientific computing packages (e.g., MPQC, LAMMPS, ...
2
votes
3answers
336 views
What modern OOP features should a computational scientist use? [closed]
Many computational scientists that I know of, including myself for example, are not computer scientists. As such they are often not very well aware more advanced techniques in OOP. On the other hand, ...
14
votes
4answers
605 views
When should I use C++ expression templates in computational science, and when should I *not* use them?
Suppose that I'm working on a scientific code in C++. In a recent discussion with a colleague, it was argued that expression templates could be a really bad thing, potentially making software ...
7
votes
1answer
221 views
C++ library for graphs with maximum common subgraph solver
I'm looking for a convenient, free C++ library for graphs that include a solver for the maximum common subgraph (MCS) problem.
I'm aware of the
Boost Graph Library
and
LEMON
, but neither includes an ...
2
votes
3answers
270 views
How to obtain finite difference, which is continuous
I want to calculate a finite difference (something like this SO Post). My data is as follows: I have x-values that are powers of two (4, 8, 16, 32 and 64). Corresponding to them are y-values, such ...
13
votes
5answers
325 views
Analyzing Numerical Error in C++ Function
Suppose that I have a function that takes as input several floating-point values (single or double), does some computation, and produces output floating-point values (also single or double). I am ...
8
votes
0answers
315 views
Replacing Mathematica's QuasiMonteCarlo integration in C++
I have a Mathematica program which performs some integrals in 3 or 4 dimensions using the QuasiMonteCarlo method. The problem is, it takes an annoyingly long time ...
4
votes
1answer
333 views
Which libraries have good implementations of Basis splines?
I'm looking to use the finite element method with B-splines as my function basis. Which C/C++ libraries have good B-spline support?
Specifically, I'm looking for an implementation of a stable ...
23
votes
11answers
5k views
C++ vs Fortran for HPC
In my computational science PhD program, we are working almost exclusively in C++ and Fortran. It seems like some professors prefer one over the other. I am wondering which one is 'better' or if one ...
11
votes
3answers
526 views
Efficient tridiagonal matrix algorithm implementation
I am solving a physical problem using implicit numerical scheme. This leads me to solving a linear equation with tridiagonal matrix. I've coded this algorithm from Wikipedia. I wonder if there is an ...
