All Questions

Filter by
Sorted by
Tagged with
7
votes
2answers
455 views

Adjoint method for optimization problem

I am interested in the adjoint method for shape optimization problems. However, I couldn't find a helpful introduction. So I come here and look forward to some enlightening advices. Could you direct ...
24
votes
4answers
2k 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 ...
11
votes
1answer
2k views

weighted SVD problem?

Given two matrices $A$ and $B$, I'd like to find vectors $x$ and $y$, such that, $$ \min \sum_{ij} (A_{ij} - x_i y_j B_{ij})^2. $$ In matrix form, I'm trying to minimize the Frobenius norm of $A - \...
2
votes
1answer
58 views

Can PetscBags be used with 64 bit versions of petsc?

I was looking at the documentation for PetscBagCreate(), and it says that The size of the A struct must be small enough to fit in a PetscInt; by default ...
3
votes
4answers
876 views

Parallel computing programming paradigms/models not based on a master/slave concept?

Do anyone know if there exist any widely used parallel computing programming paradigms/models not based on a master/slave concept?
2
votes
1answer
474 views

Polynomial Regression using Semidefinite Programming

I'm trying to design the frequency response function for a low-pass filter. I need the function to be polynomial and to fulfill the following constraints: the coefficients must sum to 1, the function ...
30
votes
8answers
2k views

Scientific workflow management system

Can anyone recommend me a good workflow management system (WMS), preferably in Python? So far I have been using GNU Make, but it introduces a layer of complexity that I want to avoid. A good WMS ...
7
votes
1answer
221 views

Will upgrading to a 64 bit OS help me any?

Assuming that I am running Intel MKL (BLAS, LAPACK), is there any difference in performance if I run it on a 32 or 64 bit OS? (Of course, assuming that my hardware remains the same). My processor is ...
5
votes
4answers
556 views

How can I reduce the error of the sample average?

I want to use the sample average $(X_1 + .... X_n)/n$ as a substitute for the expectation $\mathbb{E}(X)$. As claimed by the weak law of large numbers, as n increases the sample average should ...
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 ...
2
votes
2answers
732 views

Modern Computer Efficiency vs Modern Nervous Systems

I am currently working on an evolutionary system and most of what I have heard is that a computer like mine at the moment would be able to simulate a bee sized brain (not taking into account the time ...
0
votes
1answer
105 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) - ...
5
votes
3answers
1k views

IPOPT solver auto-converts my binary variables to continuous

I hope this is the right stackexchange for this question; if not, please direct me there! I'm on Linux. I've installed IPOPT and AMPL, and all the third-party stuff required: ASL, HSL, Lapack, Metis, ...
5
votes
2answers
218 views

Condition number of (A + cI) matrix

For given matrix $A \in R^{n\times n}$, identity matrix $I$ and constant $c > 0$ is this possible to express $cond(A + cI)$ knowing $cond(A)$ and $c$?
7
votes
1answer
281 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 ...
5
votes
2answers
289 views

changing from global to local coordinate structure

I am going to put this question on math exchange and stack exchange as well (since it doesn't really fit in any of the specific fields, I don't know which it should go in), but here is the question: ...
3
votes
1answer
924 views

Solve log equations problem [SageMath]

Input var('x') solve((log((x**2 - x), 6) - log((6*x - 10), 6) == 0), x) Output [log(x^2 - x) == log(6*x - 10)] But real ...
9
votes
3answers
400 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 ...
3
votes
2answers
421 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 ...
4
votes
2answers
4k 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 ...
5
votes
2answers
2k views

An efficient way to numerically compute Stirling numbers of the second kind?

Is there an efficient way to numerically compute Stirling numbers of the second kind? An approximate (not exact) method would suffice. Something similar to the connection between factorials and gamma ...
3
votes
1answer
69 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 ...
8
votes
5answers
733 views

Some good reading on polygon algorithms

What are some good resources (books, articles, sites) about polygon intersection and union algorithms?
5
votes
1answer
9k views

