All Questions

Filter by
Sorted by
Tagged with
1
vote
2answers
65 views

Is the similar subdivision of a delaunay mesh still delaunay?

I have a delaunay triangulation for a 2d box with say an airfoil inside. If I uniformly refine this mesh by subdividing each triangle in the mesh into 4 triangles by halving each edge, is the ...
0
votes
2answers
25 views

Why Householder transformation can not be chosen to be an identity matrix?

For Householder transformation, we know that $H = I-uu^T$, where $\|u\|_2=\sqrt{2}$. When it acts on any vector $x$, $Hx$ and $x$ is symmetric with respect to $span(u)^T$. But I have read a ...
2
votes
1answer
84 views

Givens rotation vs 2x2 Householder reflection

The usual story of Givens rotations vs Householder reflections is that Householder reflections are better if you want to map a long vector to $e_1$, while Givens is better if you want to map a 2-...
1
vote
1answer
40 views

Using adolc for the sign function in c++

Here is an implementation of the sign function in C++ using Adolc librairy for automatic differentiation. ...
0
votes
0answers
32 views

HSS preconditioner with gmres [closed]

I have a question about HSS preconditioner with GMRES method. For implementing the HSS preconditioner with GMRES, we need to solve the linear system of the form (I + H)(I + S)z =r, for a given r at ...
1
vote
1answer
29 views

Initial condition for Kuramoto-Sivashinsky

For a project in my advanced numerical method class I have to solve the 1D Kuramoto-Sivashinsky equation of which I know little. I just know that it was derived the equation to model the diffusive ...
1
vote
1answer
83 views

Efficient ways to numerically evaluate matrix exponentials

What are some computationally efficient ways to solve matrix exponentials, i.e. functions of the form : f(X)=$e^{X}$, where X is a square matrix ? So far I have been able to diagonalise some ...
3
votes
0answers
26 views

Solving saddle point problem having non-invertible top-left block with a PETSc nested matrix

My system is a symmetric FE problem with lagrange multipliers: $Z=\begin{pmatrix}A & C^T \\ C & 0\end{pmatrix}$ The matrix $A$ is positive semi-definite, non-invertible. The whole matrix is ...
3
votes
0answers
23 views

Hit-n-Run Monte Carlo on convex polytope

So, I'm currently trying to implement a MCMC to uniformly sampling hyper-points from the polytope defined as $\mathbb{K}=\{x\in\mathbb{R}^{n}\;\;\text{s.t.}\;\; A\,x=b \}$ in the specific case where, ...
4
votes
1answer
105 views

Computation of triple nested loops as a convolution product?

I'm trying to compute efficiently the following \begin{equation} A_j = \sum_{l'=1}^{\infty}\sum_{k= 0}^{K-1} L_{l'}T_ke^{2\pi i \frac{k}{K}j}\epsilon_{l',k} \end{equation} for $j = 0,1, \ldots, K-2,K-...
1
vote
1answer
28 views

Determinant of a matrix after removing or adding lines and columns

In quantum mechanics, the wavefunction of N electrons is given by a determinant. I am working on a Monte Carlo algorithm. At each Monte Carlo step, I need to add or remove an electron, which means ...
3
votes
0answers
47 views

Levinson Recursion for Non Square Toeplitz Matrices

Given a rectangular Toeplitz Matrix $ H $, how could one solve: $$ y = H x $$ For instance, $ H $ can be Linear Convolution Matrix of the filter $ h $: $$ H = \begin{bmatrix} {h}_{1} & 0 & ...
1
vote
1answer
372 views

What is the difference between Abaqus and Calculix contact input?

I would like to say first that am new at using Calculix. I'm using Abaqus/CAE to create a cup deep drawing simulation and everything worked perfectly but my objective is to run the same exact ...
2
votes
1answer
38 views

pdepe or Crank-Nicolson? How much is pdepe good?

I am beginner in MATLAB and similar. I sow and discussed with my professors doing simulations some times: they wrote down a lot of calculus, most of them using Crank-Nicolson Method and so implement ...
2
votes
0answers
36 views

Inverting really big symmetric block matrix

I have a really big symmetric 7.000.000 X 7.000.000 matrix that i would like to invert. The matrix is extremely sparse and it can be rearranged as to become a block matrix. The biggest blocks are ...
-1
votes
0answers
28 views

How to compute the gradient of T with Armadillo library [closed]

I am using the Armadillo library to solve a 3d heat conduction problem on 3d unstructured grid system,the gradient of the T field is determined by the least square method. I have created a matrix ...
4
votes
0answers
36 views

Why the two Gram-Schmidt algorithms produce different results for qr factorization?

