All Questions

Filter by
Sorted by
Tagged with
5
votes
2answers
1k 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)$,...
9
votes
5answers
962 views

How can I automate the process of optimizing the design of a physical object?

I'm trying to optimize a flow distributor in a tank such that the velocity and temperature distribution across any cross-section is relatively uniform. There are many parameters I can adjust to the ...
6
votes
2answers
269 views

Derive PCA with SVD

The context is I have a big matrix, 20K * 50K, and I want reduce the dimensionality. In R, it's impossible to apply PCA with more variables(columns) than observations(rows). Therefore, I am trying a ...
17
votes
5answers
798 views

How to address numerical non-associativity for parallel reduction?

A parallel reduction assumes that the corresponding operation is associative. This assumption is violated for addition of floating point numbers. You might ask why I care about this. Well, it makes ...
3
votes
1answer
599 views

What does “missing-wedge corrected” mean?

For identification of macromolecular complexes in cryoelectron tomo- grams covering cytoplasmic regions, we used a combination of subtomogram averaging and classification. In a first step, the ...
4
votes
2answers
78 views

Any reference which summarizes decompositions?

Is there any reference (preferably available online as PDF, Free would be best) which summarizes the various matrix decomposition with their conditions for use, usage, algorithm, complexity and ...
21
votes
4answers
3k views

Algorithms for (adaptive?) function plotting

I am looking for algorithms to draw standard 2d-graphs for functions that may or may not have singularities. The purpose is to write a "Mini-CAS", so I have no a priori knowledge of the types of ...
5
votes
1answer
231 views

Largest unstructured mesh problem solved till date

What is the largest problem (in DOF) that has been solved till date using a fully unstructured mesh. I know about PFLOTRAN but I am not sure if it is the largest. If someone can point to relevant ...
8
votes
3answers
377 views

What is too big for standard linear algebra/optimization methods?

Different numerical linear algebra and numerical optimization methods have different size regimes where they're a 'good idea', in addition to their own properties. For example, for very large ...
9
votes
4answers
1k views

What is a robust, iterative solver for large 3-d linear-elastic problems?

I'm diving into the fascinating world of finite element analysis and would like to solve a large thermo-mechanical problem (only thermal $\rightarrow$ mechanical, no feedback). For the mechanical ...
3
votes
1answer
251 views

Sampling strategies to solve a stochastic partial differential equation

Suppose I had a stochastic partial differential equation of the form: $\nabla^2U=F(x,D)$, where $x\in\Omega\equiv [0,1]$ and $F(x,D)$ is a function which depends on position $x$ and a uniform random ...
9
votes
5answers
639 views

How can I derive a bound on the spurious oscillations in the numerical solution of the 1D advection equation?

Suppose I had the following periodic 1D advection problem: $\frac{\partial u}{\partial t} + c\frac{\partial u}{\partial x} = 0$ in $\Omega=[0,1]$ $u(0,t)=u(1,t)$ $u(x,0)=g(x)$ where $g(x)$ has a ...
17
votes
2answers
3k views

Disadvantages of common discretization schemes for CFD simulations

The other day, my computational fluid dynamics instructor was absent and he sent in his PhD candidate to substitute for him. In the lecture he gave, he seemed to indicate several disadvantages ...
3
votes
1answer
790 views

32bit/64bit issue when working with Numpy and petsc4py

