All Questions

Filter by
Sorted by
Tagged with
-5
votes
1answer
869 views

Successive over-relaxation formation of heat equation?

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,...
0
votes
1answer
106 views

Space Time tradeoff [closed]

I am wondering if you can answer a math question that I require answered for an evolutionary program that I am writing. With regards to the phenomenon known as the "space-time tradeoff" (wiki it) - ...
4
votes
2answers
5k views

Is there an MPI All Gather operation for matrices?

I have a distributed matrix, in block column format. I know that I can reshape the matrix into one long vector and use an all_gatherv operation. I just wanted to avoid the trouble of having to ...
1
vote
1answer
57 views

What does PetscBagSetFromOptions() do?

I'm writing a program that uses PETSc and SLEPc, and I was looking for a convienient way to read in options from the command line. The description of ...
9
votes
3answers
428 views

Computing the characteristic polynomial of real sparse matrix

Given a generic sparse matrix $A \in \mathbb{R}^{n\times n}$ with m << n (correction: $m \ll n^2$) non-zero elements (typically $m \in {\cal O}(n)$). $A$ is generic in the sense that it has no ...
7
votes
1answer
292 views

float128 in linear algebra

Is there any paper or research concerning float128 arithmetics applied to linear algebra problems(e.g. iterative solvers, decompositions etc.)? How much benefit is really there in comparison with ...
10
votes
4answers
845 views

How can we evaluate performance of students in computational science courses?

As someone who has to teach courses in computational science, I am confronted with the age-old question: how do I evaluate the ability of the students to learn a subject that depends on applications ...
3
votes
2answers
424 views

What numerical methods are recommendable for simulating two phase immiscible fluid flow through a pipe with high capillary pressure?

I'm simulating two phase immiscible drainage (air displacing water) in a rectangular domain of size .6mm x 2.4mm (2 dimensions) using Ansys FLUENT software. I am using an implicit Volume of Fluid ...
16
votes
3answers
575 views

How should I study creating and programming HPC systems?

I'm in a field that doesn't necessarily do a great deal of HPC work, and when it does encounter it, it's often the result of researchers from other fields exploring new applications to their methods ...
0
votes
1answer
152 views

LP infeasibility

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 ...
5
votes
3answers
601 views

On Vanilla Preconditioners for solving dense $Ax=b$ iteratively

I am looking for preconditioners which don't assume anything about the matrix or its origins. I basically want to be able to type in the following in MATLAB and have quick solving time: ...
4
votes
0answers
394 views

Why is my lower convex hull extraction algorithm not working?

Recently, I wrote an algorithm to obtain a delaunay triangulation of a random point set in $I=[-10,10]$x$[-10,10] \subset R^2$ by projecting these points onto the 3 dimensional paraboloid $z=x^2+y^2$, ...
3
votes
1answer
70 views

2D Jacobi line maintenance?

Suppose a linear system is given $$AX=B,$$ where $A\in\mathbb{R}^{n\times n}$ is a symmetric strictly diagonal matrix, and $X, B\in\mathbb{R}^{n\times 2}$. Therefore, the 2D Jacobi iterative solver is ...
10
votes
2answers
689 views

Trace An Isoline of an Expensive 2D Function

I have a problem similar in formulation to this post, with a few notable differences: What simple methods are there for adaptively sampling a 2D function? Like in that post: I have a $f(x,y)$ and ...
14
votes
1answer
3k views

The Remez Algorithm

The Remez algorithm is a well-known iterative routine to approximate a function by a polynomial in the minimax norm. But, as Nick Trefethen [1] says about it: Most of these [implementations] go ...
12
votes
3answers
1k 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 ...
9
votes
1answer
108 views

Numerically stable algorithms for computing remainder of polynomials

Let $f, g \in \mathbb{R}[x]$ and $\deg f > \deg g$. I am looking for asymptotically fast and numerically stable algorithms for computing $f \bmod g$. In the applications intended, both $f, g$ are ...
4
votes
4answers
227 views

Determining the algorithmic complexity

A few of the iterative matrix algorithms (CG,GMRES etc.) I have authored are acting rather funny. They converge to the right answers but take abnormally long time to run. I am in the process of ...
9
votes
3answers
852 views

Iterative methods for indefinite systems without block structure

Indefinite systems of matrices appear for example in the discretization of saddle point problems by mixed finite elements. The system matrix can then be put in the form $$\begin{pmatrix} A & B^t \...
11
votes
4answers
495 views

Runge-Kutta and Reusing Datapoints

I am trying to implement the fourth order Runge-Kutta method for solving a first order ODE in Python i.e. $\frac{dy}{dx} = f(x,y)$. I understand how the method works, but am trying to write an ...
10
votes
1answer
578 views

How to assemble and solve a matrix system in parallel from values generated in different processors?

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. ...
7
votes
1answer
585 views

Jacobi iteration to reduce the quadratic function

Given certain function $f(X)$ which is quadratic in $X\in\mathbb{R}^{n\times d}$, $$\frac{1}{2}tr(X^TAX) - tr(Y^TBX)$$ for positive definite weighted Laplacian matrices $A, B\in\mathbb{R}^{n\times n}...
9
votes
3answers
2k views

Standard format for finite element meshes

Does there exist a standard format for finite element meshes which is widely used in the industry? Thanks!
5
votes
2answers
3k views

Fast algorithms to find the eigenvalues of some matrix on intervals of interest

I am curious how to quickly compute the eigenvalues for arbitrary matrices, sparse or dense, restricted on some given interval of interest. Suppose we have an arbitrary $n\times n$ matrix $A$, ...
6
votes
1answer
435 views

