All Questions

Filter by
Sorted by
Tagged with
7
votes
1answer
6k views

Schroedinger/Diffusion equation with Crank-Nicolson in Python/SciPy

I tried to make the question as detailed as possible. I have an extremely simple solver written for the Schroedinger equation but with imaginary time, which transforms it basically into the diffusion ...
8
votes
1answer
461 views

Extracting diagonal of an approximately diagonal matrix when we don't know its entries

What is a good way to extract the diagonal from a symmetric matrix that is already almost diagonal, but where you don't have the matrix elements (only the ability to apply it to vectors)? Further ...
5
votes
2answers
1k views

First order finite volume spatial discretization of the heat equation on an unstructured triangle mesh

Consider a scalar field $u$ on an unstructured triangle mesh which is constant on each face. Let $A_i$ be the area of triangle $T_i$, $N(i)$ the set of triangles sharing an edge with $T_i$, and $L_{...
5
votes
3answers
293 views

Closest interior point on integer grid to a vertex of a convex polyhedron

I have a 3 dimensional convex polyhedron whose vertex coordinates are rational. For one of these vertices, I would like to find the nearest integer grid point (under the Euclidean metric) that is ...
5
votes
0answers
889 views

How does GAMG in OpenFOAM really work?

I use OpenFOAM for CFD simulations. A very popular preconditioner is GAMG which needs a low number of iterations per a time step in SIMPLE or PISO solvers that are used to simulate the fluid flow. I ...
2
votes
1answer
129 views

Location of Unknowns in Unstructured Mesh

I am currently learning a code which utilizes Scharfetter-Gummel discretization for unsteady drift-diffusion equations. For this scheme, a 2D unstructured triangular mesh is used, with the unknowns ...
4
votes
3answers
1k views

Online Poisson Solver

I'm wondering if anyone can point to a browser-based FEM (or other) 2D PDE solver for simple elliptic problems. It seem like there ought to be a javacript implementation that would allow for the ...
0
votes
1answer
91 views

mapping data with a spike to a heat map

I have the following dataset that I need to display on the heat map: [30, 15, 66, 7, 9999, 78, 42, 132] So if I map the values to the color scale using a linear function I only see the spike while ...
4
votes
2answers
297 views

Library for closest point on a polyhedron

I need to compute a closest point on a nonconvex polyhedron to a given point in 3D space. I need a simple algorithm or library. I search in CGAL but did not find a suitable function and the package is ...
3
votes
1answer
70 views

Library for solving a linear selection problem in a distributed memory machine

I need to solve a very large O(10^10) linear selection problem in a distributed memory machine, is there any library that will solve it for me? In shared memory ...
12
votes
1answer
562 views

Method selection for numeric quadrature

Several families of methods exist for numeric quadrature. If I have a specific class of integrands how do I select the ideal method? What are the relevant questions to ask both about the integrand (...
1
vote
0answers
363 views

features recognition & reconstruction of 3d mesh delaunay matlab

I managed to display the coordinates of x,y and z into a 3D mesh by using delaunay function. The coordinates are in .obj format actually and i have read it into matrix form. Now, i would like to ...
2
votes
2answers
138 views

Maximizing distance between point particles

I have a situation where I am trying to maximize the distance between some point particles. For example, I have a periodic simulation box that is 100 Å$^3$, and I am putting in 361 particles. ...
4
votes
2answers
2k views

Reordering sparse matrices in computational science

On page 3 of this document, there are some matrix forms for sparse matrices. I wonder if there are other forms used in computational problems encountered in physics, chemistry, etc., so that ...
0
votes
1answer
47 views

Clarification on interpolation equalities given by Briggs

Briggs, "A Multigrid Tutorial" (pg. 35) has the following expressed as 2-D interpolation: \begin{align*} v^h_{2i,2j} &= v_{i,j}^{2h}\\ v^h_{2i+1,2j} &= 0.5\cdot(v_{i,j}^{2h} + v_{i+1,j}^{2h})\\...
5
votes
1answer
142 views

complexity constants in median computations same as that of general quantiles?

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: ...
4
votes
2answers
361 views

Existence of incomplete cholesky factorization

What is the current state of research on the existence of incomplete cholesky factorizations (in the context of preconditioning) for symmetric positive definite matrices? I wonder in particular ...
1
vote
3answers
2k views

Color frequency of a pixel

Is it possible to calculate the color frequency of a pixel? I mean, I get a pixel that is red but where this red sits on the spectrum in hertz? Is this even possible to do even in a limited way? ...
4
votes
1answer
558 views

What is a vector programming problem?

In a note: semi-definite programming is equivalent to vector programming. ... A Vector Program is a Linear Program over dot products. In Boyd's Convex Optimization, a vector optimization ...
2
votes
4answers
1k views

What is the meaning of “preasymptotic” and “superconvergent”?

Precisely the title of the question. I have encountered these terms in two areas: conjugate gradient method, and adaptive finite elements.
9
votes
4answers
386 views

Reference request: Rigorous analysis of algorithms for PDE and ODE

I'm interested in suggestions for book references on the subject of numerical PDE and ODE, in particular, a rigorous analysis of such methods in a manner written for professional mathematicians. It ...
9
votes
2answers
3k views

Find all the roots of a function in a given interval

I need to find all the roots of a scalar function in a given interval. The function may have discontinuities. The algorithm can have a precision of ε (e.g. it is ok if the algorithm doesn't find two ...
1
vote
1answer
221 views

Error analysis of WENO scheme

I have three questions regarding WENO schemes 1) How to actually compute the smoothness indicators $\beta_j$ for required order of polynomial? Any reference which explains the algorithm will be ...
3
votes
2answers
128 views

What is the difference in accuracy between fully QM atomic simulations vs QM + classical?

If I want to do a very accurate simulation of a molecular system (e.g. 2 hydrogen atoms), then I'll want to use something like diffusion Monte Carlo to determine the energies of these atoms in ...
5
votes
3answers
185 views

What are the negatives of using higher order finite diference schemes?

I was looking at this wikipedia page: http://en.wikipedia.org/wiki/Finite_difference_coefficient It is a lists of higher order finite difference approximations, is there any negatives in using these ...
4
votes
3answers
12k views

How to choose a good step size for stochastic gradient descent?

For the purpose of model fitting in a large time series dataset, I am using stochastic gradient descent of the negative log likelihood. The model is nonlinear and non-convex. Is there a thumb rule for ...
1
vote
1answer
980 views

Confusion related to convexity of 0-1 loss function

I am a bit confused why the 0-1 loss function is not convex. What's wrong with it?
0
votes
1answer
100 views

Confusion related to P and NP problems

I have this confusion related to P and NP problems. Why is P a subset of NP? I didn't get it. P problems can be solved in polynomial time. However, NP problems cannot but only verify if a solution is ...
1
vote
2answers
768 views

What sparse solver supports diagonal storage format

I'm writing finite-difference method program using C. The stiffness matrix is symmetrical and band. For its storage I'd like to use Sparse Diagonal Storage format. Could someone tell please, what ...
7
votes
1answer
80 views

Bad scaling versus collinearity

I was trying to solve a linear system: $$ \mathbf{A}\mathbf{x} = \mathbf{y} $$ but the conditioning number was quite bad (around $10^{17}$). I thought that the system was singular, but after scaling ...
5
votes
2answers
735 views

Are the drift-diffusion equations from semiconductor physics analogous to solving an advection-diffusion problem?

I am trying to understand an extra terms that appears when I derive the drift-diffusion equations for semiconductors. The extra term (see below) comes from applying the chain rule to the advection ...
3
votes
1answer
879 views

Non-linear root finding when the Jacobian is almost singular

I'm trying to solve a system non linear-equations: $$ \frac{\partial K(\mathbf{\lambda})}{\partial \lambda_i} - c_i = 0 $$ for $i = 1, \dots, 15$, using Newton's method: $$ \lambda^{k + 1} = \lambda^k ...
3
votes
1answer
112 views

Do the ellipsoid methods belong to the trust region methods?

Do the ellipsoid methods belong to the trust region methods? Reading their descriptions I tend to think the idea of the ellipsoid methods belong to the idea of the trust region methods, but am not ...
10
votes
1answer
15k views

in matlab, what differences are between linsolve and mldivide?

in matlab, both linsolve and mldivide are used for solving a system of linear equations, in all of determined, overdetermined and underdetermined cases. Reading their documents, I was wondering what ...
1
vote
2answers
628 views

complexity of flux limiter techniques

My question is not related to any particular problem, rather, I am looking at the equations of the form $$u_t+c(t,x)u_x=0$$ and attempt to solve it numerically. According to http://en.wikipedia.org/...
1
vote
1answer
132 views

How to calculate the complexity of a given Algorithm

I have the following algorithm given: Input: Regular Matrix $A \in \mathbb R^{n,n}$ Output: LU-Decomposition of A = LU for k = 1, . . . , n do for j = k, . . . , n do $r_{kj} = a_{kj} − \sum_{i=1}^...
6
votes
4answers
2k views

parameters estimation

I have to estimate a parameter (K), but I don't know how I can do it. I think by a regression model (minimum least square?), but I'm not sure. The system is: ...
3
votes
1answer
879 views

Prolongation/Restriction Operator in Multigrid

In Multigrid, using Poisson's equation, does the equality below always hold regardless of what type of boundary conditions you use? $$ R= c\cdot I^T, \text{ for some constant }c $$ where $R$ and $I$ ...
13
votes
2answers
484 views

Which time-integration methods should we use for hyperbolic PDEs?

If we employ the Method of Lines for discretization (separate time and space discretization) of hyperbolic PDEs we obtain after spatial discretization by our favorite numerical method (fx. Finite ...
4
votes
2answers
407 views

Are these two formulations of semidefinite programming problems equivalent?

From Wikipedia Denote by $\mathbb{S}^n$ the space of all $n \times n$ real symmetric matrices. The space is equipped with the inner product (where ${\rm tr}$ denotes the trace) $$\langle A,B\...
1
vote
0answers
63 views

Can I use RANS to see the effect of mixed convection?

my question is: can I use a RANS simulation to see the effect of mixed/natural convection? Actually I have also a second question: I would like to do this in Comsol multiphysics, but it seems that it ...
9
votes
1answer
2k views

Least absolute deviations solving using the Barrodale-Roberts-algorithm: Premature termination?

Please excuse the longish question, it just needs some explanation to get down to the actual problem. Those familiar with the mentioned algorithms probably could jump directly to the first simplex ...
2
votes
1answer
74 views

Integrating from tabular data, in particular steam tables

I'd like to be able to view in graph form the volume and pressure of steam produced from heating water in a sealed vessel, starting from room temperature water. Important variables, such as the ...
22
votes
2answers
4k views

A good finite difference for the continuity equation

What would be a good finite difference discretization for the following equation: $\frac{\partial \rho}{\partial t} + \nabla \cdot \left(\rho u\right)=0$? We can take the 1D case: $\frac{\partial \...
11
votes
3answers
1k views

Numerically stable explicit solution of small linear system

I have an inhomogeneous linear system $$ Ax=b $$ where $A$ is a real $n\times n$ matrix with $n\leq 4$. The nullspace of $A$ is guaranteed to be of zero dimension so the equation has a unique ...
0
votes
1answer
55 views

Confusion related to convexity of a problem

I was reading this paper related to Multiclass Classification with Multi-Prototype Support Vector Machines - paper However, I am having difficulty in understanding why they have mentioned the ...
5
votes
2answers
2k views

$k$ nearest neighbors for $n$ points with periodic boundary conditions in R^3

Take $n$ points ${\bf r} =\{ r_1 = (x_1,y_1,z_1), r_2=(x_2,y_2,z_2) \ldots r_n=(x_n,y_n,z_n) \}$ enclosed in a periodic box of length $L$, such that that the point $(0,0,0)=(L,0,0)$, $(0,0,0)=(L,L,L)$,...
2
votes
1answer
217 views

$k$-Nearest Neighbor Search using examples

I want to perform $k$-Nearest Neighbor Search in multidimensional space, but not using for example $L_2$-distance. I want the user to specify some "similar"-pairs examples and then perform a search ...
0
votes
1answer
293 views

How do convolution matrices work?

How do those matrices work? Do I need to multiple every single pixel? How about the upperleft, upperright, bottomleft and bottomleft pixels where there's no surrounding pixel? And does the matrix work ...
0
votes
1answer
171 views

Semidefinite programming

I have a convex optimization problem that is essentially a linear objective function over some linear constraints and also a semidefinite matrix in the following form: $ M= \left[ ...

15 30 50 per page
1
157 158
159
160 161
178