All Questions

Filter by
Sorted by
Tagged with
4
votes
1answer
246 views

Do I need KSPSetOperators after PCSetOperators?

What I did is Create some PC named pc, and PCSetOperators(pc,A,A,..); Create KSP named ksp; KSPSetPC(ksp,pc); After the above process, am I still obliged to KSPSetOperators(ksp,A,A,..), or I can ...
5
votes
2answers
514 views

How to estimate the maximum argument of eigenvalues?

How to estimate $$\max_i |\mathrm{Arg}(-\lambda_i)|,$$ where $\{\lambda_i\}$ are eigenvalues of a large sparse matrix $A$ all lying in the left complex half-plane?
5
votes
1answer
217 views

What is the difference between MATSEQMAIJ and MATSEQAIJ in PETSc?

What is the difference between MATSEQMAIJ and MATSEQAIJ in PETSc? Also, where can I find more information on each of the MatTypes? I went to the MatType documentation, but it didn't have anything but ...
24
votes
5answers
5k views

When is building a cluster in the cloud cheaper than building one in my lab for MD simulations?

An Amazon EC2 compute cluster costs about \$800-\$1000 (depending on duty cycle) per physical CPU core over the course of 3 years. In our last round of hardware acquisition, my lab picked up 48 cores ...
3
votes
1answer
239 views

3D to 2D projections, a generalization

Given some data points in 3D, $X\in\mathbb{R}^{n\times 3}$, could one say that $$Y=XP,$$ for some $P\in\mathbb{R}^{3\times 2}$ actually corresponds to a particular viewpoint on a 3D data? Basically, ...
5
votes
2answers
113 views

Are there any QM macromolecule simulation methods that can use an electron density map as input?

I am not an xray crystallographer, but from what I've heard there's often a good deal of guess work and intuition involved in the process of fitting a ball-and-stick molecular model to a crystal-...
9
votes
2answers
1k views

Meaning of search methods and optimization methods

I was wondering what differences and relations are between "search methods" and "optimization methods"? Especially when solving an optimization problem? I emphasize the context of solving ...
2
votes
1answer
208 views

Solving PSD matrix in Newton's method

I have functions defined as follows: $f1(A) = \sum\|x_i-x_j\|_A = \sum\sqrt{(x_i-x_j)^TA(x_i-x_j)}$ and $f2(A) = \sum\|x_k-x_l\|^2_A$ where A is PSD matrix, x are number vectors. Task is to minimize ...
11
votes
2answers
2k views

Efficiency of using petsc4py vs. c/c++/fortran

How much slower is petsc4py vs c/c++/fortran? I realize it will depend significantly on the code being executed, but what about something simple like a matrix-vector product?
7
votes
1answer
1k views

How do I vectorize this 4-D matrix operation in Matlab?

I need to do a large number of matrix operations in Matlab, but one of the matrices is 4-D and my normal instincts for correct vectorization are failing me. Right now I'm using a loop. Maybe somebody ...
5
votes
2answers
3k views

Hill climbing and coordinate descent/ascent

From Wikipedia: In computer science, hill climbing is a mathematical optimization technique which belongs to the family of local search. It is an iterative algorithm that starts with an ...
10
votes
2answers
4k views

Meaning of (meta)heuristic methods

For optimization, from Wikipedia: In computer science, metaheuristic designates a computational method that optimizes a problem by iteratively trying to improve a candidate solution with regard ...
0
votes
0answers
167 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 ...
-1
votes
4answers
163 views

System Speed - Refactoring [closed]

Could the runtime of methods within a system potentially be reduced via refactoring during development (pre-public release)? i.e. Let's assume that methodX() takes ...
2
votes
0answers
218 views

Is it possible to run a Solver Foundation solver against a model containing linear and non-linear elements?

This is a follow up question to one I made previously about non-linear equations and ranged real numbers in Solver Foundation. I acknowledge that where possible, rewriting a problem that is non-...
6
votes
1answer
108 views

How do you change the desired accuracy of a TS object in PETSc?

I'm currently getting very long propagation times when attempting to use the Time Stepping propagators in Petsc 3.2, and in the interest of speeding things up, I'm curious how I can reduce the ...
3
votes
2answers
905 views