For the qr factorization using classic Gram-Schmidt algorithm, I found the 2 different implementations below. The first one uses the for loop to compute the upper ...
0
votes
1answer
93 views

How to compute over 1 billion particles?

I want to simulate human erythrocytes in capillaries. I calculated, that for 1 meter long and 1 mm in diameter capillary there are about 3 billions blood cells. Erythrocytes are actually discs, but ...
4
votes
1answer
54 views

Why the solid FEM problem can not be solved after constraining 3 degrees of freedom?

I write a simple MATLAB code for solving solid FEM problem. The problem looks like that (1) (2) x-------x | / | | / | | / | x-------x (3) (4) ...
30
votes
2answers
11k views

why is A*v+B*v faster than (A+B)*v?

$A$ and $B$ are $n \times n$ matrices and $v$ is a vector with $n$ elements. $Av$ has $\approx 2n^2$ flops and $A+B$ has $n^2$ flops. Following this logic, $(A+B)v$ should be faster than $Av+Bv$. Yet,...
12
votes
4answers
663 views

Example where autodiff works but symbolic differentiation will not?

According to the survey paper on autodiff (linked) Autodiff works on inputs that cannot be specified in closed form but can be described by a sequence of code, each component of which is ...
-1
votes
0answers
53 views

Simulating an object in orbit

This question is more oriented around suggestions for simulation tools and how to approach simulating an object in orbit. So high level I am trying to simulate the concept of a Sky Hook. What are the ...
9
votes
2answers
7k views

Use of machine learning in computational fluid dynamics

Background: I have only built one working numeric solution to 2d Navier-Stokes, for a course. It was a solution for lid-driven cavity flow. The course, however, discussed a number of schemas for ...
0
votes
0answers
47 views

Is it possble to do this complex symbolic calculation with Matlab?

Sorry it's bit abrupt, but recently I am caught up in some symbolic calcualtion which is tedious and almost impossible with mere human hands, so just wondering is it possible to solve the double ...
5
votes
1answer
2k views

Eigen - store sparse matrix as binary

I need to store large sparse matrices in Eigen. I cannot find anything in the library except the function below, in Eigen/Unsupported. The problem with saveMarket is, that it saves in text format. Due ...
-1
votes
0answers
5 views

Change value of dependent sweep varietals

I am using Comsol to model a really hard problem. I am using the sweep for one variable (width), and as the problem state (Length=2*width). When I use the sweep the value of Length does not update. ...
10
votes
2answers
531 views

How to sample points in hyperbolic space?

Hyperbolic space in the Poincaré upper half space model looks like ordinary $\Bbb R^n$ but with the notion of angle and distance distorted in a relatively simple way. In Euclidean space I can sample a ...
1
vote
0answers
52 views

Can Representation Theory be studied computationally / numerically?

Can a subfield such as the representation theory of Lie algebras be studied computationally / numerically -- is there an interplay between the abstract and the concrete? I would be grateful for an ...
2
votes
1answer
52 views

Solution method of nonlinear heat transfer analysis

The governing equation of transient heat transfer analysis is described as follows: $$C \frac{dT}{dt}+K T = Q$$ When using backward difference scheme for the discretization of the time we get the ...
1
vote
2answers
156 views

How to vectorize 2 nested for loop with one complex condition in the inner loop?

Octave calculations is too slow specially when you deal with scientific calculations that can span a very very large matrix, even just iterating. I have to vectorize it to speed up the calculation. ...
5
votes
1answer
139 views

Complex differentiation of linear solvers

I have a linear system $$Ax=b$$ which I'm solving approximately, and I need to take the frechet derivative of x with respect to z. Were I solving the problem exactly (either analytically or to machine ...
1
vote
1answer
74 views

Is this a valid way to implement Neumann BCs in finite differences?

I'm trying to solve the 1D heat equation with Neumann boundry conditions numerically using finite differences: $$u_t = \alpha u_{xx}$$ $$u_{x}(0, t) = u_{x}(L, t) = k$$ $$u(x, 0) = u_0(x)$$ The main ...
4
votes
0answers
82 views

Trying to understand splitting-based iterative method for 2D Laplace problem

I am trying to understand the theory behind a splitting based iterative method which uses the incomplete Cholesky factorization. Before giving the specific details, let me first give the problem ...
0
votes
2answers
39 views

contour plot of cloud of points

I have a cloud of points scattered in a rectangle and some data in this points, a bit like this $$ x(:)=[x(1), x(2), ..., x(N)] \\ y(:)=[y(1), y(2), ..., y(N)] \\ u(:)=[u(1), u(2), ..., u(N)] $$ ...
8
votes
1answer
148 views

