instruction
stringlengths
43
28.1k
Suppose I have a symmetric matrix $A_{1000\times 1000}$, which can be represented by: $A = J G J^T$ where $J$ in 1000x3 is full column rank dense matrix; $G$ in 3x3 is a nonsingular dense matrix. What is the fastest way to obtain ONLY the maximum eigenvalue of $A$? I know that the eigenvalue problem of symmetric matrix...
How is it possible to do something once every solver iteration? The expressions when change(time) or when time > pre(time) are not permitted. Best regards, Koldo Edit: The final goal is to do a cosimulation from Modelica with other tool that does not have FMI and where the Modelica side signals the iteration delta time...
If $A\in R^{m\times n}, b\in R^m, c\in R^n$, if I need to solve the least square problems via SVD of $A$ and $A^T$, i.e. I need to solve the least square solutions to following linear systems via SVD: $Ax=b_i,\quad i=1,2,3,\cdots$ $A^Ty=c_j,\;j=1,2,3,\cdots$ it is also possible to do these via householderQr().solve() i...
In finite difference and finite volume methods, convection schemes (upwind, central, quick, ...) are usually shown in a normalized variable diagram. The diagram gives the normalized face variable as a function of the normalized upwind or downwind variable. For example, let $D$ be the donor cell, $A$ the acceptor cell...
I am dealing with large, sparse, rational matrices that I need to determine the nullspace of. Currently, I have one that is about 12000x12000 (but not square), where one in every 2000ish elements is nonzero. Subsequent matrices will grow both in size and sparsity. Most nullspace algorithms rely on bringing the matrix i...
Is there any clear classification between different iterative methods? What is the difference between Newton-type and Newton-like iterative methods?
Incomplete low-rank matrices can be exactly recovered in most cases, so long as the rank is low enough relative to the number of known entries. This result was famously proved by Candès and Recht in the paper "Exact Matrix Completion via Convex Optimization". Algorithmically, the nuclear norm minimization that recovers...
I have an optimization problem with the following objective function. $\max_{a^{l}_{n,k} b^l_{n,k}} \sum_{n=1}^{\overline{N_l}} b_{k,n} \frac{C_1}{C_2} \log_2 \bigg(1 +\frac{a_{k,n} h_{k,n}} {b_{n,k} c_3}\bigg) $ The constraints are linear. The objective is concave, if I keep all the constants as 1, for simplicity the...
I look for a numerical method to solve boundary value problems for systems of differential and algebraic equations of the form F(x,y,y') = 0, G(x,y) = 0, y(a) = ya, y(b) = yb, where y = (y1, y2, ... yn). I have to implement it myself, but I can't find such methods in textbooks. Where can I find description of needed me...
Suppose $A,B \in \mathbb{R}^{n\times n}; A=A^T, B=B^T$, let $C = AB, D =BA$, If we have all the real eigenvalues of $A$ and $B$, e.g. the eigenvalue decomposition of them: $A=P\Lambda_1 P^T$, $B=Q\Lambda_2 Q^T$; both $P$ and $Q$ are orthogonal matrices, and both $\Lambda_1$ and $ \Lambda_2$ are diagnoal matrices; can w...
Suppose we have incomplete observations of the square matrix $X$. Most matrix completion algorithms assume the matrix is low-rank. What if instead we assume the matrix of eigenvectors is a tensor product: $V = A\otimes B$, $X=VDV^{-1}$? This still dramatically reduces the space of possible matrices, so it may be possib...
I want to minimize a cost function for a differential-nonlinear system (dynamic). Is it possible to use this software? How can I do it? Best regards, Haniye
Can anyone point me in the direction of literature pertaining to the selection of the coefficient c2 in the curvature condition in the wolfe conditions when performing a line search? In Nocedal, he says that c2 = 0.9 for quasi Newton methods, and that c2 = 0.1 for non linear conjugate gradient methods. I have not been ...
I have a logarithmic grid, upon which i have two functions that are similar to this one (this is only the last 100 points): These are essentially very similar to a Sin function at this point. I need to take the integral of two of these functions multiplied together, along with the position: $$ \int_0^R f_1(r)\; r\; f...
I'm dealing with a coupled system of three transient, non-linear convection-diffusion equations. Let's just say to simplify the problem that they take the following form: $$ -\nabla\cdot(D_{1}(u_{2},u_{3})\nabla u_{1}) = -\nabla\cdot\mathbf{\chi}(u_{2},u_{3}) $$ $$ \frac{\partial u_{2}}{\partial t} + \nabla\cdot f_{1}(...
Are consumer grade GPUs (like the NVidia Geforce series) used for solving sparse linear equations systems in a professional setting? For example, by engineers performing finite element analysis? After all, at least for iterative methods, memory bandwidth is the bottleneck, and a Geforce 780 Ti provides a lot more of th...
I've used MT19937 in a test harness to generate uniformly (unsigned) 32-bit [0, $2^{32}$- 1] values, based on the original Authors' mt19937.c implementation, to generate an (essentially inexhaustible) supply of statistically random stream of bit-octets. This is in lieu of a CSPRNG, which isn't necessary for these parti...
Have two arrays, in my case $X = \{1,2,\dots, n\}$ or X = np.arange(n). How do I get $Y = X \times X = \{ [i,j]: 1 \leq i,j \leq n \}$ as a 2D array in numPy? In numpy this would be a $n \times n \times 2$ array np.shape(Y)=(n,n,2).
I need to solve $$\mbox{min}||Ax - b||_2^2 \quad \mbox{s.t.} \quad l \leq x \leq u,$$ where $A \in R^{m \times n}$, $m \ll n$, $n \approx 10^4-10^5$. BVLS [1] based on active-set method works fine for small problems, but it is too slow for large-scale problems I have. Are there any other (maybe approximate) methods to ...
The Huffman code is a way of compressing data streams by encoding the more frequent items with shorter words. Here is a distribution on the letters A thru J and the code I obtained: 0.00066872 0.01864353 0.0474964 0.18568327 0.11587298 0.13329128 0.08580358 0.0881718 0.1847246 0.13964385 Notice that A is l...
I'd like to model the fluid flow through a porous medium using finite differences. Since I am new to this numerical technique, I have a simple question. I use the following set of equations to calculate the change in water volume or porosity over time. $$q_x = K \frac{dP}{dx}$$ $$q_y = K \left(\frac{dP}{dy} + \varphi ...
According to the Perron-Frobenius theorem, a real matrix with only positive entries (or one with non-negative entries with a property called irreducibility) will have a unique eigenvector that contains only positive entries. Its corresponding eigenvalue will be real and positive, and will be the eigenvalue with greates...
For a nonsingular lower or upper triangular square matrix $A$, how to solve such linear system in Eigen: $$A x = b$$
I read somewhere that Pandas was first developed for the financial world, at least not especially for natural sciences (physics, biology and so on), so is there any similar data analysis Python package more “natural sciences oriented“? I have just started using Pandas and I have already encountered two problems I could...
I was reading up on Spectral Methods for PDEs. In all the descriptions I read, while the position component is approximated via a Fourier series or other methods, the time component is still discretized and solved via a time-step procedure (finite difference, etc.). Is there any reason why the time component is also no...
The original nonlinear optimization problem I have is as follows: For constant symmetric matrices $A=A^T, B_i=B_i^T(\forall i\in\mathbb{N}) \in \mathbb{R}^{n\times n}, \text{rank}(A)=n,$ $$\arg\min\limits_{x\in\mathbb{R}^n}\dfrac{x^TAx}{\sum\limits_{i=1}^{m}\left(x^TB_ix\right)^2}$$ Someone said this problem can be con...
I have been browsing through the documentation of the IBM Platform Load Sharing Facility, to find out if it supports parallel task computing. Below is what I think is relevant for this question, Please correct me if my perception is wrong. Focus seems to be on the parallel job execution, where a computation has to be s...
I know a square self-adjoint matrix $S_{vv}$ and I want to find: $S_{rr} = HS_{vv}H^{\dagger}$ where $\dagger$ denotes conjugate transpose. I do not know $H$ but I do know $H^{-1}$. What is the most efficient way to solve something of this form? I have considered rewriting it as: $S_{rr} = H(HS_{vv})^{\dagger}$ Fin...
Is there a conservative FV second-order (or first-order) accurate immersed boundary method for compressible flow including moving boundaries (in the literature)? By compressible flow I mean the Navier-Stokes eqts. for an ideal gas. Most of the results I am able to find deal exclusively with incompressible flows. It wo...
I'm searching for software which can solve 3d IBVP like PDEtool in Matlab (user-friendly GUI, easy to learn how to use). What could you advise to me? (ANSYS,COMSOL,OpenFOAM are too difficult for me)
For periodic functions on a regularly spaced grid, the trapezoidal rule is supposed to converge incredibly quickly ( the error estimate decreasing as $O(e^{-\eta/h})$ for step size $h$ ). However, I don't believe this is true for non-uniform grids. What is the error estimate for a non-uniform grid, and how does it co...
If i have some function expressed as points on a non-uniform grid (I'm specifically interested in logarithmic grids, but general results are also interesting), and I want to integrate it, I believe there are two general possibilities: Interpolate, and use some method like Gauss Quadrature, or Clenshaw-Curtis Quadratur...
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?
Suppose a real, dense and asymmetric square matrix $A\in\mathbb{R}^{n\times n}$, all its eigenvalues $\lambda_i \in \mathbb R$ Is it possible to construct a symmetric matrix $B\in\mathbb{R}^{n\times n}$, the eigenvalues of which are $\lambda_i^2$ to compute absolute values of $\lambda_i$ without the need of solving eig...
Short version of question: We have a Opteron 6272 cluster, an we have recently started bilding FX 9370 based small cluster. Problem is that we are not able to get desired speed, i.e scaling with number or processes is not optimal. Full story: When we ran CPMD on Opteron 6272 as a single process, on a single node (hence...
Original Question I am familiarising myself with OpenFOAM and want to run a simple pipe flow case. I would like to be able to compare my computational pipe-flow results to a well established case (like the lid-driven cavity flow or Ahmed's body): given certain $L,\,D,\,v_{1},\,p_{2}$ (atmosphere) and $\mu,\,\rho$ of t...
Suppose that $A(x) \in \mathbb{R}^{m \times n}$ is a nonlinear matrix function of $x \in \mathbb{R}^d$. We may assume that $A(x)$ is continuously differentiable. Are there any good ways to estimate $\mathrm{argmin}_{x} \|A(x)\|_2$? Also assume that due to some growth properties of the function $A(x)$, this minimizer ca...
I am trying to solve a least squares problem where the objective function has a least squares term along with L1 and L2 norm regularization. I am unable to find which matlab function provides the ability to perform such an optimization in addition to specifying constraints. I looked into the MATLAB optimization toolbox...
I am trying to implement the N-body problem using Fortran 95. Before generalizing it to N bodies, I am first trying to calculate the motion of a single orbiting body (body 2 in my code below) around a fixed one (body 1 in the code below). The problem is the output is not correct, but I can't find the error with my equa...
I asked a somewhat similar question previously but perhaps it might have been too specific for anyone to really answer. Here is a bit more general of a question that I am struggling with. Consider the following system: $$ -\nabla\cdot(D_{1}(u_{2})\nabla u_{1}) = \nabla\cdot\mathbf{f}_{1}(u_{2}) $$ $$ \frac{\partial u_{...
Is there any simple rule of thumb to say if it is worth to do SOR instead of Gauss-Seidel? ( and possible way how to estimate realxation parameter $\omega$) I mean just by looking on the matrix, or knowledge of particular problem the matrix represents? I was reading answer on this questions: Are there any heuristics fo...
Can you show me the main differences between 2 methods? I find out 2 reasons but I don't know they are right or not. XFEM is constructed base on enrichment functions whereas P1-bubble is constructed base on bubble functions. Basically, 2 types of these functions are different (what are these differences?). For $P_k$-b...
I am working with biofilm and there are many documents talking about boudary conditions while others talks about interface or both of boundary and interface. So, boundary and interface are the same (in numerical analysis) or not? why and examples?
Assume that we have a function $u$ defined in a ball in a discrete way: we know only the values of $u$ in the nodes $(i,j,k)$ of spherical grid, where $i$ is a radius coordinate, $j$ is a coordinate for angle $\varphi$, $k$ is a coordinate for angle $\psi$. Consider a vector-function $$\nabla u_{i,j,k}=\left(\frac{\p...
I am trying to solve the following system of differential equations numerically over the domain $x=0$ to $x=D$. The main difficulty is that the boundary conditions are interconnected and depend on the solution variable. I'm not too sure how to approach the finding a numerical solution for that reason. $$ \frac{dI_1}{dx...
I am trying to discretize the differential operator $\frac{d^2}{dx^2}$ acting on $S^1 = [0,1]$ using finitely many points around a circle at $0, \frac{1}{N}, \frac{2}{N}, \dots, \frac{N-1}{N}$. Here is the matrix for $N=5$: $$\left[ \begin{array}{cc} -2 & 1 & 0 & 0 & 1 \\ 1 & -2 & 1 & 0 & 0 \\ 0 & 1 & -2 & 1 & 0 \\ 0 &...
I am using a multigrid preconditioned GMRES method for a nonsymmetric matrix. The matrix is the discretisation of the derivative of a nonlinear operator. Since multigrid is not the best for nonsymmetric problems I am preconditioning the 'symmetric part' of the matrix, where I am taking the symmetric part of matrix $A$ ...
I need a C# implementation of the gamma function that produces correct exact answers at positive integer inputs. I took a look at MathNet.Numerics Meta.Numerics. In both cases, if you calculate something like gamma(5)-4!, evaluating the latter by integer arithmetic, you get an answer whose absolute value is approxima...
Following "A conservative DGM for Convection-Diffusion and Navier-Stokes Problems" (Oden and Baumann), if we have a linear convection-diffusion equation of the following form: $$ \nabla\cdot(\mathbf{b}u) - \nabla\cdot(a\nabla u) = f $$ with BC's $$ u = u_{D} \;\;\text{on} \;{\Gamma_{D}} \;\;\;\text{and}\;\;\;a\nabla u\...
I am looking for a fast Eigenvalue and SVD solver for small dense structured matrices (Hankel and Toeplitz). I have searched for efficient implementations in libraries like MKL but I am not able to find anything specific to structured matrices. I found a set of interesting papers on the subject: Luk and Qiao, "A Fast ...
I'm dealing with Jacobi iterative method for solving sparse system of linear equations. For small matrices it works well and gives right answers even if matrix is not strictly diagonal dominant, however for the case of really big matrices ($100000*100000$) it does not converge because the matrix is not diagonal. Many a...
I am dealing with a large sparse integer matrix that I need to find the nullspace of. I've seen Markowitz Pivoting come up in several places discussing similar problems such as here: http://www.mapleprimes.com/posts/41191-Solving-Sparse-Linear-Systems-In-Maple And in the MAGMA documentation under the sparse null space ...
I have a problem with parallelization and the brownian dynamics (molecular dynamics) code that I am using. We have our own home-grown framework at the university, and recently we've made the change to using OpenMP for the more intensive calculations. We are definitely CPU bound, so I don't necessarily have to worry a...
At the moment, I'm installing the "GADGET-2" application. In its documentation it says "Note that the MPI-capable version 2.x of FFTW is required, the new version 3 lacks MPI capability at this point. FFTW is only needed for simulations that use the TreePM algorithm." Is this still true for the current version 3.3.3? S...
I have generated a list of 3 random number where each summed to 1. I would like to assess the quality of randomness. What is the best mechanism to assess this randomness? E.g my random numbers are. Any idea what tools can I use excel for this? 0.4 0.5 0.1 0.2 0.3 0.5 0.6 0.2 0.2 0.5 0.2 0.3 0.2 0.4 0.4 0.2 0.1 0.7 0.3...
I'm using PETSc's SNES linesearch (NEWTONLS) to solve a system of nonlinear PDEs. SNES+KSP successfully solved a test problem of the same type before without any trouble. However, with my current problem, if I use the KSP to invert the Jacobian, the intermediate solution develops a "ridge" at the boundary between two M...
I have a C++ program that has a double for loop that I'd like to parallelize using opeMP. It is simple (a polynomial product) of varying length (between 100 and 8000 coefficients) and the function is called millions of times per execution. I have the parallel pragma around the outer loop and the for pragma just below t...
This question was original posted on SO but it was suggested that I post it here. I'm working on a program in which I have a banded matrix M and a vector b, and I want to maintain an approximate solution vector x such that Mx ≃ b. Is there a speedy algorithm or way of modeling this so that I can change individual eleme...
I am working on a numerical method for time fractional PDE. One problem is that I must compute a numerical integral of the following form: $$ \begin{equation} \int_0^{t_m} (t_m-s)^{-\beta}f(s)ds \end{equation} $$ where $t_m$ and $0<\beta<1$ are constants. Noting that the integral has a weakly singular kernel, so classi...
Given is an increasing finite sequence of positive numbers $z_{1} ,z_{2},.....z_{n}$. Which of the following two algorithms is better for computing the sum of the numbers? s=0; for \ i=1:n s=s + z_{i} ; end Or: s=0; for \ i=1:n s=s + z_{n-i+1} ; end In my opinion it would be better to start adding the numbe...
I'm working with an elliptic reaction diffusion PDE of the form $$-k\nabla^2u+cu=0$$ I've noticed that when the reaction term dominates over the diffusion (i.e. $c>>k$), the true (exact) solution has sharp gradients near the boundaries. I've also noticed that my numerical approximations via finite difference, finite v...
I would like to run some simple simulations of scattering of wavepackets off of simple potentials in one dimension. Are there simple ways to numerically solve the one-dimensional TDSE for a single particle? I know that, in general, trying to use naïve approaches to integrate partial differential equations can quickly e...
Question: Suppose that you have two different (factored) preconditioners for a symmetric positive definite matrix $A$: $$A \approx B^TB$$ and $$A \approx C^TC,$$ where the inverses of the factors $B, B^T, C, C^T$ are easy to apply. When is it possible to use information from both $B$ and $C$ to build a better precondit...
Say I have slow and fast versions of some code, and want to report a speedup number comparing the two. I run the slow version $n$ times and the fast version $m$ times, producing times $(s_1, \ldots, s_n)$ and $(f_1, \ldots, f_m)$. The simplest way to produce a speedup is to average the means: $$\frac{\bar{s}}{\bar{f}...
I have to approximate the smallest eigenvalue of the following generalized eigenvalue problem $$ - \nabla \cdot D(x) \nabla p(x) + \alpha(x) p(x) = \lambda \beta(x) p(x) $$ over a domain like follows (many more subdomains, this is only an approximation to illustrate the problem) The eigenvalues are all positive, so t...
I am trying to build a complex simulator for the transport of mass & heat in porous media. I am currently following coarsely the algorithm laid out in an older software and have got the simulator to work, but the iterative solvers that I use run into trouble at large timesteps and prevent the convergence of the system ...
Let $\Sigma$ be a covariance matrix (e.g. symmetric positive definite). For arbitrary vectors $\epsilon$, I need to compute $\chi^2 \equiv \epsilon^\top\Sigma^{-1}\epsilon$, which I do using a Cholesky decomposition. If $\Sigma=I$, then $\chi^2$ would be the 2-norm of $\epsilon$. I would then say that each coefficient ...
I am trying to solve Poisson-Nernst-Planck system of equations for ions diffusion problem using finite volume method. Nernst-Planck equation for mass transport and Poisson equation for electrostatic charge distribution. My jacobian is sparse and ill-conditioned (condition number ~ 1E+14). For a system of 4 ions and th...
I have real symmetric positive definite matrix $M = \left(\begin{matrix} a & b \\ b & c \end{matrix}\right)$ where $a,b,c \in R,\ a,c>0,\ \left|b\right|<2\sqrt{a c}$. I want to define CONVEX objective function of $M$ (preferably polynomial) which has minimum value for prescribed value of trace and determinant of $M$, ...
I have a master equation for $P(N_A^+,N_B^+,N_C^+,t)$, with $N_A^+,N_B^+,N_C^+$ all discrete. The numerical integration is done by this Matlab program using Euler's method. Despite the crude Euler's method, the results from numerical integration are in agreement with the simulation, so the correctness of the program is...
As you will know there are different numerical integrals (I believe Levin's method is the most popular one) for the numerical quadrature of oscillating integrands which may roughly speaking be written as a product of oscillating part and non-oscillating amplitude $exp(i \omega t) A(t)$ (the form can of course be slight...
I am looking mainly for c/c++ implementations but also for theoretical algorithms to compute gaps between smallest positive eigenvalues of symmetric, singular matrix or real numbers. To be precise, I want to find index n of the eigenvalue such that between $\lambda_n$ and $\lambda_{n+1}$ (both are nonzero) there is the...
I have an optimization problem that looks like the following $$ \begin{array}{rl} \min_{J,B} & \sum_{ij} |J_{ij}|\\ \textrm{s.t.} & MJ + BY =X \end{array} $$ Here, my variables are matrices $J$ and $B$, but the entire problem is still a linear program; the remaining variables are fixed. When I attempt to enter this pro...
I recently discovered that, in MATLAB 2013b at least, it is significantly faster to do repeated multiplication rather than integer powers. That is, tic;test4p = a.^4;toc is much slower than tic;test4m = a.*a.*a.*a;toc See http://www.walkingrandomly.com/?p=5377 for full details. Is there any numerical reason (accur...
I'm considering learning a new language to use for numerical/simulation modelling projects, as a (partial) replacement for the C++ and Python that I currently use. I came across Julia, which sounds kind of perfect. If it does everything it claims, I could use it to replace both C++ and Python in all my projects, since ...
I know that the finite volume method (based around a central different stencil) is unstable for advection dominated advection-diffusion problems. This leads to different adaptive schemes to can be applied to stabilise the basic approach (such as exponential fitting). However, I don't have broad understanding of stabili...
I am currently trying to port my code over to Trilinos because the problems that I am working on are too big for LAPACK/ARPACK. Specifically I am computing the generalized eigenvalues/eigenvectors: $$\mathbf{A}x = \lambda\mathbf{B}x$$ where both $\mathbf{A}$ and $\mathbf{B}$ are large and sparse. I am mainly interested...
I dont understand how this Higher Order Compact ADI scheme, which is fourth order in time and space, for the wave equation is derived: I go through the following Using Tylor's expansion $u(t+h,x,y)$ and $u(t-h,x,y)$ about the point (t,x,y) we have:\ (1) \begin{equation} \label{311} u(t+k,x,y)-2u(t,x,y)+u(t-k,x,y)=k^2\l...
I have a fairly sparse adjacency matrix showing connections between approx 5,000 points in my dataset. I'm looking at various ways to analyze the relationships between the data points. This approach looks interesting: https://www.cs.purdue.edu/homes/dgleich/demos/matlab/spectral/spectral.html The author sorts the adjac...
For a serendipity element, the shape function of a middle pt on a edge can be formed using the tensor product in each direction, e.g. point 5 on Quad8 $$ \phi_5(\xi,\eta)=\frac{1}{2}(1-\xi^2)(1-\eta) $$ but the shape function on corner node (point 1) is $$ \phi_1(\xi,\eta)=\frac{1}{4}(1-\xi)(1-\eta)-\frac{1}{4}(1-\xi^2...
I have a generalized eigenvalue problem in the standard form $\lambda \mathbf{B} \mathbf{x} = \mathbf{A} \mathbf{x} $, resulting from a finite difference discretization of a coupled system of two linear stability equations, so the system is large $(10^5 $ x $10^5)$ and sparse. I know that $\mathbf{B}$ is indefinite, an...
If while distributing particles to their corresponding nodes, two particles comes closer to a level smaller than the machine precision (or $\Delta d \to 0$), how is the situation to be treated? Should the recursive distribution stop and both of them be added to a single node? This happens because of treating particles ...
A lot of adaptive FEM libraries use more advanced mesh data structures to handle adding/removing nodes, edges, triangles, tetrahedra, etc. For example, the p4est library uses octree data structures for adaptive mesh refinement; you wouldn't often find octrees used for computations on a static mesh. What changes on the ...
I have a Simplex problem $ A y \ge b $, where some of the elements of $b$ are positive and some are negative, and thus setting $y = 0$ does not give a basic feasible solution (BFS). By previous work, however, I happen to know a specific BFS. How do I then set up the table to start at this BFS instead of the standard $y...
Say I run a supercomputer computation on 100k cores for 4 hours on http://www.nersc.gov/users/computational-systems/edison/configuration, exchanging about 4 PB of data over the network and performing about 4 TB of I/O. The calculation is all integer, so the results are either right or wrong (no intermediate numerical ...
I need to solve two point bondary problem for ODE. The solution of the problem itself is very easy. The real issue is that when solving arising non linear system of equations it always converges to one solution. However there exist two (physically justified) solutions. To illustrate this problem in detail consider the ...
I'm dealing with physical simulation (position based dynamic). Now I'm trying to realize tracking for two meshes. In order to explain what does it mean, let's assume that we have two similar meshes: one with fine resolution and other with coarse. A need to make in the way that mesh with fine resolution followed the coa...
I have a one dimensional convex function $$f : [a,b] \to \mathbb{R}$$ and want to find the minimum value $$\min_{a \le x \le b} f(x)$$ I know all derivatives of $f$, so the problem could easily be solved with any 1D minimization method even ignoring the convexity. However, I would like to not ignore the convexity: Que...
I am trying to maximize the following function (variable: $\theta$, a vector ($\theta_1$,...,$\theta_K$). most likely $K\leq5$ $$ \begin{aligned} F(\theta, c_0, c_1) = &P_{\theta}(T_0 > c_0, \max T_i >c_1, \min T_i <-c_1) \\ &+ \sum_{S \subset \{1,2,.,K\},\\ 1\leq |S|\leq K-1} P_{\theta}(T_0 > c_0, \min_{i\in S} |T_i|...
I have case of a rotating fan at Low- speed ie about 300-400 rpm. I have successfully carried out RAS simulations using cyclicAMI approach where, the motion of the fan is modeled as rigid body rotation of a cylindrical AMI mesh section, which has same speed as our fan. I have tried various levels of mesh refinement and...
Am quite new to wavelet analysis and would like some help. I am performing a spatio-temporal analysis of monthly gridded rainfall data. With PCA, I can reduce the dimension of the rainfall data into a few leading modes, yielding EOFs (which explain spatial variability) and principal components (explaining temporal vari...
I have a large array of zeros and ones and I need to count instances of 0 1 1 0 0 0 1 1 0 1, 1 0, 1 1, 0 0 And I would like to exclude all other $2 \times 2$ submatrices... such as 0 1 1 1 0 0, 1 0, etc. In the space of $2 \times 2$ binary matrices has $2^4 = 16$ elements, and I could...
I'm working with non-linear optimization for imaging, such as MRI and CT. Our problem is of the form $\|Ax-b \|_2^2+\lambda \|Wx\|_1$. $A$ is never formed explicitly, so we're limited to approaches that only use $Ax$ and $A^Hf$. Even so, these evaluations are quite expensive, whereas $Wx$ and $W^Tx$ are quite inexpensi...
This should be easy, but... I would like to express the singular value decomposition of a 2 x 2 complex matrix $A$ as function of its coefficients $A_{ij}$. In "closed form", no intermediate values, straight up. What I mean is that if I express the SVD in terms of eigenvalues, say, then I have to write those eigenvalue...
I have an orthotropic material with a (6x1) stress vector known in the global coordinate system and yield surfaces known in a local coordinate system. So far I have only needed to convert from local to the global system and this has been done in the standard way of C = G.T*D*G where C is the stiffness matrix in the glo...
The question is if Python Numpy library can use back subsitution to solve Ax=b if possible, that is, if A is lower triangular? Do numerical linear algebra packages do this? I would think Numpy would detect the triangular state and use the proper approach, but a Google search returns things like scipy.linalg.lu_solve or...
In light of this question and some stuff I read online I am wondering if large FE libs (e.g., deal.ii, libmesh etc.) that do AMR keep the entire mesh or possibly a coarse version of the entire mesh on each core. Also, does this limit the size of the problems that can be solved on machines with low RAM per core. Finally...
In which problem category can I put a quadratic programming problem with only continuous values whereas the matrix A should be symmetric but needs not to be positive semi-definite? minimize/maximize x' * A * x whereas lowerbound <= x <= upperbound Can I reformulate it as a Mixed Integer Problem for example? Or is ther...
I am interested, how can we get CFL condition for every type of PDE? It's known that for 1st order linear equation $$\frac{\partial u}{\partial t}+a\frac{\partial u}{\partial x}=0 $$ CFL is get from characteristics method, but how can we get in general? Any your advise will be welcome.
I use gpbsv command from Intel MKL to solve symmetric positive band system. But unfortunately when the system is large I get an error Access violating writing location in VisualStudio. Could someone give an advice how could I solve this system. Maybe I could use more optimized library? Maybe it's simplier to write my o...