instruction
stringlengths
43
28.1k
I am searching some libraries or toolboxes (preferred MATLAB) for solving acoustic wave equation in heterogeneous media with time varying source term, i.e. $$\nabla^2 \psi(\vec{r},t) - \frac{1}{c(\vec{r})^2} \frac{\partial^2}{\partial t^2}\psi(\vec{r},t) = s(\vec{r},t)$$ Actually I want to verify the k-Wave toolbox I m...
I sincerely apologise if this question is a duplicate. Though it is clearly a question that must have been asked and answered a 1000 times I can't find any reasonable solution. How do I take a simple 2D CAD Drawing (.dwg file) of a 2D boundary and generate a 2D computational mesh suitable for FEM analysis in any of the...
Suppose $g(x_{1:n})$ is the estimate of a gradient, which is calculated at each step of a Stochastic Steepest Descent algorithm. A dataset $x_{1:n}$ is simulated at each step, so if $n$ is small the algorithm is fast but unstable, while if $n$ is large it is slow but stable. So far I have just experimented with many va...
I'm pretty ignorant regarding the dark arts of numerical codes and modelling, but i'm interested in trying to pursue it for a particular pet project. It regards modelling of nuclear reactions like those required for NERVA-like rockets or this one. I would appreciate any references regarding implementation, models that ...
I am looking for a very fast polynomial root finder, hopefully with a matlab code. I don't need very accurate results, 2-3 decimal places would be fine. Also the method should be able to optionally take as input an initial guess of the roots. If the initial guess is close, this should speed the process up. What do I ne...
Given a machine precision unit vector $n$, and an arbitrary vector $v$, I want an unconditionally backward stable method to compute $$f(v) = \frac{v-nn'v}{\left|v-nn'v\right|}$$ In other words, project $v$ orthogonal to $n$ and then normalize. Specifically, the result should satisfy (to machine precision if possible):...
The Matlab version is 2012b. I am trying using the built-in GA functionality through the Optimization Tool GUI on Matlab. I want to use bit string chromosome with a given length (for example L=24) and a given way to map one chromosome to a real number (suppose the objective function is one dimensional). I have been sea...
Suppose, I have a function and want to optimize it. But if I use optim() which gives warnings(). How can I avoid these warnings of NaN? myfun<-function(par, x){ f<- sum(x)*length(x)+sum(log(gamma(par))*x)+1 return(-f) } optim(0.1, myfun, x=c(1,5,4,7,8,5,6,5,45,8)) $par [1] 4.203895e-46 $value ...
I've come across a stiff equation in solving the Circular Restricted Three Body Problem. [An object is moving considering the effect of the gravitational forces caused by two gravitational sources fixed in a 2D Space.] The equations are these: $x''=-\frac{GM_1 (x-x_1)}{\sqrt{(x-x_1)^2+y^2}^3}--\frac{GM_2 (x-x_2)}{\sqrt...
I have been trying to simulate a simple problem of taking about 100-1000 Ar molecules in a NVE (fixed vol, energy) system with equal speed but randomized velocity, and evolving them to obtain a Maxwellian speed distribution. I am choosing a Lennard Jones pair potential with no cutoff (despite being computationally expe...
I am looking for an easy to implement stabilization scheme that can be used with equal order ($P_1-P_1$ or $Q_1-Q_1$) finite elements for fluid flow. Is there something like this or should I stick to Taylor Hood elements? It appears that there are a number of methods but the ease of implementation is not quite clear.
I'm using the g2o C++ optimization library to refine a GPS trajectory using accelerometer data. The program uses a Levenberg-Marquardt optimizer over data points representing the position and orientation (vector part of quaternion) of the accelerometer. The only constraints are the accelerations in the local reference ...
I am trying to understand the stability of the forward Euler method. I read there's a model problem to see the stability. $$y'(t) = \lambda y(t) \qquad t \in (0, \infty)$$ $$y(0) = 1$$ then the book shows this: $$u_0 = 1 \qquad \text{does this come from the initial condition?}$$ then $$u_{n+1}=u_n(1+\lambda h) = (1+\la...
How can one solve the following system of linear equations in MAPLE 13?I know how to solve a linear equation with one variable floating around but not this one. $$x-2y+3z=10$$ $$3x-2y+z=2$$ $$4x+5y+2z=29$$ Any help would be greatly appreciated. Thanks In Advance.
Can you explain me how does the backward Euler method works? I have seen the formula and try to understand the method, but what I can't understand is why and how to use the Newton-Rapson method. Do you have a link to a good tutorial? Something that can help me understand it graphically? UPDATE According to what Paul sa...
Are there any existing programs that are able to compute the (approximate) distribution of eigenvalues for very large (symmetric) sparse matrices? Note that I do not need the eigenvalues themselves, only their distribution (finding all the eigenvalues is a more difficult problem), and I am primarily looking for existin...
I have a block matrix (either 2x2 blocks or 3x3 blocks) which is the covariance matrix for a joint space of two or three multivariate normal variables. ie C = [Cxx Cxy; Cxy' Cyy]; I need to compute the cholesky factorisation of this matrix (C), as well as the diagonal blocks (Cxx, Cyy, the covariance matrices of the i...
I am in search of an introduction into numerical linear algebra - or, at least, pure linear algebra - that treats the case when the input data are random variables. A typical application would be to derive an estimate for the expected numerical error when the input variables are subject to random noise. Note that this ...
The problem is as follows: We are given a graph with each edge length 1 and two pairs of vertices (a,b) and (c,d). How to find shortest paths between from a to b and from c to d, with assumption that there is a way of moving through both paths (step by step) such that in any time our agents (the one moving from a to b ...
I would like to write a simple program (in C) using Lanczos algorithm. I came across a Matlab example which helped me to understand a bit further the algorithm, however from this piece of code I can't find the way of getting the eigenvalues and eigenvectors. I can follow the algorithm but I think I must be missing some...
I was looking at a book of FEM on problems of Diffusion-Transport. $$-div(\mu \nabla u) + b \cdot \nabla u + \gamma u = f \qquad in~\Omega$$ $$u = 0 \qquad in~\partial\Omega\text{ (in the boundaries)}$$ It says that if $\displaystyle \frac{|b|}{\mu} \gg 1$ then the problem is a problem dominated by transport. Taking s...
I have seen a number of papers that propose a finite-difference method and then show the numerical results for it. Without providing a rigorous analysis(can be some summary or note or whatever, just no proofs involved) one can say method is of "second order". So to establish convergence the author would pick a point on...
In general, Dirichlet boundary conditions won't be satisfied exactly for FEM for non-homogeneous boundary conditions. The FEM codes I've seen set the degrees of freedom to interpolate the Dirichlet boundary condition but I haven't found any mathematical justification for this. It seems to me that setting essential boun...
I know the boundary condition is usually a tricky question. However, I am testing a finite-difference scheme for the equation of the form $$u_t=a(x)u_{xx}$$ that I know the analytical solution of. So if I specify the Dirichlet boundary condition, I can see the perfect convergence with a desired rate, but if I specify t...
I've been studying this FEM theory and for the parabolic problems, there's the analysis of stability of the $\theta$-method. I followed the analysis and they get this CFL (Courant-Friedrich-Lewy) condition $$\lambda_{max} \simeq Ch^{-2}$$ What does this CFL condition means? How can I understand this?
I need detailed explanation of the formula below A2=I1*A1*I2 I suppose this formula computes matrix A2 on a coarse grid and here A1 is original matrix on fine grid. So A1 is given, but I don't know I1 and I2. That is why I am asking where I can get these matrices I1 and I2. In "Briggs, Multigrid Tutorial, SIAM, 2000...
I need to learn and utilize a finite volume automated solution package for a project I'm working on and have narrowed it down to these two packages. I was wondering if anybody has experience of both packages and could perhaps comment on a comparison. Considering the similar goal of both packages I am a little surprised...
I need some hints on how to solve this diffusion equation ($\alpha, k_1,k_2$ and $k_3$ are constants): $$ {\partial P \over \partial y} + k_1 {\partial P \over \partial t} + \alpha P = {1 \over k_2} {1 \over x}{\partial \over \partial x} \left(x k_3 {\partial P \over \partial x}\right) $$ With boundary conditions: $P...
I want to simulate on my computer the solution of the heat equation in 3 space dimensions with Cauchy initial data, that is $$\partial_t u=Tr[A(x)\cdot \Delta u], u(0,x)=u_0(x) $$ where $u_0\in C(\mathbb{R}^3,\mathbb{R})$. Even if $A$ is constant I'm not sure what's numerically the best way to do this but I'm sure thi...
Let $X_t$ be an Ito process $$ dX_t=a(X_t,t)dt + b(X_t,t)dW_t $$ where $W_t$ is a Wiener process. A numerical approximations of the solution of this equations is proposed by Milstein: $$ X_T=X_t+a(X_t,t) \Delta t+ b(X_t,t)\Delta W_t+ \frac{1}{2}b(X_t,t) \frac{\partial{b(X_t,t)} }{\partial{x}} \left( \Delta W_t^2 - \...
When it is preferable to use Bernstein polynomials to approximate a continuous function instead of using the only following preliminary Numerical Analysis methods: "Lagrange Polynomials", "Simple finite differences operators". The question is about compairing these method.
I am using the Fast Marching Method (FMM) to calculate shortest "distance" (traveltime) from some points. The way FMM works is: I keep a velocity function in RAM: V(xi,yj,zk). I also keep a priority queue of all points on the front sorted on their V value. I repeatedly propagate the first point in this queue one step o...
I need to numerically evaluate the integral below: $$\int_0^\infty \mathrm{sinc}'(xr) r \sqrt{E(r)} dr$$ where $E(r) = r^4 (\lambda\sqrt{\kappa^2+r^2})^{-\nu-5/2} K_{-\nu-5/2}(\lambda\sqrt{\kappa^2+r^2})$, $x \in \mathbb{R}_+$ and $\lambda, \kappa, \nu >0$. Here $K$ is the modified Bessel function of the second kind. I...
I am reading a book on numerical methods and the square of the discrete $L^2$ norm is defined as $$||x||^2_2=h\sum_1^Nx^2_i$$ Every point gets a "weight", which is $h$, thus this is like an average over the squares of the values at all points. This in fact comes from the approximation of a continuous integral. On the o...
Suppose I have the parabolic system $$u_t=\nabla\cdot(k(x)\nabla u)+f,\quad (x,t)\in\Omega\times I$$ with Dirichlet boundary conditions $$u=g, \quad x\in\partial\Omega$$ and initial condition $$u(x,t)= h,\quad t=0.$$ Often times in engineering, we are more interested in the asymptotic (steady state) behavior of this P...
I have a $4\times 4$ matrix and I want to use Jacobi iteration on it. Right now the spectral radius is higher than $1$. I know that the method is guaranteed to converge if the matrix is diagonally dominant. I can't do any reordering that would make the matrix diagonally dominant. Is it sensible to try to get as close a...
$A$ is a $n \times n$ symmetric positive definite (SPD) sparse matrix. $G$ is a sparse diagonal matrix. $n$ is large ($n$ >10000) and the number of nonzeros in the $G$ is usually 100 ~ 1000. $A$ has been factorized in the cholesky form as $LDL^T$. How to update the $L$ and $D$ efficiently when $A$ becomes $A+G$?
I've heard anecdotally that when one is trying to numerically do an integral of the form $$\int_0^\infty f(x) J_0(x)\,\mathrm{d}x$$ with $f(x)$ smooth and well-behaved (e.g. not itself highly oscillatory, nonsingular, etc.), then it will help accuracy to rewrite it as $$\frac{1}{\pi}\int_0^\pi \int_0^\infty f(x) \cos(x...
I'm working on helping my friend create code to perform the Overlap Dirac Operator and have come across one part that I'm not sure what to do. I need to compute the Eigenvalues and corresponding Eigenvectors for a hermitian matrix (my test is for n=4) so that I can implement a matrix sign function $epsilon(M) = U * eps...
I am working on improving the optimization process of some demographic modeling software so it can better fit demographic models to data. We'd like to decrease optimization time. The time it takes to evaluate our objective function varies a lot, depending on the input values. The relationship between time to evaluate t...
I'd like to be independent of commercial software for my scientific work. I find a dependence an commercial packages such as Matlab and its toolboxes unsatisfactory, because I do not know if I will have access to Matlab in the future, and because I don't like the language. Therefore, I'm looking for alternatives. Fortu...
Any source of FDM schemes for the transport equation starts by explaining that explicit central differences for the equation of the type $u_t+au_x=0$ can cause oscillations and unconditionally unstable. However, I am questioning about stability of two other schemes: Crank-Nicolson and Implicit with central differences ...
Am I right that in FEM we can associate a local coordinate system with every node, not with every element?
Background I am using genetic algorithm to solve the multiple-traveling-salesman problem. It work fine when I have only one constraint (distance) for my fitness function: ie: the lower the total distance, the better are the chances of the individual to survive. But now I want to add other contraints like: time-windows...
I am looking at building/buying myself a workstation for scientific computing. I will be doing molecular dynamics simulations that are memory intensive (data on a large number of particles and a million time steps or more) and require multiple instances of the same code running (to generate an ensemble). I am new to co...
I will try one more time being more detailed and careful. Consider the transport equation of the form $$u_t+au_x=0, t\in[0,T],x\in \mathbb{R}, a>0$$ and initial condition $u(0,x)=u_0(x)$. I would like to establish stability of Crank-Nicolson scheme for that equation by computing the amplification factor. Consider the f...
Is there a piece of software that can easily take a representation of a biochemical network from a SBML file and translate it into a Petri Net? Specifically, I'm looking for something that can give me the Petri Net in the matrix representation (one matrix each for Pre, Post, etc.). Something that translates from SBML ...
I'm not sure if I did something wrong or if I just didn't understand the concept of an optimized BLAS. I'm a FEM engineer trying to optimize my setup on a small cluster computer (six nodes). I'm building everything on open source tools. My aim is to use a robust setup which allows me to manage large mechanical simulat...
So I've been debating whether or not I should bother learning Python. From speaking with my professors, Matlab seems to be the common language used in applied mathematics/computational science as far as academia is concerned; while in industry, my professors (esp. those who have worked in industry) have said learning c...
We currently use PORTA software to find the list of facet-defining inequalities (FDI) for polytopes that we work with. For certain polytopes, PORTA works fine. But because it is a serial algorithm (uses Fourier-Motzkin) we sometimes encounter cases where the analysis simply takes too long and we have to force the pro...
I have a multi-variable convex continuous function which is not differentiable. I am interested to know about different numerical techniques, possibly also references to them, used for this. Read the following only if you want to know the function I want to minimize (this is a concave function, I want to maximize it, ...
I've got a second order nonlinear ODE (nothing fancy), but the BC are a little odd to me: $y'(0) = 0$ $y \rightarrow y_a$ as $x \rightarrow \infty$ What's a good numerical method for solving this? Thinking of MATLAB, but I'm open to libraries in C/C++ if there are any. Thanks!
I am trying to represent the result of a non-linear function in a small basis, given another small basis that does a good job a representing the argument of the function. More specifically, there is a non-linear map, $$ f: \left< r \middle| \rho \middle| r \right> \longrightarrow \left< r \middle| V \middle| r \right...
I don't think the title is very accurate , sorry for that. I simulate bodies in space using two timestep: the TIMESTEP is the Δt wich I use to make the calculation and XTIME is the number of times I make the calculation I want the each visible step to be 7 days , the Δt will be 86400 (seconds) and XTIME 7 , so it'll ...
I have not implemented these elements before, but I like their reduced cardinality compared to (e.g.) a tensor product of Lagrange interpolants, which is very "overcomplete" (especially for orders>2) I think they are not complete. My test program takes a quad and builds the $14 \times 14$ mass (projection?) matrix cons...
I am a PhD student in Scientific Computing and over the past few months, I spent a good amount of time learning Python and C++ the right way. I feel that I have learnt C++ well and I can use Python to do what I want if I keep a good reference book around. I also know MATLAB enough to prototype my ideas and get solution...
Does anyone know of a variant of the CMA algorithm that is suitable for an asynchronous parallel implementation? The conventional version of the algorithm allows one to evaluate the fitness function at different points in parallel, but one has to wait until all computations are finished before starting the next iterati...
I am trying to implement the following optimization (from this paper) in Matlab using fmincon: $\min_\omega\omega'\Sigma\omega$ subject to $\min_Ur_p \geq r_0$ where $\Sigma$ is a positive definite matrix and $\omega$ is a vector of weights that sum to 1. Also: $r_p=\alpha'\omega$ and $U$ can be thought of as the sp...
I'm entirely new to the notion of computational science, and am looking for a good starting point. I understand that there's no objectively best language, but I'd like to learn a language that has an unarguably strong and prominent presence in regards to computational science — one considered to have exceptional capabi...
I posted this question earlier on stackoverflow, where it was closed as off-topic. I hope it survives here. I our climbing gym, the routes need to be re-set from time to time. The following rules apply: We have climbing holds with a number of different colors in varying quantities. - When a route is set in a sector, n...
I've implemented fractran and playing with sequences iteratively in C. https://mathworld.wolfram.com/FRACTRAN.html Sloan: https://oeis.org/A007542 I can generate correct results, but I would like to so do in time measured in hours not weeks... I have a 2 CPU Ultrasparc III machine (zone). pthreads improves throughput...
Can the Lax equivalence theorem (http://en.wikipedia.org/wiki/Lax_equivalence_theorem) be applied to the discretization of integro-differential equations, or does a similar theorem exist for them?
please can you help me with my code - I use Lapack to solve complex matrix (quite biq) and do it in two steps: I call zgetrf (LU factorization) and then zgetrs (solving system). But the info value for zgetrf is not zero - zgetrf fails to factorize the matrix. The info value is 2. In the manual of Intel MKL (I use Lapac...
I am looking at ways of finding the global best-fitting model to a set of data. The model is highly non-linear and has anywhere between 5 and 8 parameters. I have used particle swarm optimisation with some success, as well as Metropolis-Hastings Markov Chain Monte Carlo. At the end of any given run, there is still do...
I have these two sets of number, I also have a result. Is it possible to compute the relation between them so that I can figure out how the result is generated ? for example I have : Set A=4 6 12 25 39 41 Set B=3 7 14 26 47 48 And the result is : 2 24 29 31 32 49 Is it possible to figure out a formula for this ? An alg...
Reading today about the theory of differential forms, I was left impressed how much it reminded me of second order Finite Volume Method (FVM). I'm struggling to figure out is thinking this way just trivial or is there some deeper connection. Well, differential forms serve to generalize some concepts deeply rooted in s...
I want to populate a numpy array with values from the smooth bump function f(x) = exp ( - 1 / (1 - x^2) ) if |x| < 1, f(x) = 0 otherwise Currently I have something that works (as in gives me the right numbers on my platform) x = linspace(-1.1 , 1.1, 300) #Sample 300 points between [-1.1,1.1] bump = exp( 1 - 1...
Question What is the most efficient algorithm for finding a row of a matrix which matches a given row? This is the same as a table lookup based on multiple criteria. Context Finite Element Matrices are usually large and sparse, so storing the entire matrix in memory is an inefficient use of computer memory. As such, I ...
I have a problem of the form $$\left[\begin{array}{cc} -(\lambda+2\mu)\frac{d^2}{dx^2} & \alpha\frac{d}{dx} \\ \frac{\alpha}{\Delta t}\frac{d}{dx} & \frac{c_0}{\Delta t}I-\frac{\kappa}{\mu_f}\frac{d^2}{dx^2} \end{array}\right] \left[ \begin{array}{c} u\\ p\end{array}\right] =\left[\begin{array}{c} f\\g \end{array}\ri...
I would like to know what are the necessary and sufficient tests one has to perform in order to show the convergence of the algorithm. I have not found a good reference to state for that as I am interested in the quantity $\|u_h-u\|$ in some discrete norm as $h\to 0$. $u_h$ denotes a numerical solution on a grid with s...
I am new user of OpenFOAM, I have to generate a grid of a human body to calculate the convective heat transfer between the body and the environment. Can someone guide me please? Thanks in advance Moorz More information: My work is to apply CFD tools for the calculation of the heat transfer between the human body and th...
I have an optimization problem with linear objective function. The constraints are in two different groups. The first set of constraints are linear while the second set is nonlinear. The nonlinear constraints are in the form: $ab-cd \geq 0$. -The optimization problem should be an instance of a convex optimization prob...
I have a 2d numpy array, with shape (100,3) a = np.random((100,3)) and I want to call a function fun: b = fun(a) This function is currently defined: @np.vectorize def fun(r): if r <= 0.0: return 0.0 else: return min(2.0/(1.0 + r), 2.0*r/(1.0 + r)) and this works fun. But I would like to express this in a...
I am working with a code that solves diffusion/reaction equations on a 2D unstructured mesh. Due to the stiffness of some of the processes, I start with time steps near 1e-13, and end with a final time in the millisecond range with time steps near 1e-8. The issue appears in that the problem is also, what I would lik...
Is there a general survey on the basic algorithms for the compressed sparse rows format (like transposition, multiplication, addition, ...)? While it is not hard to write effective algorithms for that, I am not aware of any comprehensive piece of writing on these algorithmic tasks. This does not defy that many librarie...
please how can I write gradient numerically? I have an eq. $\dfrac{\partial X}{\partial t}=\nabla^2 X + u\nabla X$ I wonder how write this in 3D. Many thanks for any idea... I can find how to solve the "pure" heat eq. but so I don't know..
I am trying to solve a particular system of non linear equations written as $F(x) = 0$ in an efficient way. More specifically, $$F(x) = (I - \gamma A)x - g(x) + C$$ where $\gamma$ is a scalarconstant, $C$ is a vector constant, $A$ is a constant matrix, and $g$ is a non-linear function of $R^n \rightarrow R^n$. I am usi...
I have a numerical problem in which I need to find the values $\lambda$ for which the determinant of a matrix $A_\lambda$ is zero. (The solutions $\lambda$ will give the eigenvalues of an operator...) For that I learnt that it is better to look for the singularities of the function $\lambda \mapsto \log(|det(A_\lambda)...
please can I ask a bit stupid question? Let say I need to solve an equation in a form $\frac{\partial X}{\partial t}=\sum_k M_k * X_{n-k}$ How can I do the discrete convolution numerically? I will say I will expand X into series (FFT) and then, please? I have a layer of free surfaces on the top and bottom and from the ...
I need to solve the same sparse linear system (300x300 to 1000x1000) with many right hand sides (300 to 1000). In addition to this first problem, I would also like to solve different systems, but with the same non-zero elements (just different values), that is many sparse systems with constant sparsity pattern. My matr...
I would like to find $x$ which minimizes the following equation: $\frac{x^HAx}{x^HBx} + \frac{x^HCx}{x^HDx}$ where A, B, C, D are positive-definite. $x$ is not a very large vector (<1000 elements in size.) The problem is easily solvable as a generalized eigenvalue problem when A or C=0, but I am not sure what the best ...
I'm a physics undergrad, looking for a good introductory book on computational science, and numerical methods. Mostly I'm looking for applied books. (Simply because... in a theoretical book, if I can't see why I'm studying it, it's easy to lose motivation!) Background I have the following background: Strong backgroun...
please can I ask, how one can make from function sine series (Fourier transform) with MKL? I can do "normal" exponential FFT with MKL (Lapack of course), how can I say that I want only sine series? Many thanks
I have a convex optimization problem that is essentially a linear objective function over some linear constraints and also a semidefinite matrix in the following form: $ M= \left[ {\begin{array}{cc} a & \sqrt{u} \\ \sqrt{u} & b \\ \end{array} } \right] ...
In a numerical computation, I am required to take a multi-dimensional FFT on a distributed-memory cluster. The data is currently distributed using a distributed array in PETSc (DMDA). I initial looked at the distributed version of FFTW. However, the layout of my data does not conform to the layout used by FFTW. Theref...
I solve such a problem. Lets have a function $Y=\sum_{k=-\infty}^\infty i\hat Y e^{ik\pi y}$ and then I have a function which is defined as $X=\sum_{k=-\infty}^\infty ik^2\hat Y e^{ik\pi y}$. I know the $Y$. The $i$ is imaginary unit. How can I compute the $X$? I think I do the FFT on $Y$ and obtain thus the $\hat Y...
In order to compute the sum of a power series, we can use for loop, while loop or the analytic formula. I am wondering what is difference between those algorithms and how to improve the robustness of this question?
In http://en.wikipedia.org/wiki/Floating_point#Addition_and_subtraction, it gives an example about cancellation problem in float-point numbers, see I don't understand why it is written : The best representation of this difference is e = -1; s=4.877000, which differs more than 20%..... In this example, it uses IEEE 75...
I am trying to figure out how to write a proper job file for the Sun Grid Engine so I can run a parallel computation using Mathematica on multiple nodes. Unfortunately almost all tutorials on the topic assume using MPI, which is not the case here. In order to get this working, I need to find the answer to a few very s...
please can I ask a bit stupid question? I have a complex matrix A as a set of equations. I wanted to find the solution of Ax=b where b is vector of right-hand side. So I have called zgetrf on A (does LU factorization) and then zgetrs on A and b (solves linear system of LU matrix) from Lapack/MKL. But this ends up with...
Consider the following optimization problem: $Min \qquad C^TX$ S.t.: $\qquad AX=0;$ $x_ix_j=x_kx_t$$\quad $for some $i\neq j\neq k\neq t$ $X=(x_1,x_2,...x_n)$ and $\quad x_j\geq 0\;\; j=1,2,...,n$ Here $C=(c_1,c_2,...,c_n), c_i\geq 0$ and $A$ is the adjacency matrix. -Is this problem convex? -Can it be solved in p...
I've been working on a finite element code on unstructured methods, which I've parallelized using the Schur complement method. Here's a summary of how I did it: Assign each triangle of the mesh to a domain For each node, determine which domain it is in or whether it is on the artificial boundary Send each processor it...
I am trying to find the required specifications of a RF trap, in which a proton can be confined.(trap dimensions, voltage frequency and amplitude used, etc). I have to solve the equations of motion numerically because the potential doesn't have a closed form for this specific geometry and equations of motion can not be...
I need to solve Ax=b, but I realize that even if it is sparse, storing the matrix coefficients of my problem will take too much memory. So now I'm considering using a matrix-free method, because the same coefficients appear a lot of time in the matrix, so I could use my own private storage scheme (and increase cache ef...
On an uniform mesh of positions in space $\ (x_i,y_j,z_k)$: $$\ x_i = x_0 + i\Delta x,\quad i=0,\ldots,n_x$$ $$\ y_j = y_0 + j\Delta y,\quad j=0,\ldots,n_y$$ $$\ z_k = z_0 + k\Delta z,\quad k=0,\ldots,n_z$$ I have a velocity function: $V(x_i,y_j,z_k)$. Given a start position $(x_s,y_s,z_s)$ I can calculate the time it ...
Consider the following optimization problem: $Min\;\;\; CX$ $AX\geq b$ $x_ix_j= x_s x_t\;\;\; i\neq j \neq s\neq t$ $x_j\geq 0;$ Where $A$ is the adjacency matrix and $C$ is a constant vector. How can one check the feasibility of this optimization problem in an efficient way?
Suppose I'm solving $$\frac{d}{dx}\left(K(x)\frac{du}{dx}\right)=f \text{ in }\Omega,$$ $$u=g \text{ on } \partial\Omega$$where $K(x)$ is smooth and $$ f(x) = \left\{ \begin{array}{ll} 0 & \quad x \neq x_0 \\ 1 & \quad x =x_0 \end{array} \right. $$ I tried solving this prob...
Consider the following optimization problem: Min$_{x}$ $\qquad \sum_{(i,j,t,s)\in I_r}||x_ix_j-x_tx_s||^2$ S.t.: $\qquad x\in \mathcal{C} ;$ where $x=(x_1,x_2,...x_n)$ and $\quad x_j\geq 0\;\; j=1,2,...,n$ Here, $\mathcal{C}$ is a convex set and $I_r$ is a polynomial sized index set. Can this problem be solved in p...
If I want to do a very accurate simulation of a molecular system (e.g. 2 hydrogen atoms), then I'll want to use something like diffusion Monte Carlo to determine the energies of these atoms in different configurations. For example, if I want to create a bonding potential like the harmonic $$E = K(r - r_0)^2$$ or Morse ...
I am working with Modified Nodal Admittance representation of circuits. I am doing Model Order Reduction using PRIMA on MATLAB. I am considering these circuits as Descriptor State-Space systems. I have been working with this for quite a while. It is a guaranteed passivity preserving algorithm. However, for some circu...