All Questions
11,326
questions
0
votes
1
answer
18
views
Bachelor thesis going out of hand, need help
I am currently working on my bachelor thesis, which aims to enhance the multigrid preconditioned conjugate gradient algorithm proposed by Tatebe in 1993 using Deep Learning.
Currently, I am ...
3
votes
3
answers
362
views
Poor test functions for optimization
I have been looking in detail into one of the many "meta-heuristic" optimization algorithms and became suspicious at how well it appeared to perform (compared to other methods like Nelder-...
3
votes
0
answers
115
views
Iterative solver for high order DG methods (3D Laplace problem)
I have a 3D Laplace problem on quite a complicated geometry where I am using Discontinuous Galerkin method. My mesh is composed by hexas, hence I am employing classical tensor product basis functions $...
1
vote
2
answers
59
views
Counting solutions to mixed integer linear programs
Say I have a mixed integer linear program in variables $x \in \mathbb{Z}^a, y \in \mathbb{Z}^b, z \in \mathbb{R}^c$ together with linear constraints on $(x,y,z)$. I want to count the number of values ...
0
votes
0
answers
17
views
Help in solving Quintessential scalar field using Steep Potential in cosmology
I am attempting to solve the differential equation $\ddot\phi + 3H\dot\phi + \dfrac{dV}{d\phi} = 0.$
For $V(\phi) = V_{0}e^{-\lambda\phi}$, where $V_{0} = 0.7$, $\lambda = 0.1$ and $V'(\phi) = \dfrac{...
1
vote
0
answers
40
views
Jacobian for 6-noded triangle in 3D to calculate the area
I would like to calculate the surface area of a 6-noded triangle element, i.e., the face of a 10-noded tetrahedral element in 3D space. A typical solution is to calculate the surface integral of the ...
0
votes
0
answers
8
views
Is the following the correct implementation of VGG network?
As exercise I am implementing few fundamental networks.
Specifically right now I am implementing VGG
The code I've got at the moment is the following:
class MyVGG(nn.Module):
...
2
votes
1
answer
98
views
FEM textbooks recommendation
I would really appreciate if you could recommend me some textbooks that explain FEM process well and have many exercises to solidify the knowledge. So far, Brenner and Zienkiewicz seem to be a bit ...
6
votes
2
answers
640
views
What is the advantage of using a particular RK Scheme?
The Wikipedia article on Runge-Kutta Methods lists several examples of each order. My question is, are there any particular advantages using one particular scheme over another of the same order?
I ...
0
votes
0
answers
22
views
maxwell and kelvin models via prony series in abaqus
abaqus documentation only shows generalized models and their formulae. What are the prony series in abaqus for the simplest maxwell and kelvin models?
0
votes
0
answers
47
views
SVD decomposition and the update problem of matrix differential equations
For a matrix $Y(t) \in \mathbb{R}^{m \times n}$, its rank-r approximation could be represented in a factorized SVD-like form.
$$
Y(t) = U(t) S(t) V^T(t),
$$
where $U^{T}U = I_m$, $V^{T}V = I_n$ and $S ...
0
votes
0
answers
21
views
Sampling from a very high dimensional Gaussian with covariance in block form
I'm interested in sampling from a Gaussian with zero-mean and covariance given by:
$$
\Sigma = \begin{bmatrix}
\Sigma_{11} & \Sigma_{12} & \cdots &\Sigma_{1,100}\\
\Sigma_{21} & \...
2
votes
1
answer
86
views
From Runge-Kutta Butcher tableau to general linear methods matrices?
I am trying to understand how the relationship between Butcher tables for Runge-Kutta methods and their generalization to general linear methods matrices (by Butcher also).
Runge-Kutta methods can be ...
1
vote
0
answers
69
views
Have ENO/WENO now completely supplanted older methods?
Is it true that ENO/WENO schemes are the "goat" and they completely supplanted the older methods such as Godunov, approximate Riemann solvers, flux limiters etc? Are these old methods only ...
0
votes
1
answer
62
views
'eigs()' in Matlab gives inaccurate eigenvector when only several eigenvalues are calculated
I would like to report an issue which may be interesting in computational physics. Sometimes, to save time and memory, we use eigs() to calculate the first several ...
3
votes
1
answer
233
views
+100
Why does the FDM give a correct solution to a PDE with a discontinuous initial condition?
I was solving the dimensionless wave equation:
$$ u_{xx} = u_{tt} \tag 1$$
with the initial conditions:
$$ u(x,0) = 0 \tag 2 $$
$$ u_t(x=0,0) = v_0 \tag 2 $$
$$ u_t(x>0,0) = 0 \tag 3 $$
and the ...
1
vote
0
answers
41
views
Efficiently detect overlaying ellipses in distorted images
I'm currently facing the problem of efficiently detecting (special) ellipses in edge images. These images are given (i.e. previous image processing is impossible) and contain quite some noise. I need ...
6
votes
3
answers
1k
views
How large is large for direct solvers?
Let us say I want to solve a large sparse linear system. It is said that iterative solvers should be better than direct solvers in this case. But how large is large? What is the exact threshold beyond ...
1
vote
1
answer
69
views
How does the slack variable work in the problem formulation?
Recently I am reading a paper. In it, after they achieve eq(15), which is
$$ \operatorname{Tr}(\boldsymbol{Q})-\sqrt{2 \ln (1 / \rho)} \sqrt{\|\boldsymbol{Q}\|_F^2+2\|\boldsymbol{r}\|^2}+\ln (\rho) \...
1
vote
0
answers
41
views
How to calculate the force of solid applied by fluid? Using finite difference method, DNS, staggered grid, SIMPLE algorithm, immersive boundary
Problem
I am using finite difference method to solve classic problem of flow around cylinder, for validation of my group's immersive boundary method.
The common way to validate numerical method is ...
2
votes
0
answers
92
views
Calculating Debye functions to high accuracy (hundreds of bits), is it possible to be faster than generic quadrature?
The Debye functions are defined like so: ${D_n\left(x\right)} = {\frac{n}{x^n} \cdot {\int_0^x{\frac{t^n}{e^t - 1}dt}}}$.
I'm trying to evaluate the functions for $n$ from one to four and for $\left\...
0
votes
0
answers
27
views
How to simulate a multi propagation of a laser beam in atmospheric turbulence?
I want to simulate how a Gaussian beam would look like at the receiver plane when propagated through an atmospheric turbulence. For this I am using AO package. Since I didn't see any function for ...
2
votes
2
answers
31
views
How do we implement the balance of stress on interface in ALE FSI method?
""we aim for a consistent variational-monolithic coupling scheme in which we need all equations defined in the same domain; therefore, $\mathrm{ALE}_{f x}$ was introduced. In variational ...
0
votes
1
answer
65
views
How can I determine if a system is equilibrated?
Cross-posted in CrossValidated.SE and MMSE
I am experimenting with a new MCMC protocol and new research.
In the context of Monte Carlo simulation, a "state of equilibrium" refers to a ...
4
votes
1
answer
138
views
Numerically stable computation of $x^T A x$
We have a large sparse symmetric positive-definite matrix $A \in \mathbb R^{N \times N}$ and a vector $x \in \mathbb R^N$. How do I practically compute the inner product $x^T A x$ when the matrix $A$ ...
0
votes
1
answer
53
views
Exact Riemann Solver for Multi-Component 1D Euler Model
I am concerned looking for an exact Riemann solver for compressible 1D multi-component Euler equations, supplied with the ideal gases equation of state and under the assumptions:
Mechanical ...
0
votes
0
answers
68
views
How can I compute the longest relaxation time?
Cross-posted on Stats.SE and on MMSE.
In the case of Monte Carlo simulations:
Autocorrelation Time ($\tau_{\text{int}}$): A measure of how many steps are needed for the correlations in the chain to ...
2
votes
2
answers
165
views
Confusion about matrix differentiation in a nonlinear matrix equation
I am trying to solve a matrix equation in the following discrete form:
$$
\frac{K^{n+1}-K^n}{\Delta t} = [(K^{n+1} (V^{n})^T).^3 - K^{n+1} (V^{n})^T]V^n.
$$
where $K^{n+1} \in \mathbb{R}^{m \times r}, ...
1
vote
1
answer
68
views
Fill-reducing ordering for computing the matrix product $A^T A$?
I have found many libraries for reducing filling when dong Cholesky factorisation on sparse matrices. However, I want to do fill-reduction for a different reason - given a $m\times n$ matrix $A,$ I ...
0
votes
0
answers
47
views
Convex Optimization: Finding maximally different solution
I am using cvxpy to maximize a function f(x) given the constraints -1 <= x <= 1. Let's call the solution x0. Now, I define a region around the optimal value f(x0) and want to find another ...
2
votes
0
answers
75
views
Finite difference scheme to 1D wave equation with Dirac Delta forcing term
I am trying to simulate the following 1-dimensional wave equation with trivial initial conditions and a inhomogeneous Dirac delta function:
$u_{tt} - c^2 u_{xx} = \delta(x - x')\delta(t - t'), \ u(0, ...
2
votes
1
answer
270
views
Why do my satellites fall out of orbit?
I have set up Newtonian Gravity in my Game Engine, allowing me to simulate the gravitational attraction between celestial bodies.
I have the following variables defined:
...
3
votes
0
answers
80
views
finite difference method not working when going to two dimensions
I have two coupled ordinary differential equations in the steady state:
The following code solves, using the Jacobi finite difference method, in 1d using Dirichlet boundary conditions for function $...
0
votes
0
answers
64
views
Solving coupled 2nd-order differential equation
I would appreciate it if you could help me solve the following coupled equation numerically
$$
[-\frac{1}{2} \partial_r^2 + v_0(r) -E]\psi_{\ell} + v_1(r) \psi_{1-\ell}(r) = 0,
$$
where $\ell = 0 , 1$ ...
5
votes
2
answers
123
views
Cheap way to keep parameter matrices orthogonal during optimization?
TLDR; I can keep matrix variables approximately orthogonal by taking a single gradient step in the direction of "effective rank" of matrix at each step of iterative solver, is there a more ...
0
votes
1
answer
65
views
Weird runtime behavior of `scipy.linalg.solve_triangular` and `trtrs`
I want to understand the time complexity of scipy.linalg.solve_triangular, which calls trtrs from LAPACK under the hood, so I ...
0
votes
2
answers
58
views
scipy exp model fitting: prevent coefficients blowup
I'm trying to fit a few X-Y points that look like exponential.
I used the following scipy code:
...
1
vote
0
answers
82
views
How to implement boundary conditions for the Thomas algorithm
For my variable $U(t,x)$, I have implemented the thomas algorithm with $U_j^i$:
$$ a(x)U_{j-1}^{i+1}+ b(x)U_j^{i+1} + c(x)U_{j+1}^{i+1} = d(x)U_j^{i} $$
Then $\textbf{A}$ is a tridiagonal vector with ...
1
vote
1
answer
43
views
Difference of tensors to construct a higher dimensional tensor in pytorch
Suppose I have two tensors $A_{i_1,\ldots,i_M}$ and $B_{j_1,\ldots,j_N}$ where $M \neq N$ in general. We can define a tensor $C_{i_1,\ldots,i_M,j_1,\ldots,j_N}$ by
$$
C_{i_1,\ldots,i_M,j_1,\ldots,j_N} ...
4
votes
1
answer
212
views
Saddle point system
I am solving a system of the form
$$ \begin{pmatrix}
A & b^T \\
b & 0
\end{pmatrix}
\begin{pmatrix}
x \\ \ell
\end{pmatrix}
= \begin{pmatrix}
c\\
0
\end{pmatrix}
$$
Where $A$ is a symmetric ...
0
votes
0
answers
33
views
Mesh movement method causing force oscillations in benchmark 2D FSI problems
I'm relatively new to the FSI world, and I'm dealing with some benchmark FSI problems at first; such as the example of a flap in a channel. (googling fsi benchmark flap 2D leads me to the example ...
1
vote
2
answers
101
views
How to compute overall inertia properties from FE mass matrix?
How should I evaluate the overall mass and moments of inertia (polar and transverse) of a finite elements model, having its mass matrix?
Given that the global mass matrix is composed of symmetric mass ...
0
votes
0
answers
29
views
Problems performing 1D-FDTD for dispersive dielectric uisng lorentz model in Julia
So I am trying to model a dispersive dielectric using the Lorentz model in Julia, more specifically I am trying to obtain the frequency-dependent reflectivity of the material. I am ultimately trying ...
0
votes
0
answers
15
views
Affine point matching in general dimensions [migrated]
Fix a positive integer $d$ and consider the $d$-dimensional Euclidean space $\mathbb{R}^d$. Let $S$ and $T$ finite subsets of $\mathbb{R}^d$ of the same size $n$. Under the assumption that $S$ and $T$ ...
3
votes
2
answers
527
views
why not all conservation laws solved numerically by hyperbolic methods
Heat and Burgers equations for example are both conservation laws
$du/dt+dq/dx=0$, where $q=-u_x$
$du/dt+df/dx=0$, where $f=u^2$
The former is usually solved by common finite differences and finite ...
2
votes
1
answer
90
views
How to properly compute a differential cross section?
I'm currently in the process of computing a differential cross-section for the scattering of a 420 MeV electron by an O-16 nucleus (with a Wood-Saxon charge distribution). The problem is that the ...
3
votes
3
answers
80
views
How to implement the following operation in pytorch (tensor by equating indices)
I wasn't sure if I should post this on stackoverflow rather than here, but because I have to construct a specific tensor I think here is more suitable.
I have 2 tensors, $x \in \mathbb{R}^{M \times N \...
0
votes
0
answers
51
views
Prof A. Stanoyevitch's finite difference based PDE matlab code
Where can one find Prof A. Stanoyevitch's finite difference based PDE matlab code? They have a book on such a topic but can't find the accompanying code.
Is it well received? It's not commonly talked ...
0
votes
0
answers
67
views
Best transform of matrix to make it efficient for shift-then-invert?
I am using ARPACK to find the smallest eigenvalue of a matrix. I use the shift and invert method. That is, looking for the largest eigenvalue of
$$
(A-\sigma I)^{-1}.
$$
However, I do not know $\sigma$...
1
vote
0
answers
47
views
Finding equation of surface from known data
I have the raw data of $X$, $Y$, $Z$, where $X$ and $Y$ are inputs and $Z$ is the output. Plotting the surface gives the red curve:
The surface seems to be a simple function involving trigonometric ...