All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

When semicoarsening is needed in multigrid method?

I am trying to understand multigrid in deep and all the coarsening techiques. So,assuming a 2D grid when semicoarsening is prefered instead of standard coarsening?What is the error's behaviour when a ...
0
votes
0answers
7 views

Can we start Simplex method at a different corner than origin

I am working on a complex LP where I would like to get a fast heuristic solution and use it as a starting point for Simplex. The heuristic algorithm provides a corner point, but I am not sure how to ...
1
vote
0answers
21 views

Attempting to perturb ODE when initial condition is equilibrium point does not work

I have the following system of differential equations: $$ x' = ax- cy + e1 $$ $$y' = by- dx + e2 $$ for variables $x,y$ and parameters $a,b,c,d,e1,e2$. I'd like to solve this in python, which is ...
0
votes
1answer
32 views

How suitable is multigrid method for time-dependent PDEs?

For elliptic PDEs (Poisson-type), the multigrid method is very sufficient, but how about time-dependent problems (i.e parabolic or hyperbolic PDEs)? Is it efficient to solve such problems using a ...
-3
votes
0answers
8 views

How to check the feasibility of a set of linear inequality constraint?

(The image of the whole problem is also included) Consider a set of linear inequalities constraint as: Ax >= b, 0 <= x <= L, where A(N,N), x(N,1), and b(N,1). It is assumed that the ...
-1
votes
1answer
28 views

Integrate using Composite Simpson's rule

In a question, we have been given the speed of a car at time t= 0,2,4,6,.......,20 minutes.But it asks us to approximate the distance travelled by the car in 30 minutes using Composite Simpson's rule. ...
0
votes
0answers
27 views

Coding of density of states of a 2D square lattice in python [on hold]

I want to get python code for the calculation of density of states. I am very new on coding. Can anyone help me out this situation?
2
votes
0answers
19 views

How to deal with pseudo-compressibility of lattice Boltzmann method when you are calculating mass flux?

In lattice Boltzmann method, we have a concept, which is called pseudo-compressibility and it is defined based on the fact that LBM simulates incompressible flows by having small Mach number to ensure ...
5
votes
0answers
79 views

“Geometry of ill-conditioning” for least-squares problems

It is an idea that dates back to Demmel, 1987 that the condition number of a problem is often related to the distance to the closest ill-posed problems. In Section 3 of the above paper, the author ...
-1
votes
0answers
14 views

Using Patchmatch for image inpainting

I've been reading over the Patchmatch paper and sample repositories and I understand what the algorithm does. It finds pairs of pixels between two images (or the same image) that have similar ...
2
votes
0answers
42 views

Why wall shear stress calculated from LBM directly and the one calculated based on velocity profile are so different in some cases?

First of all, I hope you accept my apologizes if my question seems off topic here. But, I asked this question in ParaView forum and after a week still I did not receive any response yet, so I'm ...
3
votes
1answer
53 views

Calculate Transformation Matrix between two sensors

My question is if I can calculate the transformation matrix between two sensors. Each sensor provides a $4\times 4$ matrix for every timestep recorded. The sensors are moving and have some noise in ...
0
votes
0answers
42 views

Problem with rate of convergent of numerical scheme for hyperbolic conservation law

I need help to verify my code in C++ that developed to solve the Burgers equation $$\\u_t + (\frac{u^2}{2})_x =0$$ $$u(x,0)=\sin(\pi x),\text{ } -1\leq x \leq 1$$ using a third-order ...
0
votes
0answers
31 views

FEniCS, refinement not 'respecting' domain boundary

Short question: how to ensure that extra points are not included as 'boundary' points after calling the refine function. More details. I am working with a hexahedral mesh in $3$d. Let $X$ be the set ...
1
vote
0answers
37 views

Can the standard multigrid performance be used for time-dependent PDEs?

Consider a time dependent pde(i.e u(x,t)).I know when only space-coarsening is used the standard multigrid performance can be applied but what if instead we use only time-coarsening?Can we apply the ...
1
vote
0answers
66 views

understanding Domain Decomposition with example