Solving sparse matrix systems which can be reordered to block diagonal form

I have a class of matrices $A$ which are created by a domain decomposition method. Each matrix represents several subproblems of equal size, and I know that for some permutation matrix $P$, $PAP^T$ ...
10
votes
2answers
3k views

Calculating Lagrange coefficients for SVM in Python

I'm trying to write a full SVM implementation in Python and I have a few issues computing the Lagrange coefficients. First let me rephrase what I understand from the algorithm to make sure I'm on the ...
5
votes
1answer
928 views

Practical efficacy of parallel back substitution

The fact that the back substitution is not done in parallel is not important, because it uses a negligible amount of computer time when N is large, compared to the forward elimination. This is a ...
7
votes
1answer
413 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 ...
10
votes
2answers
134 views

Matching Similar Items from a Set

I'm trying to match items. Given a set of $n$ items I can rank on a scale from 0 to 100 of how similar they are to one another. For instance, if item $n_1$ is milk and item $n_2$ is also milk, then ...
6
votes
0answers
487 views

How to do FEM in sector elements?

Suppose we have an element in the polar coordinate as $0\leq r\leq 1$, $0\leq\theta\leq \alpha$. What are the correct basis functions in this element? For this kind of mesh, there are a lot of ...
11
votes
1answer
842 views

Projecting out the null-space of $A$ from $b$ in $Ax=b$

Given the system $$Ax=b,$$ where $A\in\mathbb{R}^{n\times n}$, I read that, in case Jacobi iteration is used as a solver, the method will not converge if $b$ has a non-zero component in the null-space ...
8
votes
1answer
168 views

Eigenspace basis continuously depending on parameters

