All Questions

0 votes
0 answers
7 views

Projecting the initial state on a Discontinuous Galerkin basis

Context I want to solve a 1D Burgers equation with a discontinuous Galerkin approach on the space-time domain $(x,t)\in [0,1]^2$. I want to project the function $u(x) = e^{-\frac{(x-0.5)^2}{0.02}}$ ...
L Maxime's user avatar
4 votes
2 answers
377 views

Solving a generalised eigenvalue problem with non-square matrices

I need to solve a generalised eigenvalue problem of the form $$A\mathbf{x}=\lambda B \mathbf{x}$$ where $A$ and $B$ are $m \times n$ complex matrices, that are not symmetric with $m>n$. I am aware ...
PH_1729's user avatar
  • 41
2 votes
1 answer
523 views

Overflows and underflows in Python

I’m writing some Python code using NumPy. Since I got an overflow warning, I decided to check for underflows as well at all places in the code, using ...
NNN's user avatar
  • 782
0 votes
0 answers
17 views

Why does Energy -> temperature conversion failed to converge in my OpenFOAM simulation [closed]

How can I resolve this issue? I want some help in resolving it. Thanks.
IsraelOsagbe's user avatar
0 votes
1 answer
56 views

How to properly use ARPACK's dsaupd and dseupd?

In Rust, I am trying to solve an eigendecomposition problem through ARPACK. I made the following subroutine for this purpose: ...
Makogan's user avatar
  • 273
0 votes
0 answers
21 views

formula for the elliptical orbit of the magnetic field in a current carrying circular loop [closed]

In a circular current carrying loop the magnetic field lines form elliptical orbits if I have constant value for current and a point let's say at r distance from the center of th current carrying loop ...
user49758's user avatar
0 votes
0 answers
79 views

Guidelines for finding a preconditioner for a matrix that is "near" singular

Given a large non-symmetric non-sparse matrix $A=(a_{m,n})$ with the property that the columns of $A$ are "close", making the matrix very ill-conditioned and near singular. For example, ...
mathuser's user avatar
-1 votes
1 answer
67 views

optimal gradient algorithm to determine best $α_k$