When training a neural network, why choose Adam over L-BGFS for the optimizer?

More specifically, when training a neural network, what reasons are there for choosing an optimizer from the family consisting of stochastic gradient descent (SGD) and its extensions (RMSProp, Adam, ...
6
votes
1answer
2k views

Computational methods for finding the energy eigenvalues of the time-independent Schrodinger equation with arbitrary potential

I have seen in some papers that the energy levels in some arbitrary potential are specified. How can one find the energy levels in such arbitrary potentials. For example, $V(x)=\sin^2(x/2)$ with $x\in[...
9
votes
1answer
3k views

Solving linear systems by fft

I read in a paper and also at wiki that we can solve the system $$Ax=B$$ by Fast Fourier Transform, where $A$ is a circulant matrix. The solution is $$x=\mathtt{ifft}(\mathtt{fft}(B)/\mathtt{fft}(a))$...
1
vote
0answers
43 views

Calculation of Mean Square Displacement for Brownian dynamics system with Lennard Jones interactions in python3

I have a problem getting a sensible result for the Mean Square Displacement (MSD) for a simulation of $N$ particles under Brownian dynamics with Lennard-Jones interaction between them with or without ...
2
votes
0answers
35 views

Avoid matrix multiplication in algebraic multigrid method

Currently when I try to solve a linear algebra system of the form of $A x =b$ I use the algebraic multigrid method. The algebraic multigrid method uses a Galerkin product to form the coarse grid ...
1
vote
2answers
62 views

Solving a 1D diffusion equation with linear and nonlinear source terms

I would like to numerically solve the following equation: $$\frac{\partial \rho (z,t)}{\partial t} = B(N_D \rho (z,t) + \rho(z,t)^2) + D \frac{\partial^2 \rho (z,t)}{\partial z^2}$$ with the boundary ...
3
votes
1answer
81 views

Can one publish a new model and simulation without physical experiments?

When I read strong papers from, say, the Journal of Fluid Mechanics, a simple model, simulations and physical experimental results are given, showing good agreement. Can one publish a new model and ...
0
votes
1answer
40 views

How to improve the efficiency of periodicity detection for long time based lined and gapped datasets

Our data set has $10^4$ data points, but has a long baseline and many gaps. As the histogram shows, the horizontal-axis is time and most of the time, there are no data. The vertical-axis is data ...
2
votes
0answers
28 views

Integer partition algorithms

I am familiar with and have written MathCad algorithms for the partition functions 𝑝(𝑛,𝑘),which gives the number of ways of partitioning 𝑛 into 𝑘 parts, 𝑞(𝑛,𝑘), which gives the number of ways ...
1
vote
1answer
65 views

Interpolation of Data Value using Optimized Weighting of Its Features

Assume I have a data set $ { \left\{ {x}_{i} \right\} }_{i = 1}^{N} $ which represents the value of each data point. For each data we have its features $ {f}_{i} \in {\mathbb{R}}^{d} $. The model I ...
-4
votes
0answers
15 views

HOW TO SOLVE IMPROPER INTEGRAL IN SCILAB [closed]

How to solve infinite limit integral in scilab Is there any inbuilt function which can solve improper integral What is code for scilab to solve improper integral
1
vote
0answers
46 views

Numerical methods. MDF (ILU) implementation

I am trying to implement Minimum Discarded Fill (MDF) Ordering algorithm for incomplete matrix factorization. The algorithm description is here on page 60 Preconditioning Techniques for a Newton–...
4
votes
1answer
229 views

Computation of diffusion time

While simulating the diffusion of a substance in 1D, $$ \frac{\partial C}{\partial t} = \nabla \cdot (D \nabla C). $$ I'd like to compute the diffusion time In this link, the diffusion time is given ...
0
votes
0answers
52 views

Comparison of diffusion time - theoretical value vs computed

This is a follow up to my previous post I've been trying to compare the diffusion time obtained from theoretical derivation(answered in my previous post) and what is obtained computationally, for a ...
1
vote
1answer
120 views

Relation between Stress/Strain and normal derivative of displacement

I calculated the stress $\sigma$ and strain $\varepsilon$ for a solid plate with dirichlet boundary conditions $u = g$, where $u$ is the displacement. With these I want to calculate $\nabla_n u = t$ ...
2
votes
1answer
99 views

mesh dependence of numerical adjoint solution

I am solving the steady, two-dimensional adjoint Euler equations, $$A_x^T \partial_x \Psi + A_y^T \partial_y \Psi = 0$$, where $A_x = \partial F_x/\partial U$ and $A_y= \partial F_y/\partial U$ are ...

15 30 50 per page