All Questions

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

Determining the indices of a VTK mesh

I am trying to assign fixed constraint at specific indices of VTK mesh, however, I only can view STL file in a blender as follows: Upon assigning the favored indices in my scene at the SOFA physics ...
3
votes
1answer
57 views

Efficient computation of leading eigenvector of a matrix product of the form $ADA^T$, where $D$ is diagonal

Let $A=[A_1|\ldots|A_m] \in \mathbb R^{n \times m}$ with $n \gg m \gg 1$ and $D=\text{diag}(d_1,\ldots,d_m)$ where $d_1,\ldots,d_m > 0$, and consider the $n\times n$ positive-definite matrix $X=\...
0
votes
0answers
19 views

Robin Boundary Condition with Implicit Upwind - Finite Difference Method for 2D Convection-Diffusion Equation

I am trying to solve a problem with 2D Convection-Diffusion equation with U = Concentration ($mg/m^{2}$) using Implicit Upwind Finite Difference Method like this $$ \frac{\partial U}{\partial t} + ...
0
votes
0answers
11 views

Run different architecture on a PC with coprocessors

Before I start, I'm sorry if this is offtopic here, but I couldn't find a more suitable site where to post this question. Inrecently saw a video of an old machintosh computer running msdos software, ...
0
votes
0answers
6 views

I have a trouble determining appropriate transition matrix

M.Sc students of the Department of statistics, FUTA are expected to do course work for a year and write their thesis the following year before graduating. A student has a probability of 0.25 of ...
1
vote
3answers
62 views

What is the flaw in my stability analysis?

The ODE $${d^2x\over dt^2}=-kx; k>0$$can be converted in the system of linear equations as $$\begin{align} {dx\over dt} & =v\\ {dv\over dt} &= -kx\\ \end{align}$$ Using Euler’s method, ...
1
vote
1answer
69 views

Problem about rotation matrix of elastic matrix

I have a transformation matrix $K$ which transfers elastic constitutive matrix $C$ between two coordinate systems. According to textbooks such as T.C.T. Ting's "Anisotropic Elasticity", the elastic ...
3
votes
1answer
50 views

Analytic formula for leading eigenvector of $uu^T + vv^T$?

Let $u$ and $v$ be nonzero column vectors of size $n$ and consider the $n \times n$ positive-definite matrix $A:=uu^T + vv^T$. In this post https://math.stackexchange.com/a/112201/168758, the ...
2
votes
0answers
12 views

Is there an open-source material database management GUI?

Does somebody know an open-source GUI for the management of a small material database? I have a spreadsheet with some materials in it. Each materials has some temperature-dependent properties like ...
8
votes
2answers
5k views

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 ...
-2
votes
0answers
50 views

2D Heat equation - MatLab implementation (FD in space, Expl. Euler in time)

I'm trying to solve the heat equation in 2D in $\Omega=[0,1] \times [0,1]$, with homogeneous Dirichlet boundary conditions, and initial condition $u(x,y,0)=\sin(2 \pi x y)$ i.e. \begin{cases} u_t=u_{...
0
votes
2answers
6k views

How to prove the 2-norm of an invertible matrix is exactly the reciprocal of its minimum singular value?

If a matrix $A_{n\times n}$ is invertible, then $\left\|A^{-1}\right\|_2 = \dfrac{1}{\min\limits_{i} \sigma_i}$ where $\sigma_i$ is the $i$-th singular value of $A$
1
vote
0answers
13 views

Get interpolated values in user defined 2D grid Paraview

I have a 2D flow and would like to obtain the value of certain scalar field in a set of points forming a regular mesh. These points should not coincide with the nodes of the actual mesh used in the ...
3
votes
1answer
67 views

Deep learning using Distributed linear algebra

Is there any deep learning library based on Trillinos or Petsc linear algebra?
0
votes
0answers
20 views

Using surrogate optimization to reproduce analytical results

I am trying to reproduce results from the following paper: https://www.researchgate.net/publication/261186477_Optimal_design_of_a_novel_tuned_mass-damper-...
1
vote
0answers
22 views

Setting up diffusion with integral B.C. in Fenics

I'm trying to model diffusion through a cylindrical domain $D = \{ (x,y,z) : x^2 + y^2 \leq 1, \;\; 0 \leq z \leq 1\}$. The is an initial concentration of the diffusant at the upper flat surface, ...
2
votes
1answer
36 views