Reducing degeneracy in constrained (convex) optimization problem

DISCLAIMER: I've edited the question repeatedly for clarity and to target the most relevant answer. I have the following general problem $$ \min \|h_1\cdot h_2\|^2 $$ such that $$\|g_1\wedge g_2-h_1\...
36
votes
4answers
30k views

How does the MATLAB backslash operator solve $Ax=b$ for square matrices?

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) ...
18
votes
4answers
3k views

Is there a general-purpose library for structured grid adaptive mesh refinement?

Adaptive mesh refinement (AMR) is a common technique for dealing with the problem of widely varying spatial scales in the numerical solution of PDEs. What general-purpose libraries exist for AMR on ...
6
votes
1answer
143 views

Compability conditions in domain decomposition methods

Suppose we want to solve the Poisson equation $\Delta u = f$ on a domain $\Omega$ with Dirichlet boundary conditions. One possible way to do is by a domain decomposition method. There is a condition ...
5
votes
2answers
529 views

Recommendation for a good article/book for frontal methods?

Can someone provide an article or book that explains the principle used in frontal solvers? Some examples also may help understand the frontal methods better.Thanks in advance!
10
votes
2answers
2k views

How is geometric programming different from convex programming?

How is (generalized) geometric programming different from general convex programming? A geometric program can be transformed into a convex program, and is typically solved by an interior point method....
22
votes
2answers
2k views

What simple methods are there for adaptively sampling a 2D function?

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 ...
8
votes
2answers
8k views

Dictionaries in pseudocode

What is a good, common way to express dictionaries (= maps) in pseudocode? I.e. datastructures that basically allow to store values for keys, iterate over all key/value pairs, test for inclusion of a ...
4
votes
3answers
317 views

Overlapping communication and computation in PETSc and/or Trilinos?

I am just learning about these packages, so forgive me if this is a trivial/silly question. Our group is working re-developing our code from the ground up using modern software practices. Currently ...
6
votes
4answers
5k views

Tools for visualizing large 3D volumes

I have a sequence of 2D images (png files) encoding the partitioning (segmentation) of a large biological 3D volume. In these files, each pixel has a color, representing the 3D object the pixel ...
4
votes
1answer
609 views

Petsc not compiling c++ files

I'm having a problem where petsc is complaining about the type of PetscScalar (I get a whole bunch of errors from the c++ standard library that revolve around PetscScalar not defined). I believe it ...
6
votes
1answer
275 views

Question about the smoothing operators in multigrid methods for nonlinear PDEs

Suppose we are dealing with a nonlinear problem, say $$ A u := L u + G(u) = f $$ the nonlinearity of the operator $A$ is the polynomial type, ie, $L$ is a linear operator, and $G(u) = u^k$, or ...
3
votes
1answer
599 views

Computing a rolling quantile

An algorithm I'm writing needs to compute rolling quantiles of a time series. Currently I do this in the naive way: for a window of size W and a vector ...
8
votes
1answer
514 views

What's the right way to compare vectors in floating-point?

I know that I should use a tolerance for comparing floating point numbers. But for comparing vectors, I can think of 3 possible solutions corresponding to different distance metrics: Compare the ...
12
votes
1answer
342 views

Enumeration of graphs deriving from Delaunay tessellations in 3D

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 "...
5
votes
5answers
341 views

Will MPI continue to be a popular basis writing scalable massively parallel solvers on future many-core CPUs? [duplicate]

Possible Duplicate: What programming paradigms should I be investing in if I want my code to run on petascale machines in the future? Having entered the multi-core era (som already refers to as ...
11
votes
1answer
565 views

Computing standard errors for linear regression problems without calculating inverse

Is there a speedier way to calculate standard errors for linear regression problems, than by inverting $X'X$? Here I assume we have regression: $$y=X\beta+\varepsilon,$$ where $X$ is $n\times k$ ...
2
votes
1answer
1k views

Error calculation in trapezoidal rule

If we use the composite trapezoidal rule, then what is the least number of divisions $N$ for which the error of the integral $\int^1_0{e^{-x}}dx$ doesn't exceed $\frac{1}{12}\times10^{-2}$. My guess ...
3
votes
3answers
2k views

How do I read a binary file into PETSc as a matrix?

I created a binary matrix using the following loop in c ...
9
votes
1answer
271 views

Given values on a mesh, what algorithm can I use to construct efficiently level set contours?

I have a mesh, faces $F$, edges $E$, and vertices $V$, and I have a list of predefined level set contours. What algorithm can I use to construct contours in the most efficient manner? A plot of the ...
8
votes
1answer
616 views

Where to find data sets for testing minimum vertex cover algorithm for bipartite graphs?

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 ...
11
votes
1answer
430 views

How to establish that an iterative method for large linear systems is convergent in practice?

In computational science we often encounter large linear systems which we are required to solve by some (efficient) means, e.g. by either direct or iterative methods. If we focus on the latter, how ...
7
votes
2answers
1k views

Understanding OpenCL performance

I'm using ViennaCL's interface to Eigen as a way to leverage OpenCL. Specifically, I'm using the ::viennacl::linalg::bicgstab_tag with an Eigen sparse matrix. ...
35
votes
2answers
7k views

Mathematical Libraries for OpenCL?

I am looking for information from anyone that has tried to use OpenCL in their scientific code. Has anyone tried (recently) ViennaCL? If so, how does it compare to cusp? What about OCLTools? Does it ...
8
votes
1answer
698 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 ...
5
votes
5answers
2k views

How do I create an animation from a 2D model or dataset?

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?

15 30 50 per page