How do I plot a transparent cylinder in matlab? [closed]

I know that I can use the following commands to create an opaque cylinder in matlab: N=100; [X,Y,Z]=cylinder(R,N); surf(X,Y,Z); I want to plot an arrow inside ...
10
votes
4answers
844 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 ...
10
votes
2answers
673 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 ...
5
votes
2answers
8k views

What is the difference between O(n) and o(n)? [closed]

I was studying Big-Oh notation, and there is apparently a difference between $O(n)$ and $o(n)$. What is it? I think $f(n)$ is $o(n)$ means that $$\lim_{n \to \infty} \frac{f(n)}{g(n)} = 0$$ but what ...
9
votes
1answer
3k views

How does LAPACK solve tridiagonal systems and why?

In my project I have to solve a couple of tridiagonal matrices at every time step, so it is crucial to have a good solver for those. I did my own implementation, just the classical way to do it ...
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 ...
9
votes
4answers
2k views

Condition number of A'A and AA' formulations

It's shown (Yousef Saad, Iterative methods for sparse linear systems, p. 260) that $cond(A'A) \approx cond(A)^2$ Is this true for $AA'$ as well? In case $A$ is $N\times M$ with $N \ll M$, I observe ...
8
votes
2answers
128 views

Initial guesses for perturbed linear systems

Suppose you solve a linear system $Au = f$ by an iterative method, e.g. conjugate gradients or Richardson iteration. Then you try to solve a linear system that is slightly perturbed in the matrix and ...
9
votes
1answer
107 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 ...
13
votes
1answer
11k views

How can I determine the period of my pseudo-random number generator?

Suppose I'm using a linear congruential pseudo-random number generator (PRNG). Given a seed $x_0$, the multiplying factor (a), the shift factor (c) and the modulus factor (m), how can I determine the ...
4
votes
0answers
386 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$, ...
6
votes
2answers
2k views

Non-differentiable global optimization problem

I am trying to solve the following test problem which is well-known in the community in different variants: Place N = 15 points in the 3-dim. unit cube such that the minimal distance between them is ...
9
votes
2answers
1k views

Safe application of iterative methods on diagonally dominant matrices

Suppose the following linear system is given $$Lx=c,\tag1$$ where $L$ is the weighted Laplacian known to be positive $semi-$definite with a one dimensional null space spanned by $1_n=(1,\dots,1)\in\...
4
votes
3answers
340 views

What is a good introduction to graph theory / algorithm

By good I mean minimal and essential. One whose concepts form a minimum spanning tree, and whose words are precious :) (A small pdf would be perfect)
13
votes
1answer
332 views

Is there a tool out there that can generate interval extensions of Fortran (or C) functions by parsing Fortran (or C) code?

Case studies in my PhD thesis require that I have interval extensions of Fortran subroutines in CHEMKIN-II (apologies for the link; it's the best one I could find for a package no longer distributed ...
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!
6
votes
1answer
141 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
3answers
583 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
4answers
223 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 ...
10
votes
2answers
991 views

Which iterative linear solvers converge for positive semidefinite matrices?

I want to know which of the classic linear solvers (e.g Gauss-Seidel, Jacobi, SOR) are guaranteed to converge for the problem $Ax=b$ where $A$ is positive semi definite and of course $b \in im(A)$ (...
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
430 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\...
7
votes
1answer
567 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}...
11
votes
1answer
2k views

Sort a cloud of points with respect to an unstructured mesh of hexahedral cells

Question How would you sort a cloud of points with respect to an unstructured mesh of hexahedral cells? Each cell has a centre and a unique label to represent it. There are two cloud points ...
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....
5
votes
2answers
527 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!
12
votes
2answers
753 views

How can one mathematically describe the “cartoon” type of representation of proteins?

Proteins are typically represented in a cartoon form, with β sheets as arrows and α helices as coils: I'm wondering, is there somewhere a reference that describes the construction of this ...

15 30 50 per page