# All Questions

8,072 questions
Filter by
Sorted by
Tagged with
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)$,...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
790 views

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

When indexing PETSc.Mat A with an array c ( numpy.ndarray with ...
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 ...
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?
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ?
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.$$ ...
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 ...
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 ...
525 views