Skip to main content

All Questions

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

Developing a poisson equation solver for arbitrary input geometry and boundary conditions

I need to develop a Poisson equation solver that can take a input geometry and boundary conditions, produces a FEM mesh, generates the matrices and solve it. Problem is I want a solver that can use ...
Kutsit's user avatar
  • 101
0 votes
0 answers
60 views

Solving linear-stabilty problem numerically

Consider following coupled equations $$\sum_nC_{n,(f)}(\theta, \phi , \psi) \partial_\theta^n f + \sum_nC_{n,(g)}(\theta, \phi, \psi) \partial_\theta^n g = \partial_t f (\theta, \phi) $$ $$\sum_nD_{n,(...
learning_physics's user avatar
1 vote
4 answers
170 views

Solve Large Scale Underdetermined Linear Equation with per Element Equality Constraint

I have the following system on $\boldsymbol{x}$: $$ \boldsymbol{A} \boldsymbol{x} = \boldsymbol{0}, \quad \text{subject to} \; {x}_{i} = {v}_{i} \; \forall i \in \mathcal{V} $$ Where $\boldsymbol{A} \...
Royi's user avatar
  • 573
0 votes
2 answers
90 views

Diagonal and Upper-Triangular pre-conditioning for Jacobi

I am interested in analyzing convergence of the Jacobi method to solve the linear system $Ax=b$, $$\begin{pmatrix} 2 & 4 \\ 1 & 1 \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = \...
Diffusion's user avatar
  • 131
0 votes
0 answers
128 views

Heat Equation for fast source with FiPy

I'm trying to solve the following differential equation with FiPy, basically laser irradiation on a surface $$ \rho_{s}C_{p,s}\frac{\partial T}{\partial t} = k_{s}\frac{\partial^{2}T}{\partial x^{2}} +...
clope99's user avatar
  • 11
2 votes
1 answer
140 views

Efficient Solver for Solving a Large Linear System Sequentially of a Positive Definite Matrix

In my case, I am solving $AX=B$ repeatedly, but the solution usually doesn't change much. So it'd probably be faster than me when I start from the previous solution and iterative, rather than solving ...
Taylor Fang's user avatar
2 votes
1 answer
77 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
3 votes
0 answers
53 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
  • 191
1 vote
1 answer
256 views

Coupled Partial Differential Equations

I'm trying to solve the following system of coupled differential equations, the two-temperature model for $e$ = electrons and $l$ = lattice. $$ \rho_{e}C_{p,e}\frac{\partial T_{e}}{\partial t} = k_{e}\...
clope99's user avatar
  • 11
1 vote
0 answers
50 views

How can I apply a mixed boundary condition to a multi-material heat transfer problem using Crank-Nicolson?

I am working on a mixed material model for a melting material and need to enforce both a Dirichlet and Neumann type condition at the interface. Subject to an external surface heat flux at the top of ...
ZebraEagle's user avatar
0 votes
0 answers
38 views

Thermo Hydraulic Mechanical modeling of energy wall slab in Comsol multiphysics

I am currently working on a complex simulation project involving an energy wall slab, and I need assistance in accurately modeling and validating it using COMSOL Multiphysics. Here are the details of ...
Hizbullah's user avatar
1 vote
0 answers
54 views

Particular linear systems: sparse matrix + column

I am trying to understand a limitation in a routine in the interval arithmetic software Intlab. From matrices starting from a given size (in my particular problems),...
Beni Bogosel's user avatar
  • 1,077
4 votes
1 answer
389 views

Matrix Diagonalization and Computational Requirements

I have some questions about diagonalizing matrices. My interest lies in computing all eigenvalues of a given matrix. To avoid wasting time and improve my research efficiency, I want to understand the ...
yosuga's user avatar
  • 143
0 votes
1 answer
159 views

recommended simple linear solver on gpu

I'm looking for recommendations for a simple GPU linear equation system solver that is a dropin replacement for scipy.linalg.solve. Right now, I'd rather not go the Petsc/TriLinos/Slate route. ...
NNN's user avatar
  • 852
2 votes
0 answers
129 views

Plasma charge conservation for a multi-Euler system - looking for quasi-linear Riemann solver that also resolves slow contact discontinuity

I am solving a multi-species plasma problem by assigning a set of ideal gas Euler equations to each species, e.g. protons and electrons. I.e. I am solving the system $$ \partial_tU_s + \partial_x(F_s) ...
AtmosphericPrisonEscape's user avatar
1 vote
2 answers
121 views

How to handle non bilinear weak form?

I solved the 2D heat equation using the finite element method. It all went well first with the adiabatic case, however problems occured when I introduced cooling with the enviroment. I modeled the ...
Boiler4562's user avatar
7 votes
3 answers
2k 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 ...
timur's user avatar
  • 181
5 votes
2 answers
160 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 ...
Yaroslav Bulatov's user avatar
0 votes
1 answer
94 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 ...
nalzok's user avatar
  • 181
4 votes
1 answer
313 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 ...
Beni Bogosel's user avatar
  • 1,077
0 votes
0 answers
38 views

How conservation of momentum is ensured in (Projected) Gauss-Seidel constrain solver

I'm developing molecular dynamics where my time-step is limited by stiffness of the bonds. I trying to get inspiration from game-engines, where they solve similar problem (hard bond constrains). These ...
Prokop Hapala's user avatar
3 votes
0 answers
151 views

Population of the coefficient matrix of a linear system Ax=b stemming from the finite differences of an arbitrary geometry

I've been looking into solving a linear system $$Ax=b$$ where $A\in\mathbb{R}$ is the sparse coefficient matrix of size $K\times K$, $b\in\mathbb{R}$ is the right-hand side (i.e., the source term) of ...
Akhaim's user avatar
  • 83
0 votes
0 answers
67 views

Solving AU = F using linalg.cg results in 0 iterations

I am working on solving the following PDE: $$\left(\mu_{x}\frac{\partial^{2}u}{\partial x^{2}}+\mu_{y}\frac{\partial^{2}u}{\partial y^{2}}\right)=f(x,y) \tag 1$$ Which is then discretised: $$- \mu_{x} ...
blov's user avatar
  • 43
2 votes
1 answer
65 views

Solving $(I-Q)x={\bf 1}$ for sub-stochastic sparse $Q$ of dimension 5M $\times$ 5M

I have a (right) sub-stochastic CSC sparse matrix $Q$ of dimension 5 million, with 200 million nonzero entries, which is a nonzero percentage of 0.0008%, so it is indeed extremely sparse. It is not ...
Set's user avatar
  • 513
2 votes
1 answer
411 views

Where am I making a mistake in solving the heat equation using the spectral method (Chebyshev's differentiation matrix)?

I would like to numerically solve the following heat equation problem: $$ u_t = \Bigg(2{a \over l}\Bigg)^2 u_{xx} \tag 1$$ $$ x \in [ -1, 1 ] \tag 2$$ $$ u(x, 0) = 0 \tag 3$$ $$ u(1, t) = A \sin \Bigg(...
FriendlyNeighborhoodEngineer's user avatar
3 votes
1 answer
118 views

Solving for $X$ in $\sum_{a,b} b a^T b^T X a = Y$

Suppose I have $k$ pairs of $(a,b)$ where $a$ and $b$ are vectors in $\mathbb{R}^d$, $Y$ is $d\times d$ and I need least squares solution for $X$ in the following $$\sum_{(a,b)}^k b a^T (b^T X a) = Y$...
Yaroslav Bulatov's user avatar
2 votes
0 answers
47 views

How to use a preconditioner estimated from a subset of data?

Suppose I'm solving $Ax=b$ using row-action method like Kaczmarz for $m\times n$ matrix A with $m\approx \infty$ and have $H_k=\frac{1}{k}A_k^T A_k$ which is an estimate of the Hessian obtained from ...
Yaroslav Bulatov's user avatar
0 votes
0 answers
238 views

Right blocked linear equation solver on Dense Algebra and Sparse Algebra

I have implemented 1D mesh parallel QR decomposition and LU decomposition,I would like to ask if a linear equation Ax=b,b is a large matrix and I need to shard b or Shard A,b at the same time. Is ...
Haitao Xiao's user avatar
5 votes
1 answer
107 views

Updating QR decomposition for geometrically similar least squares problem

Let's say we have a weighted least squares problem under the same matrix $A$ such that, $$\hat{x} := \arg \min_x ||A x - b||_{W_1}$$ where $|| \cdot ||_{W_1}$ is the Euclidean norm weighted by ...
Nicholas Mancuso's user avatar
1 vote
0 answers
81 views

preconditioning least square in python?

For a nonsymmetric matrix, we can solve { A^T @ A x = A^T b } by lsqr or cgls or something else. Usually it will be slow, so we need a preconditioner either ilu, multigrid or something else. Is there ...
Alvin's user avatar
  • 11
2 votes
2 answers
491 views

Iteration counts of AMG solver changes in parallel

I am solving the linear elasticity equation within a FEM library with a complex 3D geometry. The resulting linear system is solved with CG, preconditioned by AMG (Algebraic Multigrid). The computed ...
FEGirl's user avatar
  • 435
1 vote
2 answers
255 views

Are there good block sparse matrix solver libraries?

There are some great libraries with linear solvers for sparse matrices - SuiteSparse is the obvious one. The methods work on sparse matrices with scalar entries. However, often in optimization ...
user664303's user avatar
1 vote
1 answer
338 views

Why does scipy Conjugate Gradient solver fail to converge for non-steady heat equation using Crank-Nicolson method

Could someone please explain why my implementation of the Crank-Nicolson method applied to the non-steady heat equation won't converge? There shouldn't be any nonlinear aspects to my implementation ...
n1ck94's user avatar
  • 13
2 votes
0 answers
114 views

Efficient heat diffusion implementation with varying coefficients

I have the following heat diffusion equation: \begin{alignat}{3} \partial_t u(t, \vec{x}) &= g(\vec{x})\Delta u(t,\vec{x}), &\quad& \vec{x} \in\Omega, \, t\in(0,\infty],\\ \partial_n u(t,\...
lightxbulb's user avatar
  • 2,892
11 votes
1 answer
1k views

Is using iterative methods to solve a linear system always superior to inversing the matrix?

I have a silly question. Is it always more computationally efficient to use iterative methods to solve for some matrix $A$, $Ax=b$, where $x$ and $b$ change but $A$ stays constant, compared to ...
Touko Puro's user avatar
5 votes
1 answer
107 views

Prediction of sphere (i.e. roast) core temperature heated in an oven

The real-life problem Assume I put a spherical roast with initially constant temperature of start_temp=25 (°C) into an oven with ...
Dieter Menne's user avatar
1 vote
1 answer
308 views

2D Heat equation solved with finite element method converges in skewed way

I tried to solve the 2D heat equation with the finite element method, using triangles as elements. Currently generated by a Delaunay triangulation. The base function I'm currently using is basically ...
Boiler4562's user avatar
2 votes
1 answer
186 views

Numerically stable way to implement Cramer's rule analog

Problem statement Let $A$ be an $n\times n$ matrix and $b$ an $n$-dimensional vector. For $j\in \{1, \dots, n \}$, let $A_j$ be the matrix where we take $A$ and replace the $j^{\rm th}$ column with $b$...
Joe's user avatar
  • 31
0 votes
1 answer
65 views

Reverse engineering phase shift and numerical damping

I've been trying to validate the physics behind a particle system framework, but I'm having some difficulties. A particle system is a set of lumped masses connected by spring-damper elements. Linear ...
AlexBatch's user avatar
2 votes
1 answer
181 views

Solution of linear system doesn't work, in parallel

I'm solving $Ax = b$ with PETSc, $A$ sparse and asymmetric. I'm using BCGS or FGMRES or TFQMR as a solver, and ILU as a preconditioner. When I use 1 core, everything works as expected. But with 8 ...
Lilla's user avatar
  • 259
0 votes
1 answer
143 views

How to get a normalized gradient with FreeFem++?

I am trying to use FreeFem++ to solve the heat geodesics algorithm. The algorithm is: solve $\dot u = \Delta u$ at a specific time $t$. compute $X = \frac{\nabla u_t}{|\nabla u_t|}$ solve $\Delta\phi ...
Makogan's user avatar
  • 379
1 vote
0 answers
124 views

Schur complement formulation of linear system

Consider a system of the following form: $$(A+K)x=b$$ where $A$ is symmetric, positive definite and block diagonal (in fact, a block diagonal matrix made of stiffness matrices arising from FEM ...
Lilla's user avatar
  • 259
1 vote
1 answer
84 views

Powers of convergent DPR1 matrices in $O(d)$ time?

Suppose $u$,$v$ are vectors and $A$ is a convergent $d\times d$ diagonal + rank-1 matrix. How do I estimate $u^T A^k v$ in $O(d)$ time? Powers of convergent diagonal $D$ can be computed in $O(d)$ time ...
Yaroslav Bulatov's user avatar
1 vote
0 answers
124 views

Which dense matrices are hard to invert?

Suppose I'm solving $Ax=b$ for dense $m\times d$ matrix $A$. For which $A$ is this hard to do? More concretely, is there any work on estimating the error after $k$ steps of iterative solver, $k\le d$, ...
Yaroslav Bulatov's user avatar
1 vote
0 answers
115 views

Accuracy of the Crank-Nicolson method for non-linear, inhomogeneous heat equation

I am currently coding a solution to the following PDE: $\frac{\partial T }{\partial t} =\frac{\partial}{\partial \theta}(A(\theta ,\phi )\frac{\partial T }{\partial \theta}) +\frac{\partial }{\partial ...
mathbruh67's user avatar
2 votes
0 answers
113 views

Conceptual doubt regarding 2D conjugate heat transfer modelling (COMSOL and Mathemtica)

I have been dealing with some conceptual flaws in my understanding of modelling, which I will elaborate herein. I am modelling conjugate heat transfer of a reciprocating fluid, which flows with ...
Avrana's user avatar
  • 41
1 vote
0 answers
52 views

FEM Basis for functions of two variables in $\mathbb{R}^2$ (Applied to Linear Full Stokes Equations)

I'm trying to do FEM for a very basic version of the linear full Stokes equations in two dimensions. Say we are working in the grid $[0,1]\times[0,1]$ in the $xy-$plane. To solve an FEM problem for a ...
k12345's user avatar
  • 111
5 votes
1 answer
444 views

Block-Tridiagonal Matrices with tridiagonal blocks

The Setup Using finite differences to discretize the 2d diffusion equation $$\partial_tu=\partial_x\left(A\partial_xu+B\partial_yu\right)+\partial_y\left(B\partial_xu+C\partial_yu\right)$$ we get a ...
Michael's user avatar
  • 153
0 votes
1 answer
101 views

How to combine multigrid preconditioner with jacobi preconditioner?

I have not found any relevant information in the literature on the following rather simple problem: How to combine (geometric) multigrid preconditioned conjugate gradient (MGPCG) with an additional ...
zx-81's user avatar
  • 101
2 votes
0 answers
36 views

How to exploit QR factorization implicitly

I meet a problem when I try to develop an iterative method for discrete inverse problem $$Ax+e=b$$ where $A\in\mathbb{R}^{m\times n}$ and $e$ is a noise. I want to approximate the true solution $x_{...
Haibolee's user avatar

1
2 3 4 5
10