We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [c++]

A powerful object oriented programming language.

33 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
236 views

Numerical integration using interval arithmetic, nowadays

Is there now a package for rigorous numerical integration that uses interval arithmetic and has access to a well-developed library of special functions? By "well-developed", I mean something that, at ...
4
votes
0answers
218 views

Adaptive mesh data structure for Fast Marching Method to overcome RAM limit

On an uniform mesh of positions in space $\ (x_i,y_j,z_k)$: $$\ x_i = x_0 + i\Delta x,\quad i=0,\ldots,n_x$$ $$\ y_j = y_0 + j\Delta y,\quad j=0,\ldots,n_y$$ $$\ z_k = z_0 + k\Delta z,\quad k=0,\...
3
votes
0answers
38 views

Derivative of Whittaker-Shannon interpolant

Last time we looked at how to improve the accuracy of Whittaker-Shannon interpolation, where user njuffa demonstrated that judicious use of sin_pi could greatly ...
3
votes
0answers
60 views

Structural Analysis Library

Can anyone recommend a structural analysis library that satisfies the following requirements: C++ API Simulate both beam elements and shell (slab) elements Both static and dynamic analysis Free and/...
3
votes
0answers
51 views

Coupled Diff Equation from Bose Einstein distribution

I am a student doing physics hons and have had very little experience in programming. This semester we are supposed to do a computational project in thermodynamics. I have to solve these two coupled ...
3
votes
0answers
900 views

total memory usage of MPI shared memory

I am trying to use the MPI share memory feature. I have several SMP nodes, and each of them has four cores. I need an array of size N for each node that should be accessed by all four cores in each ...
2
votes
0answers
33 views

Algorithm to join hexahedra and obtain outline volume

I would like to join several hexahedra and obtain an outline volume. First, I started with 2D implementation. In 2D, there are non-intersecting quadrangles which always touch each other as shown in ...
2
votes
0answers
1k views

Good C++ optimization library for BFGS

To implement maximum likelihood estimators, I am looking for a good C++ optimization library that plays nicely with Eigen's matrix objects. Eigen has some capability of interfacing of its own but if ...
2
votes
0answers
52 views

Looking for a version of DSDP that is less prone to integer overflows than the original

I am working on a problem that involves semidefinite programming (constrained optimization of fairly large positive definite matrices). The software is written in C++ and calls DSDP 5.8 to solve the ...
2
votes
0answers
147 views

What could be causing multi-dimensional numerical integration inconsistency?

I'm trying to numerically integrate a multi-dimensional expression. The integrand is complicated; for example this is the integrand for $N=4$: $$\begin{aligned}&x_1^6x_2^5x_3^3x_4^2(x_1-x_1x_2)(...
2
votes
0answers
363 views

Using C/C++ for Markov chain Monte Carlo (MCMC) methods

I'm working on optimizing the parameters of a mathematical model to fit experimental data, using an existing formula for the likelihood of observing the data given a set of parameter values. At the ...
2
votes
0answers
86 views

Bracket Algebra, Straightening Algorithm

My apologies if the question is simple. I need to write a code for straightening algorithm. Which includes defining bracket algebra. I tried to write it in CoCoA-5, but it wasn't possible because ...
2
votes
0answers
119 views

Lapack++ for QR algorithm

I have recently started using Lapack++ which I found convenient for my programming purpose, in general. Now, I need to solve a matrix using QR algorithm. I've searched the user manual and I found a ...
1
vote
0answers
38 views

How to deal with a huge system of ODEs in Boost ODEINT?

I am using the C++ library ODEint, which is part of Boost, to solve an extremely large system of coupled ODEs - in particular 1975 equations with large rational functions in the coefficients. In the ...
1
vote
0answers
32 views

Metis: how to use and tutorial recommendation

I am new to METIS and trying to use it in my fortran code. I read the manual online. But still, I am not sure about how to implement it my code. I tried the test cases in the graphs directory. For ...
1
vote
0answers
48 views

FFTW on subarray with MPI

With the guru interfaces of FFTW, I can apply transforms only to parts of a multidimensional array by modifying the fftw_iodim ...
1
vote
0answers
54 views

