All Questions

Filter by
Sorted by
Tagged with
-1
votes
0answers
33 views

Matrix Calculation Different between Python and Matlab

I am transferring a finite element code from Matlab to Python. A problem occurs at the last step when I try to solve the displacement $U = F/K$. I have checked that the calculated $F$ and $K$ are same ...
0
votes
3answers
69 views

How to determine global stiffness matrix is constrained or not

Background In solid fem, we often solve $$\mathbf{Ku}=\mathbf{p}$$ where $\mathbf{K}$ is global stiffness matrix, $\mathbf{u}$ is displacement, $\mathbf{p}$ is global load vector. If displacement not ...
0
votes
1answer
75 views

How to use 8-cores CPU as a single-core more (8x) powerful CPU?

I use python for my algorithm which uses only one core and I need more processing speed. I have i7 6700K CPU with 8 cores. How to convert them to one core to have a total performance of 8 cores? ...
3
votes
1answer
46 views

4th order tensor rotation - sources to refer

I am trying to model a linear elastic material in Abaqus using UMAT. For my application, I need to rotate the 6x6 compliance matrix for a given set of eigenvectors (or a rotation matrix). I came ...
1
vote
0answers
29 views

Discretization formula for a system of two differential equations. “Solution to one of these is the initial condition of the other”. In which sense?

Consider the following stochastic differential equation \begin{equation} dy=\left(A-\left(A+B\right)y\right)dt+C\sqrt{y\left(1-y\right)}dW\tag{1} \end{equation} where $A$, $B$ and $C$ are parameters ...
3
votes
1answer
64 views

How avoid square shape with Laplacian operator in reaction diffusion calculations?

I have used different variants of the Laplacian operator (div grad) using 4, 8, 12, 20 and 24 of the closest points. I get problems due to the chosen coordinate system and the discretization of the ...
2
votes
0answers
31 views

Convergence of Truncated Newton for non-convex Hessian

I was wondering if anyone could enlighten me about the convergence properties of the truncated newton method in case of a non-positive definite hessian $\nabla^2 f = H$. From the Book 'Numerical ...
0
votes
1answer
34 views

traction boundary conditions in elasticity

I have a question about implementing traction boundary conditions in 2D and 3D linear elasticity. Consider the picture above. I want to apply traction boundary conditions on the boundary in red. My ...
-1
votes
0answers
43 views

python plot exhibiting delta function behaviour but it was not supposed to do it

I'm currently trying to plot the photoionization cross-section in a semiconductor. The photoionization process is an optical transition of an electron in the ground state to higher subbands in a ...
1
vote
1answer
63 views

How is the final result calculated in RK-Dopri(4,5)?

I have found a toy implementation of RK-Dopri(4,5), written in Python. I am concerned however, about line 118: y = y + h * (b1*K1+b3*K3+b4*K4+b5*K5+b6*K6) Has the ...
3
votes
2answers
90 views

Optimization of expensive model with many parameters

I have a physical model which takes $\sim50$ parameters and gives $\sim2000$ outputs taking tens of minutes to run. I need to optimize these parameters to give outputs as close as possible to data. ...
0
votes
1answer
31 views

Why is Time evolving block decimation so efficient?

I have a short question about Time evolving block decimation (TEBD). During a lecture I was told that this method is very efficient in evolving 1D quantum spin systems with only nearest neighbor ...
3
votes
1answer
70 views

Pros of Fourier-Galerkin spectral methods

What are the pros of Fourier-Galerkin spectral methods while solving PDEs? Here's the one that came in my mind first: Easy implementation: using this method, differentiation operator computation is ...
2
votes
0answers
69 views

Numerical linear algebra paper - Confusion about $LDL^T$ factorization for preconditioning

I came across this paper by Simoncini and Popolizio that deals with acceleration techniques in the context of rational Chebychev approximation for the exponential. The problem is to solve efficiently ...
2
votes
3answers
130 views

Flux sign and face normal confusion in finite volume method

I implemented a solver for the 2D steady-state heat equation (without heat generation and homogeneous material) $\nabla. (k\nabla T) = 0$, using finite volume method, however, I am having some ...
1
vote
1answer
59 views

Reading VTK file into C++ for analysis

I apologize in advance if this post is at all ignorant or elementary, I am a pure mathematician who is newly getting into the world of scientific computing. For my research, my advisor would like me ...
2
votes
1answer
44 views

Project to nearest point on convex polyhedron

