# All Questions

921 questions
Filter by
Sorted by
Tagged with
2k views

### Solving a Nonlinear BVP using Finite Difference Method

I am trying to write a code to solve a nonlinear BVP using the Finite Difference Method. The BVP is: $(T^2)\frac{\partial^2 T}{\partial x^2} + T \left( \frac{\partial T}{\partial x}\right)^2 + Q = 0$ ...
924 views

### Is a checkerboard block decomposition of a matrix useful when solving a linear system with a parallel conjugate gradient method?

According to these lecture notes, a checkerboard block decomposition should exhibit better scalability when applied to parallel matrix-vector multiplication (presumably because of greater cache hit ...
773 views

### Add User-defined/custom differential equations in OpenFoam (CFD)

I am new to OpenFoam. And I am trying to add a set (user defined) of differential equations to OpenFoam. I want to solve this user defined set of equations at each time point in addition to standard ...
162 views

### Derivatives of Approximate Matrix inverses

I am cross posting this question to the mathermatics stack exchange. please find it either at this link, https://math.stackexchange.com/q/2952989/430980, or below: I have a question concerning the ...
424 views

### Energy Conservation in Conservation Laws with Source Terms

I'm wondering if anyone can help me understand energy conservation when using conservation law methods (i.e. Riemann solver, High-Resolution Wave-Propagation Methods) with the addition of source terms:...
700 views

### How can I make velocity verlet algorithm more stable?

The answer to this question implies that reducing the time step would make it more stable. However I have tried reducing the time step but the system is still unstable(the total energy increases to a ...
312 views

65 views

### Kronecker-factored least-squares?

Suppose $a_i,b_i$ are $d\times 1$ matrices, $y_i$ is scalar, and I need to find least-squares solution $w$ of the following system of $n$ equations: $$y_i=(a_i^T\otimes b_i^T)w$$ Is there a ...
2k views

### Intel MKL - Difference between mkl_intel_lp64 and mkl_gf_lp64

I am currently trying to link a program against the Intel MKL 11.0 library instead of using NetLIB or OpenBLAS. Doing this I recognized the following error which I can not explain to my self at the ...
998 views

967 views

### Similarity of two CSV files (or more?)

A CSV file is characterized by a header, describing the n datarows to come. The header is a text string separated by a separator. A CSV header might look like (C1) ...
2k views

In these notes (section 2.3), it is stated that: A point $x^*$ is a minimizer of a function $f$ (not necessarily convex) if and only if $f$ is subdifferentiable at $x^*$ and $0 \in\partial f(x^*).$ ...
228 views

### Determine numerical infinity for Schrodinger equation $−\psi''(x) + x^ 2 \psi(x) = E\psi(x)$

Consider the following Schrodinger equation for the harmonic oscillator with real $x$: $$−ψ''(x) + x^ 2 ψ(x) = Eψ(x).$$ I solve the last equation using shooting method and implicit Runge-Kutta ...
443 views

### Finite Difference and Finite Volume as special cases of Finite Element

I have heard this many times that "FD is a special case of FE" and separately, that "FV is a special case of FE". However I have never come across a brief document that substantiates that claim, ...
497 views

### How can I avoid roundoff error when calculating the difference $\textrm{erfc}(a) - \textrm{erfc}(b)$?

In this excellent answer, it is recommended that one make use of the $\textrm{erfcx}$ function to avoid roundoff error in calculating dealing with $x < 25$ (approximately). So, one scales their ...
190 views

### Generate Random Number outside Bounds:

Say I have a random number generator that generates a number within [0, RAND_MAX], and RAND_MAX < UINT_MAX. How do I ...
114 views

### Backward stable algorithm to get orthogonal projection onto the column space of a matrix

I have to find the orthogonal projection of a vector $b$ onto the matrix $A$ of size $m \times n$. In my application, I don't have the luxury of calculating the QR factorization. All I have are ...
391 views

1k views

### Derivatives Approximation on non uniform grid

I was trying to approximate 1st derivative of a function $\phi$ on a non uniform grids: basically my aim is to do this on a uniform grid on the same domain, so I can calculate it on the "new" grid. ...
361 views

### Solve a very large linear system (question about a library linear algebra to do this)

I need to solve a very large linear system (coming from finite element method). I'm currently using the Intel MKL library, but the system has been delayed more than 20 hours. The matrix of the system ...
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 ...