All Questions

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

How to understand the choice of Krylov subspace orthonormal basis?

This semester, I study the Krylov subspace iterative methods (about Ax=b) using the book H. A. Van der Vorst. Iterative Krylov Methods for Large Linear Systems, volume 13. Cambridge University Press, ...
2
votes
1answer
29 views

Block-matrix: optimal fill-in reduction for LU factorization

Consider a square $N \times N$ block-matrix $\mathbf{A}$, where each $n \times n$ block $\mathbf{A}_{ii}$ is either a dense block or a zero-block. So, $N$ denotes the number of blocks, $n$ denotes the ...
1
vote
1answer
49 views

Numerical stability in the product of many matrices

I have to calculate in numpy the matrix-product of many matrices (~400). Are there common practices to increase numerical stability? If this is relevant, the matrices are $300\times 300$ orthogonal ...
4
votes
0answers
25 views

Complementary quadratic knapsack problem

The quadratic knapsack problem (QKP) $$\max_x x^TPx$$ $$\mathrm{s.t.}\;\;w^Tx\leq c,\; x\in\{0,1\}$$ where $P\geq0, w\geq0$ elementwise, is well studied and has existing solvers. My problem below ...
1
vote
0answers
34 views

Prove that the set of maximizers are independent of parameter in the objective function

A maximization problem reads as $$ J(y) = \sum_{k=1}^{K} \sigma_k(y)^q \mathop{\rightarrow}^{y} max$$ where $q \in [1,\infty]$ is a user-defined parameter and functions $\sigma_k, k=\{1,\dots,K\}$ ...
1
vote
0answers
21 views

Necessary information that a toplogical optimisation solver needs to collecte from a pre-processed CAD model

I am developing a solver that gets a CAD model as entry and does the topological optimisation calculation on it. My solver is inspired by the open source codes presented in literature. Since it is ...
1
vote
1answer
74 views

What's wrong with the **PCG and MINRES** in matlab?

Last week, I have learned the details of the robust iterative methods of PCG, MINRES, GMRES, which will converges to the exact solution $x^*$ of nonsingular system within $N$ steps for $A\in \mathbb{R}...
-1
votes
0answers
25 views

gnuplot splot command analog in Paraview

I would like to plot the points contained in this file with Paraview, but can't seem to figure out how to do so. Each column in this file corresponds to a set of 2048 points on a 64x32 grid. Each ...
0
votes
0answers
26 views

Windows 10 System Repair, possible to rework that software to allow usb to be used instead for computers with no dvd drive? [closed]

Since many computers today do not come with a CD Drive, am wondering if there is a way to rework the recovery software, which allowed for a system image backup using a recovery USB but it only allows ...
1
vote
0answers
26 views

Tight binding model calculation with Extended Huckel Approximation

I've been reading Albright's Orbital Interactions in Chemistry. In the chapter on solids, he provided a general approach to find the band structure of a solid state system Now if we are to model a ...
3
votes
2answers
80 views

Solving for a vector in a linear system that is both left and right multiplied

I have a linear system where I am given 2 matrices, $A$ and $B$, and 2 vectors, $v$ and $c$, and I need to solve for the vector $x$. $A$ is $n\times n$, $B$ is $n \times n \times n$, and the vectors $...
3
votes
0answers
37 views

Methods to approximate obective function gradients from point cloud

Problem statement: Assume that I have an objective function $f(x)$ which takes as input a $D$-dimensional vector $x\in\mathbb{R}^D$, and that $f(x)$ is sufficiently smooth. Assume further that I ...
0
votes
0answers
29 views

Fast algorithm for computing lower mode shapes and natural frequencies in MATLAB using sparse stiffness and mass matrices

I am looking for a fast algorithm for computing eigenvalues and eigenvectors from sparse stiffness and mass matrices in MATLAB. The eig(K, M) doesn't work with ...
0
votes
1answer
27 views

Produce vertex displacements from volumetric shrinkage data on unstructured meshes

I was wondering what would be an efficient way to produce compatible displacements for mesh nodes/vertices if the computed data is volume shrinkage of each element/cell in the unstructured mesh? ...
1
vote
2answers
63 views

When should I write a matrix-vector function to handle the sparse matrix vector multiplication?

This semster, I have been studying the iterative methods for large sparse matrix system. But I have some questions. For large sparse matrix, we must use an economic storage to store them. The most ...
2
votes
1answer
64 views

Does mass balance hold in convective diffusion

I'm trying to understand how convection-diffusion equations are solved in pipe flow modules available in CFD solvers. $$ \frac{\partial C}{\partial t} + \nabla \cdot (\mathbf{v} C) = \nabla \cdot (D \...
4
votes
1answer
94 views