Whether should we consider the condition number of the preconditioned matrix when choosing a preconditioner?

when we solve a large sparse linear system Ax=b, using preconditioned Krylov subspace methods,e.g., gmres, should we need to reduce the condition number of the coefficient matrix? In my opinion, we ...
2
votes
0answers
17 views

Forming Basis Functions from 6-31G Basis Set for Carbon Atom

I am a computer science grad and I am working to write an electronic structure calculation program and I am stuck at forming basis functions using 6-31G Basis set for atoms having higher atomic ...
2
votes
1answer
75 views

What is good practice for protecting parent scope variables in Fortran?

So I just picked up a project that is written in fortran90. I am used to coding in python and C. What is really troubling for me is the use of subroutines in fortran90. In fortran people use ...
0
votes
0answers
37 views

Getting started with Computational Chemistry

I´m now a chemistry grad student and I feel the need to get involved with computational chemistry and coding in the chemical field (in general). I have a very simple question: What is the best way to ...
0
votes
0answers
21 views

solving electron motion in undulator by Boris method

I am trying to use Boris scheme to solve the electron trajectory in undulator. The undulator field I used is: $$B_x = b_0\sin(2\pi \tfrac{z}{\lambda_u})$$ where $b_0 = \dfrac{2\pi c_{0}K}{q m_{e} \...
8
votes
2answers
201 views

What guidelines should I follow for simulation software projects?

I am not sure whether this question belongs here, but I would like to give it a try and benefit from the experience of the people at scicomp.SE. From my experience, the software quality in ...
0
votes
0answers
24 views

Method for implementing QP solver with matrix terms?

I am trying to implement (in code) a QP solver for the following equation: $$\min_{u} u^{T} Wu$$ $$s.t. \; \beta u = \tau_{ref}$$ $$ Au \leq b $$ See this document, section 5.1 (Page 35) $u$ is a ...
2
votes
0answers
53 views

Smoothing FFT result

I am trying to calculate the spectrum of Bremmstrahlung, which involves calculating the Fourier transformed acceleration. I am solving a non-linear ODE to numerically calculate the acceleration in the ...
4
votes
1answer
81 views

Do most statistical packages and libraries in high-level programming languages rely on LAPACK for their matrix inversion operations?

Possible an open-ended question, but I am wondering if most statistical packages and libraries, for instance, Stata, R, Python's NumPy and MATLAB rely on LAPACK algorithms to perform matrix operations,...
0
votes
1answer
36 views

Shooting Method- Boundary value problem starting from -1 to 1

The equation is $\rho \frac{d \bar{u}}{dy} = -\frac{d\bar{p}}{dx} + \mu\frac{d^2\bar{u}}{dy^2} $ with boundary condition $u(-1)=0$ and $u(1)=1$ I am to solve it using fifth order runge-kutta ...
-2
votes
0answers
14 views

How to use the norminv function in excel

I am given a list of ages from 29-73 and I am asked to calculate what values fall within the middle $95%$,top $10%$, and $P20$ Any help would be greatly appreciated
1
vote
1answer
61 views

Runge-Kutta fourth order method. Integrating backwards

I am using a Runge-Kutta fourth order method to solve numerically the usual equation of motion of a background scalar field in curved spacetime with a quartic potential: $\phi^{''}=-3\left(1+\frac{H^{...
3
votes
1answer
46 views

Scipy Spline Interpolation Parameter

Documentation in scipy.interpolate (found at https://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html) states: "The parameter variable is given with the keyword argument, u, which ...
0
votes
0answers
24 views

Divergence issues when using intrinsic cohesive elements approach

When I model the strain localisation of a microscopic sample (or say RVE ) with cohesive elements approach, the convergence performance looks very terrible. I have to use extremely time increments (...
4
votes
3answers
306 views

Inverse of ill-conditioned symmetric matrix

I've got a matrix K, with dimensions $(n, n)$ where each element is computed using the following equation: $$K_{i, j} = \exp(-\alpha t_i^2 -\gamma(t_i - t_j)^2 - \...
1
vote
0answers
46 views

implementation for coppersmith matrix multiplication

Is there any online implementation for the coppersmith matrix multiplication I have searched alot but can not find any? and if there is not any why is that Isn't this algotithm much faster than ...
3
votes
2answers
96 views

Find shortest path around a cylinder represented by 3d triangular mesh

Suppose I have a 3d triangular mesh with the topology of a finite cylinder. Let $C$ be a vertex on that mesh. How can I find the shortest path from $C$ to itself that goes around the cylinder? By ...
2
votes
1answer
58 views

Numerical solution to parametrized second order ODE with nonuniform coefficients

I am trying to solve numerically the following second order linear ODE: $a \frac{\partial^2 u}{\partial x^2} + \frac{\partial u}{\partial x} \frac{\partial a}{\partial x} + b u =0$, on the domain $[...
5
votes
1answer
44 views

Maximum and Minimum distance from query point within bounding box

I'm reading an article regarding approximating sums using KD-trees (similar to FMM). As part of the effort I'm trying to make sense of this article , which is cited. I'm having trouble understanding ...
3
votes
1answer
43 views

Differences between Discrete Fourier Transform and Continuous Fourier Transform?

I am trying to visualize the time dependence of a free particle given an initial wave-function using Python and I just wanted to know if I could use the in built FFT implementation from NumPy to find ...
0
votes
0answers
43 views

what algorithm do BLAS and ATLAS use for matrix multiplication

I have searched and what I understood was that they use the naive one with several memory and cache optimization but I wanted to know are they using strassen or copper smith algorithms and if they ...
1
vote
1answer
81 views

Lapack symmetric update $B^{-1}AB^{-T}$

Does Lapack have a routine that, given symmetric $A=A^T$ and $B$, computes the symmetric matrix $B^{-1}AB^{-T}$ (while preserving symmetry exactly)? It would be enough to have this routine for ...
3
votes
5answers
2k views

What is the difference between MATLAB and FORTRAN?

In our university some Ph.D students for computational methods prefer FORTRAN over MATLAB. I can't understand why? What is the difference between them when are used in computational methods like ...
6
votes
2answers
7k views

Linear interpolation in Fortran

Is there a Fortran subroutine which performs linear interpolation in one-dimenional data? I need something similar to MATLAB function interp1.
1
vote
1answer
392 views

Assembling sparse matrix in PETSC for Poisson equation

I am a novice at PETSC, and I have been trying to write an FVM code for steady heat conduction in 2D using PETSC (square, regular grid, Dirichlet boundaries) Since the large matrix , say A, will be ...
3
votes
1answer
84 views

Parallelizing Newton-method in solving non-linear systems

Circuit simulation software based on SPICE (such as ngspice) uses Newton-Raphson method to solve non-linear system of equations ...
0
votes
1answer
37 views

Access PETSc data in totalview?

Is it possible to view the data stored in the various PETSc data types from within totalview? Ordinarily, PETSc types are integers which act as pointers to the actual data (obviously my understanding ...
1
vote
1answer
69 views

Fenics: solving the same PDE multiple times

I am new to Fenics and just started reading the tutorial Solving PDEs in Python. For simplicity, we can refer to simplest example, page 17 (the linear poisson equation), despite not necessary. My ...
1
vote
1answer
55 views

Vectorization of Jacobi iteration

Assume I have a linear system of $A x = b$ which I want to solve with Jacobi iteration. Matrix $A$ is given in CSR format. The vectors are dense. The code for Jacobi iteration is quite clear and can ...
1
vote
1answer
57 views

Eigenfaces Algorithm

This might be a silly quesntion but recently I've been trying to program the eigenface algorithm using PCA, so I arranged the face vectors vertically in a matrix X such as: X = [x1,x2,x3,...,xn]; In ...
3
votes
3answers
113 views

GPGPU computing, software selection

I am using an existing GCC C++ x86 Qt application that filters, displays and stores results computed by some C code. Since the computation by now got too complex for CPUs I intend to port the small C ...
8
votes
1answer
99 views

Is using std::valarray considered good practice?

C++ has had the std::valarray class since the C++98 standard. It is meant to facilitate numerical computations, providing the sort of operations one would expect of ...
5
votes
0answers
71 views

Minimum of quadratic assignment (QAP) with convex objective

Suppose $A,B\succeq0$ and $C\in\mathbb R^{n\times n}$. I am hoping to solve an instance of the following optimization problem: $$ \min_{\textrm{permutation matrices }P} \mathrm{tr}(BP^\top AP+C^\top ...
0
votes
0answers
21 views

Controllability - Maximum Matching

I found this image on wikipedia referring to Barabasi's work on Network Controllability. I tried to verify it. We have a A matrix of dimensions (20 by 20) made as the image suggests. According to the '...

15 30 50 per page