I have a Hermitian matrix $\mathbf{H}$ which depends on two parameters say $x$ and $y$. When I diagonalize it at two close points $(x_1,y_1)$ and $(x_2,y_2)$ I get two close eigenvalues ($\...
4
votes
2answers
3k views

How to parallelize the computation of eigenvalues of a sparse symmetric matrix in MATLAB?

I have a similarity matrix which is symmetric and sparse. How can I parallelize the computation of the eigenvalues of this matrix in MATLAB?
0
votes
1answer
242 views

Exit_status=15 , what does it mean? [closed]

I have a job which stops unexpectedly with Exit_status=15. What is the most probable error ?
4
votes
1answer
381 views

Convert ODE into discrete probabilistic model

how can I turn an ODE equation into a discrete probabilistic model? I take for example the Verhulst equation for the growth of a population. $$\frac{dP}{dt} = rP(1-P/K)$$ I was thinking to simulate ...
4
votes
2answers
210 views

How do the properties of a matrix affect the linear system solving

For a general matrix A, there are many properties to describe it: symmetric positive definite or indefinite, condition number, spectrum and so on. I am curious about how these properties affect the ...
11
votes
1answer
190 views

How to detect the multiplicity for the eigenvalues?

Suppose A is a general sparse matrix, and I want to compute the eigenvalues. I do not know how to detect the multiplicity for the eigenvalues. As far as I know, for a special case, finding the ...
9
votes
2answers
139 views

Estimate Norm of a black-box functional

Let $V$ be a finite-dimensional vector space with norm $\|\cdot\|$ and let $F : V \rightarrow \mathbb R$ be a bounded linear functional. It is only given as black-box. I would like to estimate the ...
3
votes
1answer
234 views

What does MatGetOwnershipRange() do for sequential matrices?

I'm writing a petsc code using a sequential matrix type. Since I want it to be easy to parallelize, I put some stuff in the code that is useless now, but will make it easier to parallelize later. One ...
9
votes
1answer
400 views

Rank structure in the Schur complement

I am doing research on the structure in the Schur complements and find an interesting phenomenon: Suppose that A is from 5--pt laplacian. If I use nested dissection ordering and multifrontal method ...
6
votes
1answer
306 views

Adaptive h for gradient estimation

Can anyone point me to methods for varying $h$ in gradient estimation for noisy numerical optimization? Some programs have the user give a fixed $h$, which is used for forward-difference or central-...
3
votes
1answer
2k views

Gauss-Seidel iterations node spacing

I am working on an assignment where I am determining the temperature distribution of a chip on a substrate. When I decrease the nodal spacing the results change drastically. The smaller the nodal ...
3
votes
2answers
188 views

How to establish that an iterative method can be applied to large matrices whose size may reach 10^3?

I have an iterative method for computing the Moore-Penrose generalized inverse of matrices, that is $$X_{k+1} = ((I-\beta X_{k}A)^t) + X_{k}$$ with initial approximation: $$X_{0} = \beta AA^t$$ ...
4
votes
3answers
122 views

Whats wrong with my running time calculation?

I am running a linear algebra iterative method (PCG) for solving Ax=b, the dimension of the matrix is 10000x10000. So, I did 2 preliminary analyses: Memory Analysis The size of the matrix dominates ...
3
votes
0answers
105 views

Efficient principal pivots

It was suggested I should try posting this question here from Mathematics Background I'm working on a numerical linear algebra package in C#. I'm trying to implement a variety of "principal ...
3
votes
0answers
160 views

Is there an easy way to read a PetscBag into a python dict?

I'm using a PetscBag to store the input parameters of my program. At some point, I'm going to need to use python to plot these parameters against some output parameters, and ...
6
votes
1answer
2k 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 ...
6
votes
2answers
455 views

Tools for computing an electric field based on location of charges?

I have the positions of a large number of charges (the strengths are known, but are also variables). Are there any tools that will allow me to visualize the electric field induced by these charges (or ...
7
votes
3answers
327 views

Given large $x \in \mathbb{R}$, How to determine if $2^x$ is an integer?

Given large $x \in \mathbb{R}$, I want to know whether or not $2^x$ is an integer. Is there any fast way to answer the question for $x>2^{500}$? I have also asked a slightly different form of this ...
4
votes
1answer
176 views

Estimating time for running serial/parallel codes

Assume I am running an iterative method, I have a rough estimate of how many iterations it will need, How do best estimate the time it will run for in serial? For instance, If I have Conjugate ...
7
votes
1answer
277 views

Forced viscous damping in elastodynamics

I have an 2D elastodynamics problem, that is a problem which is driven by the Cauchy equation: $$\rho\ddot u-\mathrm{div}\sigma=\rho f$$ where $u$ is the displacement, $\sigma$ the Cauchy stress ...
8
votes
3answers
2k views

Compute smallest eigenvectors of a matrix

It appears that matlab's eigs is giving me bad approximations of the smallest eigenvectors of a matrix. I assume I can use some slower methods which would also be ...
2
votes
2answers
44 views

The region of allowed values ​​for solving the equation in Mathematica

In[2]:= Solve[sqrt(2x-9) == sqrt(4x+3), x] Out[2]= {{x -> -6}} But mathematically there is no solution, since sqrt (-21) is not defined. There is a flag that ...
4
votes
1answer
217 views

MatMatMult and KSPSolve for MATMPIDENSE matrices

I'm trying to use MATMPIDENSE matrices to solve a system of type Ax=b, but I have some problems. The KSP documentation says that KSPSolve for dense matrices requires to set a 'gmres' solver and a 'lu' ...
5
votes
1answer
1k views

Comparing algorithms for tridiagonal linear systems solution

Below there are two algorithms for solving tridiagonal linear systems of the form $$ \left[ \begin{array}{ccccc|c} b_1 & c_1 & & & &d_1\\ a_2 & b_2 & c_2 & & &...
5
votes
1answer
71 views

Are there any open standards for data exchange between components of a spatial model?

I'm just getting into climate research, and am amazed at how much poorly documented legacy code is used. This kind of thing means that models more or less have to be maintained by the people who wrote ...
6
votes
3answers
5k views

How to find QR decomposition of a rectangular matrix in overdetermined linear system solution?

While trying to find cell-centered gradients in finite volume method computation of incompressible fluid flow I get over-determined linear system. This is a well known "cell based least-square" ...
8
votes
2answers
1k views

Kolmogorov–Smirnov test for multivariate data

I have a set of files consisting of randomly selected points from a dataset, each file belonging to a particular class. Each row in these files contains the coordinates in n-space of the point. I'd ...

15 30 50 per page
1
189 190
191
192 193
197