Recommendation for a fixed-step ODE solver?

My problem involves the solution of a second-order ODE with a fixed-step (input and output). Specifically, this ODE is the radial part of Dirac and Schrödinger equation for a spherical symmetric ...
2
votes
1answer
37 views

Does the k-th approximate solution of a stationary iteration belong to the k-th Krylov subspace?

For an stationary iteration method solving $Ax=b$ as follows: $$ Mx_k = Nx_{k-1}+b, $$ I have known that when $M = I$, i.e., the Richardson iteration, the k-th solution $x_k = x_{k-1}+r_{k-1}$ is in ...
1
vote
1answer
30 views

What is the standard, extrapolation, and modified version of Richardson iteration method?

I have been studying the iterative methods recently. For classical iterative methods solving $Ax=b$, I have seen that the most simplest iteration method is the so-called "Richardson iteration". But I ...
2
votes
1answer
52 views

What method to solve a sparse complex symmetric (non-Hermitian) system?

I have a sparse system (about 78% of zero entries) that is complex and symmetric (but not Hermitian). The following figure shows the structure of the problem. The off-diagonal blocks are incidence ...
0
votes
1answer
59 views

Multi-domain 3D Geometries for MATLAB PDE Toolbox

In principle the PDE Toolbox in MATLAB can handle multi-domain 3D geometries as noted here. This feature and the associated function geometryfromMesh were introduced in MATLAB R2018a. The associated ...
0
votes
0answers
24 views

Can't plot correctly precession of perihelion of Mercury in MATLAB using ode45 or ode23

I was trying to plot precession of perihelion of Mercury using matlab. For this I am following a book Computational Physics by Nicholas J. Giordano and Hisao Nakanishi 2nd Edition. In that book ...
2
votes
1answer
23 views

Find index for submatrix with maximum sum

Given an N-dimensional matrix A, I want to find an M<N dimensional index array I such ...
2
votes
1answer
83 views

Why Krylov subspace iterative methods are faster than classical iteration?

This semester, I have been studying the most popular iterative methods, i.e., Krylov subspace iteration methods. For a large sparse system linear $$ Ax=b, $$ where $A$ is nonsingular, I know that ...
-1
votes
2answers
49 views

How to use natural logarithm inside Expression on FENICS

I'm trying to evaluate the exact solution of heat diffusion in circular plate. I'm not able to use the natural logarithm inside expression. ...
0
votes
0answers
20 views

Truncated power series algebra implementation

1) I am looking for references for an efficient implementation and usage of TPSA. What sources exist besides Berz's 1989 original paper and the incomplete chapter in Dragt's book? 2) Are there ...
0
votes
0answers
37 views

What precautions should be taken when using 2D Perfectly Matched Layers?

I'm solving linearized Navier-Stokes equations with Perfectly Matched Layers in two spatial directions $x$ and $y$, but in the time-harmonic frequency $\omega$-domain, which is meant to be less ...
1
vote
2answers
76 views

FVM vs FDM vs Conservative form vs Non conservative form

My question is regarding solving the conservative form and the non-conservative form of the governing-equations (GE), like continuity or the navier stokes equation, using finite difference method (FDM)...
2
votes
1answer
100 views

Modified Equation and Stability for Centred Finite Differences for Wave Equation