Let's consider an optimal-step gradient algorithm and assume that: $g(α) := f(X_k - α∇f(X_k)) = 2α^2-4α+17$, how can we determine the optimal $α_k$? Here is my simple solution: $g(α) = 2α^2-4α+17$ $g'(...
V_head's user avatar
  • 15
0 votes
1 answer
43 views

step-fixed algorithm first iterates

let us have the fixed-step gradient algorithm, with $p = 2$ and we assume that for $X = (x, y)$, $∇ f(X) = \begin{pmatrix} x -1\\ y -2 \end{pmatrix}$ Let me assume we intialize with $X_0 = (0,0)$ what ...
V_head's user avatar
  • 15
0 votes
1 answer
65 views

step-fixed algorithm to minimize f, which step to ensure convergence?

If we want to apply the fixed-step gradient algorithm to the minimization of $f(x) = \frac{1}{2}(Ax, x)$ where $A$ is a symmetric 2x2 matrix with eigenvalues $\lambda_1 > \lambda_2 > 0$, for ...
V_head's user avatar
  • 15
1 vote
1 answer
57 views

What are some good medium matrices with known eigenvectors?

I am trying to test if an eigendecomposition I have is working properly. For this I would like some matrices that are 10x10 (ish) with trivial (or known) eigenvectors and eigenvalues so that I can ...
Makogan's user avatar
  • 273
0 votes
0 answers
40 views

conjugate method for minimization of quadratic equations of dim n, upper bound for iterations is n?

Is it true that in the worst case, the conjugate gradient algorithm needs 20 or 21 iterations to converge for the minimization of a quadratic equation of dimension 20? Let's suppose it won't find the ...
V_head's user avatar
  • 15
0 votes
0 answers
42 views

What techniques are there to take averages and errors in a Monte Carlo simulation in C? Can my code be improved?

I'm trying to perform a Monte Carlo simulation in C and these are the steps I'm following: We assume an infinite reservoir compound of CO and NO molecules with partial pressures 𝑦CO and 𝑦NO(= 1 − 𝑦...
Auyk's user avatar
  • 1
0 votes
0 answers
33 views

Problems with High-Performance Computing and Stack Exchange Data Explorer. Any Advice? [closed]

I'm currently experiencing some challenges with my high-performance computing setup and a Stack Exchange product. As someone relatively new to managing both hardware and software in this capacity, I ...
Judy Watson's user avatar
2 votes
1 answer
66 views

When does linear system have linearly growing singular values?

Suppose $W$ is a large matrix where $i$th smallest singular value grows as $O(i)$. What kind of matrix can $W$ be? For instance, this appears to hold for random matrix with IID entries and for lower-...
Yaroslav Bulatov's user avatar
0 votes
0 answers
44 views

Solve beam equation with elastic term using scipy solve_bvp

I want to solve the beam equation with distributed load and elatic term (which depends on how much the beam interact with the terrain) : $$ EI\frac{d^4w}{dx^4}+k*(w(x)-t(x))=q(x) $$ where $q(x)$ is a ...
GMV871's user avatar
  • 35
1 vote
0 answers
35 views

Understanding this code to truncate the SVD

In Brunton's and Kutz's data-driven science and engineering book, page $19$, is a description of one way to truncate the SVD of a given matrix I want to understand what the code for the variable <...
KZ-Spectra's user avatar
2 votes
2 answers
164 views

(Isoparametric) Mapping of physical coordinates to their equivalent parametric coordinates on a reference element

I have some experiece with finite element methods (FEM), in general. However, I mainly worked with Cartesian grids -- i.e. using orthogonal (non-curved) elements. Recently, I became interested in a ...
debronee101's user avatar
0 votes
0 answers
46 views

1D FDTD simulation of plane wave propagation and the Courant stability condition

I'm currently trying to simulate a simple case of wave propagation in free space before adding in more complexities, and already I'm stumped. I understand the Courant stability condition. However, I ...
Jerry Y's user avatar
2 votes
1 answer
52 views

Good references for the P3/P1dc element

I am struggling to find some good references for the P3/P1dc element (cubic element for velocity and linear piecewise discontinuous for pressure) for the Stokes/Navier-Stokes equations. Is there a ...
Chenna K's user avatar
  • 964
0 votes
2 answers
80 views

Source for scalability challenge for number of finite element nodes per process

Context In distributed simulation of a finite element mesh with $N$ nodes and $P$ processes, a professor stated to me that "achieving good scaling for more than 25,000 finite element nodes per ...
Jared Frazier's user avatar
0 votes
0 answers
33 views

Fastest way to calculate the eigenvector with the largest eigenvalue for a 3*3 positive-definite matrix [duplicate]

As stated in the title: I have a 3 by 3 positive-definite matrix $M$. What I need is the eigenvector corresponding to the largest eigenvalue, since I am calculating the solution to maximize the value ...
Enigmatisms's user avatar
0 votes
1 answer
38 views

Estimating the rate of convergence of Projected Gradient Descent on constrained polynomial objectives

I am estimating the order of convergence of Projected Gradient Descent (GD) on quadratic polynomials with random coefficients independently drawn from Uniform(-1,1) and bounded by a unit hypercube. I'...
ufghd34's user avatar
  • 23
3 votes
0 answers
47 views

Datasets for inverse heat transfer problems

I was wondering if there is an available, real-life known inverse heat transfer problem dataset to benchmark oneselfs algorithm, as in MNIST for deep learning. Talking about... (well in this case I ...
Aner's user avatar
  • 181
1 vote
1 answer
50 views

Solving TOV equations that describes neutron stars in modified f(R, T) gravity

Sorry for the long post, tldr at bottom. I'm trying to use standard RK4 code in C/C++ to solve a coupled system of 2 modified TOV equations in f(R,T) gravity and reproduce some of the results of this ...
hidenori's user avatar
3 votes
2 answers
156 views

Finding ALL Eingenvalues of a Sparse Integer Matrix

I would like to find ALL Eingenvalues of a huge, very sparse integer matrix. This matrix has a lot of known properties, e.g. that it is symmetric and nearly tridiagonal, with very few (max. ca. 4 per ...
BernhardWebstudio's user avatar
0 votes
0 answers
59 views

How to correctly discretize volume elements in different geometries?

I am solving a reaction-diffusion problem in one dimension for a catalyst particle to get the internal effectiveness factor ($\eta$),as given below: $$ \eta = \frac{\int_0^{V_p}{R_i\ dV}}{R_i^{surf}\...
HWIK's user avatar
  • 23
0 votes
0 answers
43 views

Rule-Based Link Prediction for Social Network [migrated]

Relevance to Site I believe this question is suitable for the Computational Sciences Stack Exchange site as it pertains to the implementation of a graph algorithm. According to this widely accepted ...
Jay Gupta's user avatar
5 votes
1 answer
344 views

Time integration of first-order ODE with higher-order information

Suppose I wish to derive a numerical integrator for the first-order ODE $$x'(t)=F(x(t)).$$ By differentiating both sides of the expression in $t$, I can write a second-order relation also satisfied ...
Justin Solomon's user avatar
9 votes
0 answers
168 views

What's the most computationally efficient implementation of Kalman Filter

I know there are many formulations of the Kalman Filter. A few I can name are: Classical Covariance Form Informational Filter Form Square-Root Form or Factor Form But somehow it's hard for me to ...
CuriousMind's user avatar

15 30 50 per page
1
2 3 4 5
384