I have a point $y \in \mathbb{R}^d$ and a convex polyhedron $\mathcal{P}$ given as the intersection of half-spaces: $$\mathcal{P} = \{x \in \mathbb{R}^d \mid a_1 \cdot x \le b_1, \dots, a_n \cdot x \...
0
votes
1answer
37 views

Maximum lossless compression ratio for floating point time series

I want to compress an array of time series floating point data as much as possible. Currently the only algorithm I've found for this is XOR compression which works well, but doesn't compress the data ...
4
votes
1answer
78 views

What is a dense ODE system? What is a sparse ODE system?

Can you provide a jargon-free (as much as possible) explanation of what is meant by "dense ODE systems", and "sparse ODE systems"? Some hints I have gotten from Googling: dense ...
0
votes
0answers
53 views

Preconditioning the $[1 \quad-2 \quad 1]$ Finite Difference matrix

Let $A$ be the well known tridiagonal matrix coming from the 1D Finite difference discretization of the Laplacian, with stencil $\frac{[1 \quad-2 \quad 1]}{h^2}$. The system $Ax = b$ is very large, so ...
2
votes
1answer
71 views

Pressure interpolation in the Q2-P1 element

The Q2-P1 element is one of the popular finite elements for incompressible flow problems in the mathematics community. For this element, the velocity field is approximated using bi-quadratic shape ...
0
votes
1answer
43 views

Calculating residue of a rational function

I have a function $$ f(z) = \frac{1}{(z-z_1)(z-z_2)(z-z_3)(z-z_4)} $$ All of $\{z_1,z_2,z_3,z_4\}$ are simple poles. The residues for this function are given as $$ \text{Res}(f(z),z_i)= \lim\limits_{z\...
0
votes
1answer
38 views

How to calculate error in successive over relaxation for PDE?

I am trying to solve the Poisson equation numerically using the FDM method in C++. But I have a little confusion with the iterative process. I understand that the number of iterations should go until ...
0
votes
1answer
55 views

coarsening coefficient matrixes (A2h, A4h…) for geometric multigrid method in 2-D/3-D

I am learning about multigrid methods from the textbook section 6.3 Multigrid Methods, which shows a geometric multigrid algorithm for 1-D examples in detail, including how to build restriction/...
1
vote
1answer
90 views

Calculating the Strange Attractor of the Duffing Oscillator in C++

I am simultaneously trying to learn computational physics methods, chaos, and C++. I think this is the right site for the question, and I apologise if not. I started working through Thijssen's ...
2
votes
3answers
158 views

Numerical solution of high-dimensional integral involving positive-part function

Consider a potentially high-dimensional (say, $N$ up to 20) integral of the form $$ \int_0^\infty \rho_1(x_1)\rho_2(x_2) \cdots \rho_N(x_N) \bigg(x_1+x_2+\cdots+x_N -K\bigg)^+ \, dx_1 \cdots dx_N. $$ ...
0
votes
2answers
169 views

Different questions about “Inverse Physics problems”

I am in a context of forecasts in astrophysics. Don't be too rude if questions seem to you stupid or naive but rather indulgent, I am just looking for better undertsand all these numerical methods of ...
0
votes
0answers
43 views

How match memory to CPU with NUMA?

I have a multiple CPU system weakly connected and memory access is slow when one CPU accesses the others memory. The CPUs uses NUMA. How can I make TensorFlow adjust to this or does it per default?
1
vote
1answer
53 views

Which are the right configurations in the Markov chain of a Hamiltonian Monte Carlo algorithm?

I have a question about the Markov Chain Hamiltonian Monte Carlo (MCHMC). Hamiltonian Monte Carlo is known as Hybrid Monte Carlo too. I'll describe the steps of the algorithm. We have at the ...
-1
votes
0answers
28 views

How to generate a symmetric matrix that will produce a pos-def matrix after application of a pos-def kernel function?

Note in advance that I'm not trying to sample symmetric, positive-definite matrices - that, at least, I know how to do. What I'd like to sample, is symmetric matrices (ideally with diagonal 0, ...
0
votes
0answers
36 views

Running VTK simulation on Visit

I apologize if any of these questions are elementary, I have just begun research involving scientific computing and am still getting ahold of the basics. My research advisor has given me a few ...
3
votes
0answers
46 views

Choosing good modelling method for solving Boltzmann equation

I'm writing a solver for Boltzmann Equations (BE) including a force term in rarefied plasma, for my PhD. The aim is to see if an instability occurs inside an electric streamer (theoretically it should,...
1
vote
0answers
69 views

RK4-method starts oscillating above certain input parameters

I am trying to solve an equation of the following type $$\partial_zE(z)=-c_0J$$ with $$J=c_1\beta E^3(z)$$ using the boost::odeint-framework and a fixed time stepper, with $c_0$, $c_1$ and $\beta$ ...
0
votes
2answers
61 views

Uniaxial stretching solution not uniform in FEM code

I am trapped here for a long time. I wrote a toy Matlab FEM code. I want to run the follow simulation. Mesh Suppose we have a cube, and we divide it into subcube along $x,y,z$ axis, then each subcube ...
0
votes
0answers
58 views

Can we apply time-parallel methods in case of peridynamics?

Can we solve peridynamics in parallel for time-dimension using methods like MGRIT? This method can be applied for time dependent PDEs, however, since peridynamics is a non-local approach, can this ...
0
votes
0answers
11 views

Using spline or piece wise function as input (intermediate) in Gekko

Simple paraphrase of my question is what is the best way to use a table or curve as an input for an optimization problem in Gekko (and/or AP Monitor)? For example, I have simplified atmospheric ...
0
votes
0answers
20 views

Hawkes Process : recursive formula for : $R'_{m,n} (k) = \sum_{ \{i : t_i^n < t_k^m \} } (t_k^m - t_i^n) \exp ( - \beta_{m,n} ( t_k^m - t_i^n ) ) $

Following the advice of a fellow mathematician, I am asking my question here from (https://mathoverflow.net/questions/365554/hawkes-process-recursive-formula-for-r-m-n-k-sum-i-t-in-t) I need to use a ...
0
votes
1answer
60 views

interface value on the error equation

https://www.jstor.org/stable/pdf/2157482.pdf, here I have a problem in last equation of (2.6) in section (2.1). When they are considering error equation on the interface $\Gamma$ they get $e_v^{(n)} = ...
0
votes
1answer
82 views

Which scheme for inhomogeneous convection-diffusion equation with highly variable coefficients?

I have a 1D convection-diffusion equation $\sigma_t = a(x,t) \sigma_{xx}+b(x,t)\sigma_x+f(x,t)$ defined on the unit interval, with nonzero Neumann boundary conditions at both ends. It should be noted ...
0
votes
0answers
18 views

Benchmark instances for directed 3-Cycle cover

The directed 3-Cycle cover asks for a vertex-covering set of oriented cycles with at least three vertices per cycle such that every vertex is covered by exactly one cycle. I have scrutinzed the ...
1
vote
2answers
114 views

How to begin writing scientific codes in C++ in Trilinos or PETSC style?

My background: I have taken some courses on numerical analysis during my PhD and read a few books on the topic as well. I mostly work on low Reynolds number fluid mechanics and use boundary element ...
9
votes
1answer
1k views

How to document math formulations in scientific computing codes?

I am writing the code relate to math. There is some complicated math formulation in the project. Directly writing the calculation code leads to hard understanding; thus I want to comment on the ...
0
votes
1answer
28 views

Getting streamline for a lid driven cavity flow in openFoam/ParaView

I have installed openFoam on Debian GNU/Linux and learning from official user guide. I have a problem with generating streamlines. I am trying to generate streamlines as explained in the post ...
1
vote
0answers
66 views

Computation of a functional for large values

Consider the following function : $$f(x) = \sin^2(\frac{π\Gamma(x)}{2x})$$ Now consider the following functional : $$I(x)=\int_0^\infty \frac{f(x + iy) − f(x − iy)}{e^{2πy}-1} dy$$ I need values for ...
0
votes
0answers
41 views

Adaptive quadrature methods for Fourier Optics

In Fourier Optics one often needs to compute approximations to bivariate integrals like $$ \int_{-\frac{l}{2}}^{\frac{l}{2}}\int_{-\frac{l}{2}}^{\frac{l}{2}} {\rm e}^{i\phi(\xi,\eta)}\mathrm{exp}\left[...
2
votes
1answer
87 views

Calculate stable time step DG method for advection-diffusion

For stable time steps for the RKDG method for transport equations we require that $$ \Delta t \le \frac{\Delta x CFL}{(2k + 1)|\lambda|}, $$ where $\lambda$ is the eigenvalue of our conservation law ...
0
votes
1answer
90 views

Solving large sparse system

I am working on a problem with very large sparse matrices. I'd like to compute $A^{-1} B$, that is a crucial part of converting DAE to ODE (and there is no workaround). Here size of $A$ is 2E+5 x 2E+5 ...
0
votes
1answer
119 views

How GMRES method finds smallest singular value and the corresponding singular vectors of a matrix?

https://stackoverflow.com Krylov solvers for iterative computation of the smallest singular value and the corrensponding singular vectors of a matrix Edit: This is a follow-up question to How to ...
0
votes
0answers
11 views

Sufficient conditions to ensure divergence of a sequence in Maxima

I am using Maxima to check whether a given sequence is diverging to $+\infty$. I know that this problem is undecidable and we note that Maxima is throwing an error: ...
2
votes
1answer
80 views

Efficient projection of a vector onto matrix kernel

Given an $m \times n$ matrix $A$ and a vector $x\in\mathbb R^n$, with $m<n$, what's an efficient way of computing the projection of $x$ onto the kernel of $A$?

15 30 50 per page