Dense decomposition of very non-square matrices

I have inherited code that solves Eigen::Matrix problems using the code shown on this page: ...
1
vote
0answers
290 views

Newton - Raphson method : maxima of function in 2 variables

I am computing the maximum of a function (with two-variables) using Newton-Raphson method. The function is : $e^{-(x \ - x_0)^2 - (y \ - y_0)^2}$, whose maxima exists at $(x_0,y_0)$. The Jacobian ...
1
vote
0answers
93 views

MPI_Finalize() only some processors

I want to develop a distributed algorithm with MPI which have load balancing capability. But there is a situation that I'm not very clear about, which is, when the number of tasks is less than the ...
1
vote
0answers
110 views

lightweight implementation of semiempirical quantum chemistry (e.g. MNDO,AM-1,PM3)

I'm searching for semi-empirical quantum chemistry solver which would be easy to integrate into my own software. I found a few implementations which can be in principle used e.g. MOPAC, ORCA, SQM some ...
1
vote
0answers
86 views

Problem in analyzing the program of Gauss Jordan Inverse problem

I had to code a program which calculates Inverse of a matrix by Gauss-Jordan Inverse method , I was trying to analyse the program and then code it myself. the link http://hullooo.blogspot.in/2011/...
1
vote
0answers
412 views

Looking for C++ function for performing optimization of parameters for multivariable function

I am adapting a Java program from C++ and need a C++ function to perform the same task as the Java BOBYQAOptimizer() function. Can anyone recommend a C/C++ library with equivalent or similar functions ...
1
vote
0answers
108 views

C++ Library: What is the Most Efficient Library that Factorizes a Polynomial?

I need to know what library is the fastest one that can factorize a polynomial of large degree whose coefficients are big integers. I have tried NTL library to factorize a monic polynomial but it is ...
1
vote
0answers
89 views

Elemental vs DPLASMA

I want to use one of these two libraries into my C++ project to basically invert a dense matrix (with Cholesky). Of course, I am interested in a distributed environment. Both libraries seem nice so ...
1
vote
0answers
632 views

Can you provide me with the source code of DMRG writen by C++?

I want to study the Density matrix renormalization Group(DMRG). Can some one provide me with the souce code which is writen by C++ for study purpose only? The code is not necessiary very professional, ...
1
vote
0answers
347 views

Practical implementation of spatial binning for rectangular range queries

I have a bunch of polygons and a coarse uniform grid. I want to implement two different range queries, for a rectangle aligned with the uniform grid: Does the rectangle intersect with any polygon at ...
1
vote
0answers
245 views

Memory allocation error with GSL ODE solver applied to system of 4 ODEs

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, ...
0
votes
0answers
42 views

Problem with rate of convergent of numerical scheme for hyperbolic conservation law

I need help to verify my code in C++ that developed to solve the Burgers equation $$\\u_t + (\frac{u^2}{2})_x =0$$ $$u(x,0)=\sin(\pi x),\text{ } -1\leq x \leq 1$$ using a third-order ...
0
votes
0answers
68 views

How to read data from simply formatted text file (c++)?

Mesh information like points, faces and cells is to be stored into separate files: e.g. for points file: # points data: x y z N_Points 100 x1 y1 z1 x2 y2 z2 ... cell file: # cells data: ...
0
votes
0answers
250 views

OpenCV: How to get the “rectified” fundamental matrix?

I have a stereo image pair and the respective intrinsics and extrinsics of both cameras. With this information, I can calculate the fundamental Matrix between the two cameras (let's call it F). I can ...
0
votes
0answers
165 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 ...
-2
votes
1answer
242 views

How to solve this differential equation using RK4 in C++?

I have been given the following homework question to solve: I am having trouble writing a RK4 solver in C++ for this ODE. I am also not sure how to plot my solution. Here is my code so far: ...
-2
votes
1answer
293 views

Solving electron density function for Hydrogen and drawing in 3D

I recently stumbled upon interesting site that has interactive 3D representation of radial electron distribution (atomic orbital). here is the url: http://winter.group.shef.ac.uk/orbitron/AOs/1s/e-...