Most Popular

1500 questions
9
votes
1 answer

Suggestions for numerical integral over Pólya Distribution

This problem arises from a Bayesian statistical modeling project. In order to compute with my model, I need to perform an integration in which part of the integrand is the "Pólya" or "Dirichlet-Multinomial" Distribution, $$p(n\mid \alpha) =…
yep
  • 191
  • 2
9
votes
2 answers

How to model a fishing rod (or a rope)?

I wish to model a fishing rod (or a rope) by joining short segments. (The segments may have equal (short) length but each segment should be assigned its own individual mass.) One segment will influence the next by the torque between the segments.…
cvr
  • 261
  • 1
  • 7
9
votes
2 answers

Help deciding between cubic and quadratic interpolation in line search

I'm performing a line search as part of a quasi-Newton BFGS algorithm. In one step of the line search I use a cubic interpolation to move closer to the local minimizer. Let $f : R \rightarrow R, f \in C^1$ be the function of interest. I want to find…
Emily L.
  • 193
  • 1
  • 6
9
votes
2 answers

Representing Eisenstein numbers without floats

I have a project where I need to use quadratic fields Specifically numbers of the form $a + b \sqrt{-3}$ with $a,b \in \mathbb{Q}$. For example here are the prime numbers in Eisenstein integers: I do not want to use sage. I would like to write…
john mangual
  • 947
  • 3
  • 9
  • 19
9
votes
2 answers

Applying matrix square root inverse in matrix-free regime

Let $A$ be a large symmetric positive definite matrix, and suppose that we can efficiently apply $A$ and have a fast solver to apply $A^{-1}$, but we do not have access to the matrix entries for either $A$ or $A^{-1}$. How can one use this to solve…
Nick Alger
  • 3,143
  • 15
  • 25
9
votes
0 answers

Wanted: sequences of linear systems for recycling Krylov solver analysis

In the solution of sequences of linear systems $$A_ix_i=b_i\quad\text{for}\quad i=1,2,\dots$$ with Krylov subspace methods, data can be recycled from already solved linear systems in order to speed up the computation of subsequent linear systems…
andrenarchy
  • 231
  • 1
  • 2
9
votes
10 answers

Is it possible to optimise this integration code so that it runs faster?

double trap(double func(double), double b, double a, double N) { double j; double s; double h = (b-a)/(N-1.0); //Width of trapezia double func1 = func(a); double func2; for (s=0,j=a;j
user2970116
  • 93
  • 1
  • 3
9
votes
5 answers

Is discontinuous Galerkin really any more parallelizable than continuous Galerkin?

I've always heard that easy parallelization was one of the advantages of DG methods, but I don't really see why any of those reasons don't also apply to continuous Galerkin.
Truman Ellis
  • 542
  • 4
  • 10
9
votes
3 answers

Finite Element Method vs Extended Finite Element Method (FEM vs XFEM)

What are main differences between FEM and XFEM? When should we (not) use XFEM intead of FEM and vice versa? In other words, when I meet a new problem, how I can know to use which one of them?
Anh-Thi DINH
  • 801
  • 2
  • 8
  • 14
9
votes
1 answer

Implementation of Jacobi-Davidson method for cubic eigenvalue problem

I have a large cubic eigenvalue problem: $$\left(\mathbf{A}_0 + \lambda\mathbf{A}_1 + \lambda^2\mathbf{A}_2 + \lambda^3\mathbf{A}_3\right)\mathbf{x} = 0.$$ I could solve this by converting to a linear eigenvalue problem but it would result in a…
OSE
  • 397
  • 2
  • 10
9
votes
2 answers

How do I compute the parallel overhead of a parallel code run on a single processor when no sequential code is available?

I'm profiling the performance of PETSc's linear solvers. As I understand it, $$\text{speedup}=\frac{\text{Sequential Time}}{\text{Parallel Time}}.$$ I know that running the parallel code on one processor can be used as a proxy for the…
Paul
  • 12,045
  • 7
  • 56
  • 129
9
votes
2 answers

Coupling FEM DG methods to Riemann solvers

Are there any good papers and or codes that couple discontinuous galerkin finite element solvers with Riemann solvers? I need to explore coupling elliptic and hyperbolic problems but most splitting methods are ad hoc at best. Since I have a large…
aterrel
  • 3,644
  • 24
  • 26
9
votes
0 answers

Updating matrix diagonal with Woodbury matrix identity and maintaining numerical accuracy

I have a dense matrix A and its corresponding inverse $A^{-1}$. The Woodbury matrix identity states: $$ (A + UCV)^{-1} = A^{-1} - A^{-1}U(C^{-1} + VA^{-1}U)^{-1}VA^{-1} $$ I wish to perform small updates to the diagonal of $A$ and compute…
Costis
  • 1,330
  • 11
  • 18
9
votes
1 answer

Solving system of linear equations with cyclic tridiagonal matrix

I have this problem in my textbook: Suggest efficient algorithm for solving system of linear equations with cyclic three-diagonal matrix, that is of the form: \begin{bmatrix}…
xan
  • 315
  • 1
  • 4
9
votes
1 answer

How to use Lanczos method to compute eigenvalues and eigenvectors

I have a sparse and symmetric matrix A(n x n). The method Lanczos tranforms matrix A into tridiagonal and symmetric matrix T and the Lanczos vectors in matrix V. From there how do I compute k smallest or largest eigenvalues and corresponding…
HongTu
  • 131
  • 2
  • 5