instruction stringlengths 43 28.1k |
|---|
I'm trying to solve a 2D Poisson equation by finite differences. In the process, I obtain a sparse matrix with only $5$ variables in each equation. For example, if the variables were $U$, then the discretization would yield:
$$U_{i-1,j} + U_{i+1,j} -4U_{i,j} + U_{i,j-1} + U_{i,j+1} = f_{i,j}$$
I know that I can solve ... |
For a synchronized ODE system,I wanted to know if there is a program code in MATLAB available for plotting the conditional Lyapunov exponent. For example, synchronization of identical Rossler system with a coupling term $F$ present in both the response and the driver.The $F$ is not a coefficient of any variable. This ... |
What numerical methods are available for finding the fixed point of an operator $A$ that is acting on functions $f : [a,b] \rightarrow [a,b]$? I am looking for the function $f$ for which $Af = f$.
Essential details:
My function $f$ is actually a probability density function of a distribution on the circle (i.e. on the... |
I can see that there are multiple heuristics to achieve a matrix with minimum bandwidth. As heuristics, they can't guarantee an optimal solution in polynomial time (after all, the problem is NP-complete).
I wonder, then, for the finite difference discretization of the Poisson problem, how does the bandwidth expand as... |
I faintly recall from my early "numerics" lectures that iterative linear solvers for $Ax=b$ often require that when $A$ is decomposed as
$$A=D + M$$
where D is a diagonal matrix and $M$ has zero diagonal,
the elements of $D$ should be dominant over the entries in $M$ for iterative solvers to perform well.
What if th... |
I have heard that a fast fourier transform can be used to solve the poisson problem when the boundary conditions are all one type... Sine series for dirichlet, cosine for neumann, and both for periodic. Considering a 2D rectangular domain, suppose two opposite sides have periodic boundary conditions, and the other two... |
Recently, I've been asking about methods to solve a finite difference discretization of the 2D Poisson equation (see here and here) of the form:
$$U_{i-1,j} + U_{i+1,j} -4U_{i,j} + U_{i,j-1} + U_{i,j+1} = f_{i,j}$$
The left hand side of this system is often referred to as the 5-point discrete Laplacian. Suppose that... |
I see that there are many files in the ScaLAPACK library without any immediately obvious naming convention... I'm sure that if the first letter is "p", it means parallel. But I'm not sure how to make sense of the rest of the names as seen here.
|
I have a couple of questions regarding the following:
I am trying to solve the Schrodinger equation in 1D using the crank nicolson discretization followed by inverting the resulting tridiagonal matrix. My problem has now evolved into a problem with periodic boundary conditions and so I have modified my code to use the ... |
I have a set of constraints over modular domains e.g. $\exists a \in A_i : x \equiv a \pmod{n_i}$ for all $i=0,\ldots,k$
The question is, does such an $x$ exist? I've been pointed to method of successive substitution which ended up with me implementing the following python code.
import fractions
def exist(ruleList, acc... |
Consider an IVP for ODE system $y'=f(x,y)$, $y(x_0)=y_0$. Most commonly this problem is considered stiff when Jacobi matrix $\frac{\partial f}{\partial y}(x_0,y_0)$ has both eigenvalues with very large negative real part and eigenvalues with very small negative real part (I consider only the stable case).
On the other ... |
I have transferred my MATLAB Lanczos solver for symmetric eigenvalue solvers to C++ with the help of Intel MKL and MTL4 libraries. I have some wrapper templates for MKL routines. However during the iterations, the results of my C++ implementation starts to deviate from the values that MATLAB finds. Up to some point in ... |
I just installed the PETSc library. This is what I did from the home directory ~
gunzip -c petsc-3.2-p6.tar.gz|tar -xof -
cd ~/petsc-3.2-p6
PETC_DIR=$PWD: export PETSC_DIR
./configure --download-f-blas-lapack=1
make all
make PETSC_DIR=/export/home/myusername/petsc-3.2-p6 PETSC_ARCH=arch-linux2-c-debug test
(note: I d... |
I found the following thread in the physics stackexchange where I saw the video called output attached to the main post. The video can be found here.
How would I go about creating such an animation?
|
I'm having an issue with my project. When I run the code of Monte-Carlo simulation, on the local server (the machine in my office) it runs on a rate of roughly 100000 steps per 24 hours. When I run it on the cluster the rate drops to about half of that or even less.
I am trying to figure this but I can't find any reas... |
Peersim is a peer-to-peer network simulator. I'm simply trying to get the program to print out the network (an edge list is fine). Presumably this is possible, since there is an in-built writeEdgeList function.
I suspect there is an easy way to do this by modifying this line in the example: include.control io degree ... |
I'm trying to compile a hello world program using PETSc, based off of this tutorial, slide 33 . How would I compile this? I know that I can't use a simple 'mpicc' command. When running the program, would I use the standard mpirun or mpiexec?
|
I have an application in which I am computing a quantity which is approximated by an average over $M$ points. In theory, the average converges to the correct quantity when $M$ is infinite. In practice, the computation involves a $M\times M$ symmetric positive definite matrix, whose condition number gets huge when $M$ i... |
Recently, I've encountered a bizarre problem with FORTRAN95. I initialized variables X and Y as follows:
X=1.0
Y=0.1
Later I add them together and print the result:
1.10000000149012
After examining the variables, it seems as though 0.1 is not represented in double precision with full accuracy. Is there any way t... |
The title says most of it.
I'm looking for a lightweight and easy-to-use library that I can use for Android (NDK) projects.
For dense stuff I like using Eigen but I haven't found many comprehensive (and documented!) libraries for sparse stuff that "just work" in a project.
PETSc seems a little heavy with all these MPI ... |
I have a two-dimensional function $f(x,y)$ whose values I would like to sample. The function is very expensive to compute and it has a complex shape, so I need to find a way to get the most information about its shape using the least number of sample points.
What good methods are there to do this?
What I have so far
... |
In Finite Element theory, and other methods in scientific computing for PDEs, one uses meshes which fulfill several regularity criteria, many of them being equivalent.
It is of interest to have notions of shape-regularity in arbitrary dimensions. While some authors use this as if there were full analogies of the two-di... |
I want to learn MATLAB programming so that I can conduct some researh/analysis on my own and also, so that I can study/modify some MATLAB scripts that I have found online etc.
However, the problem is that I can't afford MATLAB. GNU Octave, from what I have heard, is quite MATLAB compatable. The challenge with Octave th... |
Usually one would consult a paper or book to find integration points and weights for unit triangle and tetrahedra. I am looking for a method to automatically compute such points and weights. The following Mathematica code example computes integration weights and points for unit line (quad/hexahedron) elements:
unitGau... |
In the numerical methods literature, many research papers consist of a description of a new algorithmic variation, followed by a few test problems comparing the new method with one or two existing methods. This makes it difficult to determine
How the new method would perform on other problems of interest
How the new ... |
I'm looking into using artificial neural networks (ANN) to predict the reaction rates in my fluid instead of solving the full system of stiff ODEs. Some people from my lab have already done some work on that so I don't start from scratch but I am having problems with my applications. One of them I think relates to the ... |
So I've got a decent head for what problems I work with are best one in serial, and which can be managed in parallel. But right now, I don't have much of an idea of what's best handled by CPU-based computation, and what should be offloaded to a GPU.
I know its a basic question, but much of my searching gets caught in p... |
The computation of eigenmodes of a semi-circular membrane reduces to the following eigenvalue problem
$$\nabla^2u=k^2u\;,$$
where the region of interest is a semi-circle defined by $r\in[0,1]$ and $\varphi\in[0,\pi]$.
It is appropriate to work in cylindrical coordinates, where the Laplacian is written as
$$\nabla^2u=\f... |
I'm talking about the vanilla sudoku game, with 9x9 grids equally split into 9 regions.
I've tried a few approaches to estimate the probability that a specific number is in a specific location, but I can't seem to find the right pattern about it.
Suppose I have this (partial) grid:
What kind of calculation or method w... |
There is a system of linear constraints ${\bf Ax} \leq {\bf b}$ . I wish to find a strictly
positive vector ${\bf x} > 0$ that satisfies these constraints. That means, $x_i > 0$ is
required for every component $x_i$ of ${\bf x}$.
How can I use an LP solver to find such a strictly positive vector ${\bf x}$ (or confirm t... |
A linear system of equations has the form $Ax = b$, where a matrix $A$ and a
vector $b$ are given, and I wish to find a solution vector $x$.
Suppose that the system $Ax = b$ has no feasible solution. Then I
wish to find a solution vector $x$ such that $Ax$ is “as close as possible” to $b$.
Of course, this notion is not... |
I want to study the methods of analyzing textured images. So i searched google scholor but only found very old papers
statistical and structural approaches to texture 1979 haralick
Image Texture Analysis Techniques - A Survey (1980)
Texture analysis — a survey July 1980
Texture Analysis Methods – A Review 1998
Does ... |
When evaluating the number of FLOPs in a simple function, one can often just go down the expression tallying basic arithmetic operators. However, in the case of mathematical statements involving even division, one cannot do this and expect to be able to compare with FLOP counts from functions with only additions and m... |
Is there an algorithm that enumerates the graphs that correspond to some Delaunay tessellation of points in 3D?
If so, is there an efficient parameterization of geometries that correspond to any "Delaunay graph"?
I am looking to enumerate systematically all stable geometries of molecules of a specified composition wit... |
After configuring and building PETSc, I have successfully been able to run several examples. In particular, I am working with this example. I have been able to run the program using the following commands:
make ex2
mpiexec -n 4 ./ex2 -m 40 -n 40
which produces the following output:
Norm of error 0.000642883 ite... |
I was comparing a few of my codes to "stock" MATLAB codes. I am surprised at the results.
I ran a sample code (Sparse Matrix)
n = 5000;
a = diag(rand(n,1));
b = rand(n,1);
disp('For a\b');
tic;a\b;toc;
disp('For LU');
tic;LULU;toc;
disp('For Conj Grad');
tic;conjgrad(a,b,1e-8);toc;
disp('Inv(A)*B');
tic;inv(a)*b;toc;
... |
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 working primarily with MSVC 2008, but also plan to work with MinGW/GCC. I'm programming in C++.
What is the typical way of p... |
I have a very basic notion about interval arithmetic (IA), but it seems to be a very interesting branch of computational science both theoretically and practically. It is clear that the obvious applications are verified computing and ill-posed problems, but this is too abstract. Since there are a lot of people involv... |
I was reading this on Math SE. The basic question is :
Assume that someone wishes to study something advanced; one way to do this would be to start off from basics and build up. But the "bigger picture" can get lost in this process. One more method (which I prefer to call Recursive Wiki) is to pick up a paper and Googl... |
When I run a PETSc example in parallel with the flag "-log_summary", the first two tables of information look something like this:
Max Max/Min Avg Total
Time (sec): 2.512e-01 1.00547 2.505e-01
Objects: 5.800e+01 1.00000 5.800e+01
Flops: ... |
I would like to learn how wavelet methods can be applied to PDE, but unfortunately I do not know a good resource to learn about this topic.
It seems that many introductions to wavelets focus on interpolation theory, e.g., assembling a signal by a superposition of preferably few wavelets. Applications to PDEs are someti... |
As we know, orthogonal transformations methods (Givens rotations and Housholder reflections) for systems of linear equations are more expensive than Gaussian elimination, but theoretically have nicer stability properties in the sense that they do not change the condition number of the system. Although I know just one a... |
I have multiple objective functions which are related to several parameters. I want to minimise more than one objective functions using several parameters. Is it even possible using BFGS?
When I used L-BFGS to minimise one objective function using several parameters, it worked fine. However, I am unable to minimise mul... |
After some Bayesian update steps, I am left with a posterior distribution of the form of a mixture of normal distributions,$$\Pr(\theta| \text{data} ) = \sum_{i=1}^k w_i N(\mu_i, \sigma^2).$$ That is, the parameter $\theta$ is drawn from a distribution whose PDF is given as a weighted mixture of normal PDFs, and is not... |
I have a dense real symmetric square matrix. The dimension is about 1000x1000.
I need to compute the first principal component and wonder what the best algorithm to do this might be.
It seems that MATLAB uses the Arnoldi/Lanczos algorithms (for eigs). But from reading about them I'm not sure whether they have any advan... |
Assuming one wishes to study numerical linear algebra in depth (and follow journals on numerical linear algebra and matrix theory), which would be a better course/better book to take up at first:
With Hoffman and Kunze with proofs and rigor (I don't have problems with rigorous math).
OR
With Prof. Strang's book with... |
How would you represent functions of type $[-1, 1]^n \to \mathbb R \;$ for moderate $n$? How would you integrate them?
For small $n$ (1-2) such functions can be represented as histograms, vectors in some base, etc. For really large $n$ one employs other techniques, like neural networks or for integration monte-carlo me... |
I'm profiling the performance of PETSc's linear solvers. As I understand it,
$$\text{speedup}=\frac{\text{Sequential Time}}{\text{Parallel Time}}.$$
I know that running the parallel code on one processor can be used as a proxy for the sequential performance. However, I don't think it is a good measure of an equiv... |
As I understand it, there are two major categories of iterative methods for solving linear systems of equations:
Stationary Methods (Jacobi, Gauss-Seidel, SOR, Multigrid)
Krylov Subspace methods (Conjugate Gradient, GMRES, etc.)
I understand that most stationary methods work by iteratively relaxing (smoothing) ... |
I know that a conjugate gradient method is guaranteed to converge to the solution of a linear system if the matrix is positive definite. I'm working with a family of matrices that have the following properties:
sparse
symmetric
weakly diagonally dominant
invertible
all nonzero entries are strictly positive.
I don'... |
I want to plot a few sets of data points on the same x-axis that have different units. How can I set different axes for each incompatible quantity?
|
I have implemented a comparability graph recognition algorithm from M.C. Golumbic's "Algorithmic graph theory and perfect graphs" book. It is hinted in Fekete, Schepers, and van der Veen's "Exact Algorithm for Higher-Dimensional Orthogonal Packing" paper that the algorithm can be modified such that given the negative ... |
I'm not very familiar with PBS (we have torque installed here), and I have only used it to run one process per job so far, so bear with me.
The actual problem
I am trying to use Mathematica on a cluster. Mathematica's parallel processing is implemented by launching multiple worker processes (called subkernels), and se... |
I always calculate things by hand, but now my comrades are getting nasty and making a lot of repetitive exercises involving just plugging things in like the expression above. I am particularly interested in open-source software such as Python or R to simplify these kinds of equations. I tried using Wolfram Alpha, but I... |
I'm working with someone else's code that uses PETSc 3.0.0-p9.
They have a vector at the end of the computation that is distributed among a number of different processors, and I want to output that vector to a file.
Unfortunately, the way they do it doesn't appear to work. Is there an easy way to write (the real part)... |
I am trying to implement an algorithm from a paper which makes use a QR factorization of a real matrix $A$ as a means of one of forming the Cholesky factor of $A^T A$ without explicitly forming $A^T A$ (which is generally ill-conditioned).
In particular:
We have a covariance matrix $\mathbf{P}_x = \sum_{i=0}^{2L} w_i \... |
I can find the
random('normal', 0, 1, 10000,1)
command in MATLAB but it generates half-normal variates. I would like to generate random half-normal variates. The half-normal distribution is defined by
$$f_{|Z|}(x)=\frac{2}{\sqrt{2\pi}}e^\frac{-x^{2}}{2}.$$
Can I generate a random half-normal variates from random norm... |
I have primarily dealt with Dense Matrices arising from Electrodynamics. However, I am interested in knowing where else Dense Matrices occur. I am especially interested in knowing where they occur in:
Discretization of PDEs
Engineering
Science
Statistics
Sparse matrices are present in FVM, FDM, FEM and so many others... |
Given an arbitrary set of (numerical) square complex matrices $\mathcal{A}=\{A_1,A_2,\cdots,A_m\}$, I am interested in computing the real matrix Lie algebra generated by $\mathcal{A}$, call it $\mathcal{L_\mathcal{A}}$. That is, I would like a basis for
$$
\mathcal{L_\mathcal{A}} = \mathbb{span_R}\{B:B\in\cup_{k=1}^{\... |
According to these lecture notes, a checkerboard block decomposition should exhibit better scalability when applied to parallel matrix-vector multiplication (presumably because of greater cache hit rate). Since the conjugate gradient method also uses a matrix-vector multiplication, I would think that this form of bloc... |
I solve a lot of PDEs numerically, but applied math isn't my field. I haven't picked up on which applied math journals I should read to keep up with recent developments in the field.
What are good journals to read to keep up with recent developments in solving PDEs numerically?
|
A very common problem in Markov Chain Monte Carlo involves computing probabilities that are sum of large exponential terms,
$ e^{a_1} + e^{a_2} + ... $
where the components of $a$ can range from very small to very large. My approach has been to factor out the largest exponential term $K := \max_{i}(a_{i})$ so that:
$$... |
For the solution of large linear systems $Ax=b$ using iterative methods, it is often of interest to introduce preconditioning, e.g. solve instead $M^{-1}(Ax=b)$, where $M$ is here used for left-preconditioning of the system. Typically, we should have that $M^{-1}\approx A^{-1}$ and provide the basis for (much more) eff... |
I have an ODE:
$u'=-1000u+sin(t)$
$u(0)=-\frac{1}{1000001}$
I know that this particular ODE is stiff, analytically. I also know that if we use an explicit (forward) time stepping method (Euler, Runge-Kutta, Adams, etc.), the method should return very large errors if the time step is too large. So, I have two questi... |
Background
I'm currently working with two quantum software packages: Gaussian 09 and CFour. CFour does a very good job giving explicit control over how you want to invoke frozen core approximations and explains how the default handling is done via the Frozen_Core=On option.
Gaussian 09 has a documentation page regardi... |
I want to plot
$$f_{n}(x) = \begin{cases} x-n & \text{for } n \leq x \leq n+1 \\
2-x+n & \text{for } n+1\leq x \leq n+2 \\
0 & \text{otherwise.}
\end{cases} $$
How can I plot a piecewise function like this one using open-source software?
|
Every scientist needs to know a bit about statistics: what correlation means, what a confidence interval is, and so on. Similarly, every scientist ought to know a bit about computing: the question is, what? What it is reasonable to expect every working scientist to know about building and using software? Our list of co... |
What are the "Pros and Cons" for these two methods of mesh-refinement? Both seem to be the prevalent methods.
I can naturally imagine that global red refinement is comparatively easy to implement and attractive for research in multigrid-methods, while NVB is used in AFEM-theory because some attractive formal properties... |
I am trying to solve a one-sided non-linear least-squares problem with linear constraints, i.e the problem:
$\min_{\mathbf{x}} \quad \sum^m_{i=1} \mathbf{r}_i(\mathbf{x}) \qquad \text{ s.t } \quad A\mathbf{x} \leq \mathbf{b}$
where
$r_i(\mathbf{x})=f_i(\mathbf{x})^2$ if $f_i(\mathbf{x})>0$, and $r_i(\mathbf{x})=0$ els... |
As the title suggests, what are the differences between the frozen core approximation as implemented by Amsterdam Density Functional and effective core potentials (ECPs)?
|
My matrix sizes have grown beyond what can fit on the RAM but I have a function which defines each element cheaply.
Is it possible use BLAS (in Fortran or even in MATLAB) in such cases?
If I had a matrix in memory, I could use dgemv or dgemm or whatever and pass my matrix as one of the arguments. Now, I have no matrix.... |
Diffusion kernels are kernels which "project" information about graphs into $R^n$ so that certain machine learning techniques can be performed.
I have read through this paper and feel fairly comfortable with the theory behind these kernels, but I'm looking for guidance about how they can best be applied.
An example pro... |
We have Maui and Torque on our lab's UNIX cluster. Right now, all jobs are served by FIFO. We'd like to implement a more fair policy, but I have not successfully implemented it. The online documentation was not quite clear, and nothing that I've tried to implement has had any effect (I've altered the config file, then ... |
Wherever I have seen, PETSc tutorial/documents etc. say that it is useful for linear algebra and usually specifies that sparse systems will benefit. What about dense matrices? I am concerned about solving $Ax=b$ for dense $A$.
I have written my own code for CG and QMR in Fortran. The basic construct is to rip apart the... |
We have an adaptive mesh refinement (AMR) code for solving the elastic wave equation with frictional fault interfaces (based on Chombo for those that are interested). One of the things that we have realized is that our results are being strongly affected by the presence of the outer absorbing boundary (which we impleme... |
In the problem of protein-ligand docking, most of the time people are happy if they can just predict the final conformation the ligand adopts into the protein's binding pocket. Most of the time one can just use a physical based scoring function and an energy minimization method to try to find the minima. But in some ot... |
I would like to test the influence of solvation parameters in implicit solvation models and wonder which codes are freely available as standalone programs for protein folding of small proteins, and which use energy minimization approaches instead of dynamics, so I am not looking for molecular dynamics codes.
|
My comrades repeatedly encourages monotonous problems where the issue is the same: chain-rule and some basic arithmetic. Is there some computational way to derive power series approximations? Suppose I plug in some function such as $e^{x^{2}+x+ln(x)+x^{777}}$, $e^{x^2}$ or $x^{777}-ln(x)+e^{2x+1}$, some command such as... |
I'm trying to implement a Conjugate Gradient solver using Hierarchical Basis Functions, following this paper.
In section 3 the paper says that the hierarchical basis matrix $S$ can be decomposed into a "series of very sparse matrices $S = S_1S_2...S_{L-1}$ " but it doesn't tell the exact structure of these matrices $S_... |
This question is an extension of two discussions that came up recently in the replies to "C++ vs Fortran for HPC". And it is a bit more of a challenge than a question...
One of the most often-heard arguments in favor of Fortran is that the compilers are just better. Since most C/Fortran compilers share the same back en... |
I am very impressed with the serial performance of multilevel inverse-based ILU preconditioners, particularly for heterogeneous Helmholtz, but I am surprised to not be able to find any open source implementations. In particular, ILUPACK makes binaries freely available to academics, but it does not appear that they rele... |
I am working on a problem that involves solving many (thousands) of distinct linear systems of equations, each with thousands of variables. Let's assume that the size of each matrix is exactly the same, and has the same structure (i.e. same symmetry, sparsity, diagonal dominance, etc).
Assuming each linear system is... |
This question has been asked a billion times on Stackoverflow however, the focus has always been on Non-Numerical Coding. I am looking for a project to contribute to within the confines of Numerical Computing and High Performance Computing. I would ideally prefer a small project but that's not necessary.
What would be... |
I use the discontinuous galerkin method to solve the steady flow 1D shallow water equations with a bump at the bottom. This flow is frictionless.
I use the runge-kutta method to approximate the time derivative of these equations and gauss-lobatto quadrature to approximate the integral equation in the weak form of the s... |
I have a linear system of equations of size mxm, where m is large. However, the variables that I'm interested in are just the first n variables (n is small compared to m). Is there a way I can approximate the solution for the first m values without having to solve the entire system? If so, would this approximation b... |
Problem:
I have an incremental online clustering algorithm which need 4 parameters that should be specified by the user before execution. The algorithm will gives "good results" if "a good parameter values" are chosen, but there is no way to know beforehand what are the best matching parameter values. We can for exampl... |
Consider the following original LP: $\mathit{min}$ c'$x$ s.t: $Ax=0 \wedge 0\le x\le 1$ . This is my original LP which has to be solved.
Now, using some reductions, I reduced the original LP to the following converted LP: $\mathit{min}$ d'$y$ s.t: $By=0 \wedge 0\le y\le 1$. Using some relations between $x$ and $y$, I ... |
What is the form of SOR iterative equation for the heat equation
$u_{xx}=u_{t}-1$ using centered differences both in time and spatial
derivatives and using Crank-Nicolson method?
$$(u(x,0)=u(L,t)=u(0,t)=A;0<x<L,0<t<\infty)$$
Can anyone help me to obtain the SOR iterative equation?
|
I'm just getting tucked into fortran 95 for some quantum mechanics simulations. Honestly, I've been spoiled by Octave so I've taken matrix exponentiation for granted. Given a (small, $n\leq 36$) skew-Hermitian matrix of size $n\times n$, what is the most efficient way of using LAPACK to solve this problem? I'm not usin... |
In light of the recent petition to boycott Elsevier, I was wondering what options we have in Computational Science for
Journals which are completely open-access,
Journals which allow/support open-access articles.
I am aware that there are quite a few sub-areas in Computational Science, each with their own set of spec... |
I would like to know whether the constant
in the time complexity of computing the median
is different from that of computing general quantiles.
In R for example:
fx01<-function(ll,a) quantile(a[,ll],0.75)
fx02<-function(ll,a) median(a[,ll])
n<-1000
d<-1000
a<-matrix(rnorm(n*d),n,d)
system.time(lapply(1:d,fx01,a=a))... |
For applications requiring significant computational resources, high performance can be a critical factor when it comes to delivering scientific results or achieving "break-throughs" in reasonable time.
How much should time and effort should software developers invest in optimizing an application? What are the key cri... |
I have created a spline to fit my data in python using:
spline=scipy.interpolate.UnivariateSpline(energy, fpp, k=4)
The equation I want to use involves a summation between n=2 and n=infinity, where n is the order of the differential at a point Eo. However, using;
UnivariateSpline.__call__(spline, e0, nu=n)
to call in... |
I'm playing with simple implementations of algorithms to find minimum vertex cover/maximum cardinality matching in bipartite graphs. However, I seem to have trouble googling for some test data sets that I could use to verify, if I got that one right.
It's easy to devise simple examples that one could check on paper, bu... |
I'm trying to figure out how to draw a wave equation progress in a 2D graph with Matlab.
I found this piece of code which effectively draw a 2D wave placing a droplet in the middle of the graph (I almost fully commented it to simplify things) and then letting it expanding till the border, then bouncing back (how can th... |
This problem arises from a Bayesian statistical modeling project. In order to compute with my model, I need to perform an integration in which part of the integrand is the "Pólya" or "Dirichlet-Multinomial" Distribution,
$$p(n\mid \alpha) = \frac{(N!)
\Gamma(K\alpha)}{\Gamma(\alpha)^K \Gamma ( N + K\alpha)}
\prod_{i... |
Normally when I seed a sequential random number generator in C, I use the call
srand(time(NULL))
then use
rand() mod N
to obtain a random integer between 0 and N-1. However, when I do this in parallel, the calls to time(NULL) are so close to each other that they end up being exactly the same number.
I have tri... |
As a part of other work I need to solve relatively large (~1E5x1E5) and sparse (~100 non-zero elements in each raw in few blocks) hermitian eigensystems. Usually only few eigenvalues+vectors are needed, but with high precision. Currently I am using Arpack (Arnoldi with shift-inverse when precision is preferable or spec... |
I created a binary matrix using the following loop in c
char filename[6];
filename=sprintf(filename,"file01");
moutput=fopen(filename,"wb+");
for (i=0; i<2*m+1; i++){
for (j=0; j<2*n+1; j++) {
r=rmin+(rmax-rmin)*GetRand(N);
fwrite(&r, sizeof(double), 1, moutput);
}
}
fclose(moutput);... |
I am solving a multiscale problem using the Heterogeneous Multiscale Method (HMM). Essentially, my particular procedure uses the following iterative process:
Solve many local matrix systems.
Compute a value of interest from the solutions of the local systems.
Assemble a global matrix system from the local "values o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.