When indexing PETSc.Mat A with an array c ( numpy.ndarray with ...
2
votes
0answers
137 views

Would anyone give some review on adjoint methods in shape optimization method <in fluid dynamics>? [closed]

Modification Is a continuous adjoint approach a reliable/promising method for optimizing the shape of an airfoil under conditions of unsteady turbulence flow? Original Question I saw lots of people ...
10
votes
1answer
746 views

Does PETSc ever make use of LAPACK libraries for sparse matrix math?

Does compiling PETSc with an external BLAS/LAPACK library significantly affect performance on sparse matrices, or does it only use those libraries for dense matrix math?
8
votes
2answers
1k views

Taxonomy of ILU preconditioners

I learned that for BiCGStab solver for sparse linear systems it's pretty much always necessary to use a preconditioner. I realized by now that choosing a good one is problem dependent. Surfing the ...
2
votes
1answer
95 views

application of oscillatory high-dimensional functions

Has anybody stumbled upon any kind of application of high-frequency high-dimensional problems ($d\geq 4$)? My interest comes from the following: there is quite a decent amount of papers where people ...
4
votes
2answers
271 views

Memory usage within graphics cards

I have a question about the memory usage within the graphics card. What does happen when the used application needs more memory than the graphic card does contain? let`s say the reserved main memory ...
4
votes
1answer
1k views

Python syntax for MATLAB/Octave colon operator a:dx:b

I am trying to rewrite some MATLAB/Octave code in Python, and I don't know what would be the nicest or most intuitive way of writing ...
4
votes
3answers
11k 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 ...
14
votes
6answers
2k views

Are there open-source scientific libraries which use modern Fortran with OOP?

I've spent the last couple of months on coding a Fortran program for solving a particular PDE system (describes fluid flow/combustion). I tryed to use latest-standard Fortran and the new OOP ...
5
votes
1answer
308 views

solving generalized eigenvalue problems with the same precondition

suppose solving sequential generalized eigenvalue problems $$A_i x= \lambda Bx, i=1,2,3,\ldots $$ In general setting, we always need to perform LU for matrix B (preconditioned) before to apply the ...
16
votes
5answers
4k views

Apply PCA on very large sparse matrix

I am doing a text classification task with R, and I obtain a document-term matrix with size 22490 by 120,000 (only 4 million non-zero entries, less than 1% entries). Now I want to reduce the ...
11
votes
2answers
851 views

How do you improve the accuracy of a finite difference method for finding the eigensystem of a singular linear ODE

I am attempting to solve an equation of the type: $ \left( -\tfrac{\partial^2}{\partial x^2} - f\left(x\right) \right) \psi(x) = \lambda \psi(x) $ Where $f(x)$ has a simple pole at $0$, for the ...
3
votes
1answer
1k views

Rigid Body Elements

I am currently developing structural FEM solver in FORTRAN. My question is about Rigid Body Elements (Multi Point Constraints). In NASTRAN there is RBE2 element defined by one independent and one or ...
6
votes
3answers
1k views

How to quickly implement and test a turbulence model?

What is the best software for quickly implement and test a Reynolds Averaged Navier-Stokes turbulence model ?
3
votes
2answers
153 views

Petsc's xxxSetxxx methods: Own Pointer or Copy Values?

In PETSC, there are many xxxSetyyy methods, e.g. MatSetLocalToGlobalMapping(A,rmap,cmap). I wonder whether contents of rmap and cmap (or generally yyy, that set to xxx) pointing to are copied to ...
8
votes
2answers
2k views

Minimizing a quadratic function with nonlinear constraints

what would be good methods (and/or software packages) to try for solving a problem minimizing a quadratic function $f(x) = \sum_{i=1}^N{(x_i - y_i)^2}$, s.t. $0 \leq x_i \leq 1$, and there are more ...
11
votes
2answers
1k views

How to interpolate multipoint data to the cell centres of an unstructured mesh?

I have sets of multipoint field data, each point data set relates to a single cell of an unstructured mesh. The goal is to interpolate the data to the cell centre, directly or indirectly, in the most ...
6
votes
2answers
512 views

Large-scale generalized eigenvalue problem with low rank LHS matrix

Assume that we have generalized eigenvalue problem: $B^HB\textbf{x} = \lambda A\textbf{x}$ where $A$ is an nxn Hermitian sparse matrix (n is very large, so we do not have $A^{-1}$ but can solve ...
5
votes
2answers
263 views

Out-of-core matrix transpose of row compressed data

Summary: Are there good algorithms for out-of-core dense matrix transpose if each row of the matrix is separately compressed? Details: The matrix is about 1 TB uncompressed, and is roughly but not ...
26
votes
8answers
5k views

Which package should I use to wrap Modern Fortran Code with Python?

I know of, and have used f2py2e to wrap some old Fortran 77 code, but my understanding is that it does not work with newer Fortran 95 code. I've researched what I should use, and have come across ...
2
votes
0answers
3k views

COMSOL - Implementing Perfectly Matched Layers (3D)

If there are any COMSOL gurus here, I want to simulate a 3D RF system infinite in 1 direction. I realize I need to use PML's, but am unsure how to configure them. it seems that simply scaling them by ...
6
votes
3answers
330 views

Multiply Multiple Sparse Matrices

When we calculate products of multiple matrices, e.g., $ABC$, do you think it can be done in a cheaper way than as two consecutive multiplications? Note that I'm not talking about applying matrices to ...
3
votes
1answer
1k views

Application of an orthogonal matrix to a 3D configuration of point

Suppose a 3D configuration of points is given, $X\in\mathbb{R}^{n\times 3}$, and a matrix $Q\in\mathbb{3\times 2}$, with orthonormal columns. Now, suppose a mapping to 2D is obtained as $$Y=XQ.$$ ...
7
votes
2answers
285 views

is accessing an element in an array slower than accessing a variable?

when optimizing my code, i find myself often writing something like the following ... do i = 1,n r = t(i) y(i) = r*r*2.0 f(i) = r*3.5 enddo what i am ...
19
votes
6answers
14k views

How to get started with OpenFOAM for CFD

I'm looking at using OpenFOAM for solving basic internal flows in CFD. What is the best way to get started, and could anyone please point me to a good online reference to go to with any questions I ...
8
votes
1answer
525 views

Finite difference scheme for compressible nonisothermal flow in porous media

My challenge is to solve the following system of equations, which describe gas combustion in porous media: 1) Continuity $\varepsilon \frac{\partial \rho_g}{\partial t} +\frac{\partial}{\partial x} \...
2
votes
1answer
26 views

How do I print a PetscBag to a specific file?

I have a PetscBag in my program that I want to write to a filename I have stored as a string. If I want to write to stdout, there is a pre-made PetscViewer macro ...
13
votes
1answer
10k views

Universities known for computational physics

I am very interested in computational physics and it is great lot of fun studying these topics. Since I am planning to go one semester abroad, I was wondering what universities are known for ...
4
votes
1answer
115 views

Efficient computation of the extension of a linear basis to completion when the basis is almost complete (ideally using LAPACK routines)

I have a $p \times n$ matrix $B$ (where $n < p$) with orthonormal columns and would like to find a numerically efficient way to extend this matrix to get a complete $p$-dimensional orthonormal ...
5
votes
2answers
219 views

What is a suitable algorithm for solving a large mixed-integer quadratic program?

I am interested in the solutions of a very large quadratic programming (QP) problem \begin{align} \min_{x \in \mathbb{R}^n} & x^T Q x\\ \mathrm{subject\ to} & A x = b\\ & x \in \{0,1\}^n \...
14
votes
4answers
1k views

Illustrative examples of mimetic finite difference methods

As much as I try to find a concise explanation on the internet, I can't seem to grasp the concept of a mimetic finite difference, or how it even relates to standard finite differences. It would be ...
8
votes
1answer
136 views

Anyone knows references summarizing the history of supercomputing?

Anyone knows references summarizing the history and ideas behind supercomputing including mentioning of developments in parallel programming languages, applications, startup companies (some was ...
17
votes
5answers
2k views

Finding a global minimum of a smooth, bounded, non-convex 2D function that is costly to evaluate

I have a bounded non-convex 2-D function which I'd like to find the minimum of. The function is quite smooth. Evaluating it is costly. An acceptable error is about 3% of the function's domain in each ...
20
votes
3answers
12k views

Recommendation for Finite Difference Method in Scientific Python

For a project I am working on (in hyperbolic PDEs) I would like to get some rough handle on the behavior by looking at some numerics. I am, however, not a very good programmer. Can you recommend ...
22
votes
3answers
760 views

Solving $(G^TA^{-1}G)x = b$ without inverting $A$

I have matrices $A$ and $G$. $A$ is sparse and is $n\times n$ with $n$ very large (can be on the order of several million.) $G$ is an $n\times m$ tall matrix with $m$ rather small ($1 \lt m \lt 1000$) ...
8
votes
2answers
901 views

How can I precondition a non-linear problem before linearization?

When I think of solving non-linear equations, I generally think of linearizing first, then applying a preconditioner to the linear matrix. The thought occurred to me that it might be possible to ...
4
votes
1answer
434 views

When is MatGetArray/VecGetArray useful?

In petsc, there are already SetValues(Local) methods. But when does one need GetArray methods? A related question: to copy a portion of a Mat/Vec to part of another Mat/Vec, it is usually suggested ...

15 30 50 per page