I am trying to use the modified equation to derive the stability condition for the finite difference approximation $$ \frac{u(x,t+\Delta t) - 2 u(x, t) + u(x, t -\Delta t)}{\Delta t^2} = c^2 \frac{...
1
vote
0answers
19 views

Using nondimensionalization to solve an ode in MATLAB [duplicate]

I am trying to solve an ode that uses some extremely large numbers and some extremely small numbers, namely $$ e = 1.6\times 10^{-19}\\ E = 10^6\\ \tau = 6\times 10^{-24}\\ m = 9.1\times 10^{-31}\\ c ...
2
votes
0answers
29 views

Solving long time averaged chaotic nonlinear equations

I have a modified chaotic equation of the form: $$\frac{\partial u}{\partial t} = - (u+c)\frac{\partial u}{\partial x} - \frac{\partial^2u}{\partial x^2} - \frac{\partial^4u}{\partial x^4}$$ I am ...
2
votes
0answers
14 views

What is the correct way to calculate deviatoric stress tensor in lattice Boltzmann method?

Due to my previous question, where I asked about flux calculation in lattice Boltzmann (LB) method here, I have more or less same question for deviatoric stress tensor calculation due to pseudo-...
2
votes
1answer
26 views

How to store all solutions of an ODE on Matlab for multiple values of a parameter

I would like to solve an ODE for multiple values of the parameter p and most importantly, save all the solutions for all the different values. Till now, I have ...
6
votes
0answers
114 views

Is a complete bacteria simulation with an exascale supercomputer possible?

Will it be possible to simulate a complete (at least simple) bacteria atom by atom on an exascale supercomputer? or is it possible already today with the largest systems? Here, I've read that ...
2
votes
0answers
48 views

What is the fastest algorithm for computing log determinant?

I am diving into some literature to understand which is the best algorithm for computing the log-determinant of a PSD matrix. So far I have found the following two papers: Large-scale Log-...
1
vote
0answers
26 views

What kind of problem or matrices are suitable for multigrid method?

For Poisson or Convection-diffusion equation as follows: $$ -\Delta u=f,\qquad u|_\Omega = g. $$ or $$ -\Delta u +\vec{w}.\nabla u=f,\qquad u|_\Omega = g. $$ using FDM or FEM discretization, we can ...
-1
votes
0answers
12 views

Norm of mixed constant/cvxpy variable array in cvxpy

I'm trying to incorporate a norm in cvxpy of an array that includes a constant and a cvxpy variable. Looking at something like: ...
2
votes
1answer
60 views

MATLAB's ode45 not dealing with initial conditions well [RESOLVED]

*Concern highlighted in yellow *Solution at bottom I have a differential equation to solve for the motion of an electron: $$ \frac{d^2v}{dt^2} = \frac{1}{\gamma^6}\left( \frac{eE}{\tau m} - \left( \...
-1
votes
1answer
20 views

Plot sinewave on ZX axis [duplicate]

I am trying to plot a sinewave with a bit of 3d perspective along the ZX axis instead of the XY axis. I have so far been unable to get anything that works, and have been unable to locate any examples....
0
votes
1answer
38 views

A lot of identical staff in Comsol material database?

I got a lot of elements in Material Browser of Comsol Multiphysics of Optics section. ...
0
votes
1answer
51 views

Solving differential equation in Python with discretized variable coefficients

I am trying to solve a differential equation with discretized variable coefficients which are calculated from a time serie. In this case the Runge-Kutta step size is fixed by the frequency in the time ...
1
vote
0answers
36 views

Question regarding 1D implementation of the DG method

I'm pretty new to the DG method and have been writing a 1D code to help me understand the coding aspect. With respect a reference, I've been following these notes https://www3.nd.edu/~zxu2/...
1
vote
1answer
64 views

Why do not we choose the error solution norm as an iterative method's criterion?

For solving linear system $$ Ax=b, $$ using iterative mehods, we often use the terminate criterion as follows: $$ \frac{\|r_k\|}{\|r_0\|}=\frac{\|b-Ax_k\|}{\|b-Ax_0\|}<eps. $$where $x_0$ is the ...
1
vote
0answers
45 views

Using MATLAB to simulate the Ising Model

I am using MATLAB to simulate a 1D Ising Chain. I am running into an issue where when trying to find heat capacity, my system has a tremendous amount of noise. I'll post my code and an image of the ...
-4
votes
0answers
26 views

Derive the Finite Difference equation corresponding to the steady state PDE. Explain how to implement Dirichlet and Neumann boundary conditions

A rod of length L = 1m, is made of copper, with thermal conductivity κ = 380W/m/K. A uniform heat supply h = 10kW/m3 is applied to the rod. The left boundary of the rod is kept at constant temperature ...
3
votes
0answers
61 views

Numerical integration with singularity term

In https://www.johndcook.com/blog/2012/02/21/care-and-treatment-of-singularities, the author explains the subtraction method to get rid of singularities when performing numerical integration. The ...
3
votes
1answer
131 views

Consumer hardware for scientific computing?

I'm interested in problems around probability, statistics, and statistical mechanics, and often I find it useful to perform simulations to get some sense of the underlying phenomena. Example ...
0
votes
0answers
34 views

Why does the initial guess for linear system usually choose by zero vector?

For solving linear system $$ Ax=b, $$ using iterative mehods, we often use the terminate criterion as follows: $$ \frac{\|r_k\|}{\|r_0\|}=\frac{\|b-Ax_k\|}{\|b-Ax_0\|}<eps. $$where $x_0$ is the ...
2
votes
3answers
104 views

Is there any other sparse matrix data in matlab built-in file?

I want to do some numerical examples solving large sparse linear system Ax=b. And I want to use some data from Maltab itself because this experiments are easily ...
4
votes
1answer
65 views

Is operation count a reliable predictor of performance when comparing two formulations?

I have two formulations to solve a problem (both give dense, complex and symmetric system). They are solved multiple times in a loop. I am trying to predict which is better to use. The first one ...

15 30 50 per page