I am new in Domain Decomposition method. I am started to solve $-\Delta u = f$ in $\Omega$ and $u = 0$ on $\partial\Omega$. From that I get in $\Omega _1$ $$\begin{bmatrix}4&-1\\-1&4\end{...
1
vote
1answer
43 views

Matrix multiplication not working in Scilab

I entered an instruction to calculate the coordinates of a vector after a change of basis in order to repeat it many times with various vectors. X0=[1;1/2] is a ...
2
votes
2answers
70 views

Chebyshev differentiation via FFT with a domain [a,b]

I want to ask something about Chebyshev differentiation via FFT, which can be used to obtain with spectral accuracy the derivative of a smooth function. See for instance this code in python, which ...
0
votes
1answer
42 views

Is it possible to resample grid in such a way so that continuous objects remain continuous?

Suppose I rasterize a rectangle of width 2.5 gridpoints and get the values as shown: =============== | 0 | 1 | 1 | 0.5 | 0 | Now I resample that ...
1
vote
1answer
81 views

Numerical integration in 2D

I would like to solve the following problem $$ \vec{v}(x,y)= k\, \nabla \theta(x,y) $$ with respect to the unknown function $\theta$. Parameter $k$ is just a real constant quantity. I have two ...
2
votes
1answer
47 views

Partially Banded Matrix

I have a somewhat peculiar Jx=R system that I need to solve. The matrix J is 2N -by- 2N. The first N rows have all entries filled. The next N rows are banded in two places, i.e. for the (N+k)th row, ...
2
votes
2answers
59 views

Can a direct method like Thomas be used in a multigrid method as a smoother?

As far as I know, multigrid uses stationary iterative methods as smoothers (i.e GS), but can we use a direct method also? For example, in case we have a tridiagonal system (for example 1D heat ...
-2
votes
0answers
17 views

Asymptotic Analysis Proof using Domain and Range Transformation [closed]

I was wondering if you guys could help solve the proof (it's a time complexity problem, and I needed to use Domain and Range Transformation. I used Master Theorem, but my professor also said to use ...
0
votes
1answer
48 views

Method to calculate solution of a linear equation system?

I am searching a solution method for the following equation system of equation systems: Let $A, B \in \mathbb{R}^{n \times n}$ be s.p.d. Matrices and $O$ be the zero matrix of the same size. Further ...
0
votes
0answers
23 views

Why does the matlab command **chol(A)** slower than **chol(A,'lower')** for a large sparse SPD matrix?

For a SPD matrix A, there exists Cholesky factorization $A=LL^T$ or $A=R^TR$, where L, R are a lower and upper triangular matrix, respectively. Also in matlab, there has a command R = chol(A) which ...
0
votes
1answer
45 views

Solve linear system with Newton-Raphson method

Is it possible to solve a linear matrix system $A x = b$ using the Newton-Raphson method? If yes, how can this be done? More special, how is the derivative build?
5
votes
1answer
57 views

How to record hardware and software info in Julia?

Watermark extension for Jupyter shows system and package information for reproducibility: ...
2
votes
1answer
74 views

Step size and stability of Euler forward method

I'm trying to calculate the maximum step size that provides stability for the following nonlinear IVP using the Euler forward method: $u'(t) = -200tu(t)^2,\qquad u_0 = 1, \qquad t\in [0,3]$, with ...
6
votes
3answers
326 views

Does a symmetric positive definite matrix also have $\mathbf{A} = \mathbf{L}^T\mathbf{L}$ (where $\mathbf{L}$ is a lower triangular matrix)?

As we know, for a symmetric positive definite (SPD) matrix $\mathbf{A}$, there is a theorem about the Cholesky factorization $\mathbf{A}= \mathbf{L}\mathbf{L}^T$, where $\mathbf{L}$ is a lower ...
1
vote
1answer
62 views

Simulating advection - diffusion problem in a network of 1D pipe

I'm interested in solving the following advection-diffusion system in a 1D network of pipes. $$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2} - v\frac{\partial C}{\partial x}$$ ...
0
votes
2answers
39 views

What's the difference between the 2 ways of definitions of function handle? which is robust and better?

Recently, I have been studying Krylov subspace iterative methods. I find the matlab robust command pcg and the new concept of the function handle to return a matrix-vector product. Then I use help pcg ...
0
votes
0answers
49 views

Lax-wendroff for stiff source terms

I am interested in problems of the form $$ u_t = F(u) + S(u) $$ where $F(u) = - div(f(u))$ and $S(u)$ is a stiff source term. I am looking for any existing works which develop Lax-Wendroff type ...
2
votes
0answers
49 views

What is appropriate boundary condition for Poisson pressure equation?

I'm doing CFD simulations in unstructured grids. Well, it's a bit different from conventional unstructured grids that are used mainly in FEM or FVM as tetrahedral meshes. Mine is a voxelized mesh of ...
2
votes
3answers
90 views

How the gmres method iteration behaves for this **enfant terrible** matrix?

Recently, I have been studied my lessons about gmres iteration, probably the most popular iteration method for general large sparse linear system of equations Ax=b. And the convergence is obtained ...
0
votes
2answers
62 views

How can I calculate the exponential integral?

(I originally asked this in a different exchange.) I'm writing a program that uses the prime-counting function. Right now, I'm using x/log(x), but I want to ...
1
vote
0answers
22 views

Solving a system of PDEs with no-flux boundary conditions (finite difference discretization)

I am interested in solving a system of linear PDEs with the finite difference method and I'm having trouble to solve the no-flux boundary condition correctly. \begin{align} \frac{\partial n}{\partial ...
1
vote
0answers
19 views

Speedup of CPU Pipelining by number of steps

When a CPU has $K$ steps the speed up of using pipelining compared to non-pipelining is $K$. But what I want to know is, say I am a CPU designer and want to decide whether I should build $K$ or $N$ ...
1
vote
1answer
31 views

How can I determine if there is a closed-loop path in a graph?

Assuming I have a computer representation of a graph presented in the figure below: How can I find out whether there are some close-loops inside the graph, like the one marked in red (or more ...
0
votes
1answer
37 views

Can we use interpolation function of different order to represent different degrees of freedom in a FEM element?

Consider a line element in FEM. Let each node have 3 DOF. They are x and y translation DOF and temperature. Can we use interpolation functions of different orders for the translation DOFs and ...
1
vote
1answer
62 views

How to compute all the eigenvalues of a large sparse matrix using matlab?

In matlab, there are 2 commands named "eig" for full matrices and "eigs" for sparse matrices to compute eigenvalues of a matrix. And eig(A) computes all the eigenvalues of a full matrix and eigs(A) ...
-1
votes
1answer
21 views

Recursive Algorithm to Calculate Determinant via Expansion of Minors in C#

I have been recently trying to attempt to write an algorithm in C# that would calculate the determinant of a matrix via recursion using the expansion of minors method. I understand that there are ...
5
votes
0answers
26 views

Symmetric sparse direct solvers in scipy

scipy.linalg.solve, in its newer versions, has a parameter assume_a that can be used to specify that the matrix $A$ is symmetric ...
0
votes
0answers
24 views

What is Voronoi particle tracking?

I've been trying to track this down, but google is giving paywall papers that don't appear to be directly related to computational science, or simply don't explain the source algorithm. There's an ...
0
votes
0answers
17 views

Direct and Inverse efficient mapping of 3D cartesian positions in a 1D array

I saved a sample of $N$ Cartesian locations $\{x_i, y_j, z_k\}$ inside a one-dimensional array $\mathbf{a} = \{a_l\}_{l = 1}^N$. How can I access back (efficiently) the $l$-location of the array $\...
1
vote
1answer
80 views

Are there any commercial CFD codes that implement a Discontinuous Galerkin scheme?

I've been reading about the Discontinuous Galerkin discretization scheme and it's application to CFD for fluid flow. It seems to be a promising method for simulating turbulent flows, by using higher-...
5
votes
1answer
67 views

Understanding butcher tableau when it comes to implicit methods

I've been learning about butcher tables and am having some difficulty understanding how to translate them when it comes to implicit methods. Specifically, I'm looking at backwards Euler: \begin{array}...
2
votes
0answers
50 views

What exactly is the cause(s) of blow-up for too-large step size in a method like RK4?

I have been working on creating a few home-made numerical methods, and I am using them to visualize text-book problems from my Strogatz dynamics textbook. It feels like a good way to learn numerical ...
1
vote
1answer
31 views

Accelerating Conjugate Gradients fitting for small localized kernel (like cubic B-spline)

Question: Is there some pre-conditioner for Conjugate-Gradient (CG) cheap enough, that it is worth using even if my operator is very local (i.e. already has a low number of non-zero elements), as it ...
0
votes
0answers
14 views

Offline Parameter Estimation for second order system - Ordinary Least Squares

I have a second order system which is described by the following differential equation: $\ \ddot{y}+α_{1}*\dot{y}=b_{0}*u $ where $\ y $ is the output of the system and $\ u $ is the input of the ...
0
votes
0answers
35 views

Imposing decaying boundary conditions on a non linear ode

I am trying to solve $a^{2}y''=y+y^3$ numerically. This equation models a potential and goes to $\infty $ for $x\to0$ hence I get the singularity to be of order $\frac{1}{x}$ by keeping only the y^{3} ...

15 30 50 per page