instruction
stringlengths
43
28.1k
[ question reposted from https://math.stackexchange.com/questions/786612/solving-a-linearly-constrained-sparse-linear-least-squares-problem ] Given the system of equations $Ax=b$, subject to $Cx\le d$ where $A$ is an $n\times m$ matrix (with $n>m$) and is very large and sparse. As an example $A$ can have $3126250\times...
I try to solve a system of coupled PDEs using FEM. Unfortunately, the originating matrix has very poor condition. After days of double checking and thinking, I suspect the following reason: Given a PDE a * Laplacian(u) + b * u = 0 For FEM, one has to calculate two operator matrices, one for Laplacian(u) and one for u....
This is a bit of a long shot, but I was hoping somebody might have some insight (not sure of a better forum than here but open to suggestions). I have implemented the optical flow algorithm from the paper An Improved Algorithm for TV-L1 Optical Flow. I've tried to stick to exactly the same parameters as the article exp...
I have a choice of two options, analysing and implementing Lattice Boltzmann methods or traditional Navier Stokes based methods. I'm a CFD newbie and I have a rough idea (though not rigorous enough to produce a code) from my fluid mechanics classes about Finite Volume, Finite Element and Finite Difference methods. I am...
I noticed that Python does not have a good datatype for rational numbers, certainly not for algebraic numbers like $\tfrac{1 + \sqrt{2}}{3}$ or the real root of $x^3 - 5x + 7$. They have the fractions data type and I was able to hack a solution to my particular problem from there using elaborate arrangements of matric...
I have a geometry and a finite element method where there are a couple internal interfaces across which I want to enforce some fairly simple jump conditions. One recommendation I've gotten has been to align the mesh with the interfaces and generate zero thickness elements along the interfaces, so that every nodal point...
I asked the same question on mo.se and it was suggested that scicomp would be a better forum for it. So here it is: I am writing code for solving linear equations of the form $$A_{n\times n}\cdot x=1_n$$ where $n$ is on the order of $10^6$ and $A$ is a symmetric matrix with approx $10^3$ nonzero entries in each row. T...
Suppose am solving the heat conduction equation in 1d with Dirichlet boundary conditions. The thermal conductivity $k$ is a non constant function. So $-(k(x)u'(x))' = f(x)$ The value of $k$ enters the discretization only through its values at the faces of the control volume $k_{i+1/2}, \; k_{i-1/2}$, and not at the ce...
In this paper, the theory behind the isotropic-nematic phase transition is discussed. Furthermore, an algorithm is given to calculate some properties of this phase transition. I have written a program in C which gives me the free energy, pressure, chemical potential and nematic order parameter for a given concentratio...
I would like links to resources which provide codes for scripting (preferably in python) for high performance computing. I'm looking for sample codes and examples which can, (1) automatically create various input files based on the ranges provided for input values or by performing combinatorics of input values (ex: ato...
The code below basically illustrates my problem. It is a test code for a pendulum. I solve it using a method suggested on https://stackoverflow.com/questions/12926393/using-adaptive-step-sizes-with-scipy-integrate-ode). Now I want to plot points at a range of evenly spaced times to show the fact the dynamic nature of t...
Jacobian-Free Newton-Krylov (JFNK) methods, and Krylov methods in general, can be very useful because they don't require explicit storage or construction of a matrix, only the results of matrix-vector products. If you do actually form the sparse system, there's many preconditioners out there for you. What is available ...
I am writing my undergrad thesis on the harmonic oscillator on a lattice. So far I have implemented the Metropolis Monte Carlo algorithm to generate trajectories $x_j$ for $0 \leq j < N$, where $N$ is the number of time lattice divisions. I get a pretty good histogram for $|\psi(x)|^2$ and it matches the expectation fr...
There are several libraries to (iteratively) solve large sparse linear equation systems in parallel on a number of CPUs. Our parallel cluster also has attached powerful GPUs, but so far, I did not find any solver that can use CPUs and GPUs in parallel to solve a sparse linear equation system. MAIN QUESTION: Are there a...
Is there a C++/C implementation of the Appell series? GSL and Boost do not seem to have this function.
I am trying to reconstruct a 3D surface given the normals of the unknown surface. Reading through this paper on section 4 they say [...] denote the surface by $z(x,y)$. The directions of the normals are given by $n(x,y) = (p,q,-1)^T$, with $p = z_x$ and $q = z_y$ which denote the partial derivatives of $z$ with respec...
I'm looking for software recommendations for an electrostatic simulation: I have a 3d object of uniform, high conductivity, separated from its environment by a high-resistance skin. Inside that object is a dipole, and I want to calculate the strength of the dipole's generated electric field on the surface of the object...
I have a distance matrix (square, symmetrical, non-negative, dense). I want to split the objects into two well-connected groups. Mathematically speaking, I want to group (re-arrange) the rows/columns so that when the matrix is viewed as a 2x2 block-diagonal matrix, the diagonal blocks are "close to zero". Again: Given ...
Is there a way to achieve "one cancels the other" semantics (http://www.investopedia.com/terms/o/oco.asp) for qsub jobs submitted to Sun Grid Engine? That is, I submit two (or more) jobs and when one of them runs it cancels the others? Two examples... Say I can run for 4 hours on N ranks or 2 hours on 2N ranks. If both...
I am trying to implement the algorithm presented in this paper which tries to recover a matrix that represent a less noisier dataset of the intensities of the pixels of a set of images. In this case the noise comes from the specularities and shadows of the material of the objects in the images. I have little (or no) ex...
Is it possible to use test and trial functions from two different function spaces (defined over two different meshes) in a single weak form? Under what conditions can I do this (eg., each term in the form has functions belonging to only one of the spaces)? Essentially, I need this to model heat transfer in a block with...
After realizing that Gauss-Seidel is extremely slow for my simulation, i wanted to try GMRES and luckily found the C++ code here without diving into the theory. The size of the matrix in my case is nxn where n=50,000. However, I even cannot initialize the matrix to zero because the computer freezes while initializing i...
In methods like gmres or bicgstab it could be attractive to use another Krylov method as a preconditioner. After all they are easy to implement in a matrix-free way and in a parallel environment. For example, one could use a few (let say ~5) iterations of unpreconditioned bigcstab as a precontioner for gmres, or any ot...
How do we define the matrix for GMRES, if we do not want to solve the boundary elements but only the interior ones. I am using pentagonal elements so in a row there are 6 elements (cell itself + 5 fluxes) which means that in a row boundary elements are also accounted. But I need to make the matrix square according to t...
I have the following non-linear equation: where $w0=0.25,w0=0.5,w0=0.75$. I have to prove that if $k$ is a root, then also $−k$ is a root and that there exists only one $k∈(0,1)$ root, but my MATLAB code doesn't return any solution. Using wolframalpha I have computed the derivative of w0 and obtained, the constants w0...
I'm looking for a good way to partition a large, fairly high-dimensional dataset in order to perform fast kNN searches not just in the full $N$-dimensional space, but also in lower-dimensional subspaces of that space. For example, consider a point $p$ in a 3-dimensional space, $\{X, Y, Z\}$. On the one hand, I want to ...
I have a little bit of problem figuring out the relation between Fourier series and Least Squares. As far as I understand, LS is a way of minimizing the quadratic error between a measured value $y_i$ and a linear combination of functions evaluated at points $x_i$. So, in order to solve for least squares we have to have...
Say I have a vector field with non-zero curl, therefore the potential function depends on the path I choose to integrate. In this paper the authors proposed to project the vector field into a gradient field of Fourier basis functions in order to make the potential function independent of the path of integration. I unde...
Could you tell me please how to obtain separate values of "pi" depending on the value of N (code below)? For example If I write "pi1" I will get a value of "pi" for N(1) where N(1)=100. If I write "pi2" I will get "pi" for N(2)=1000 etc. I need it to compare the calculation time and the accuracy. My CODE is: R=1; N=...
This may very well be a silly question but I'm trying to cement my understanding of the material in the SICP (http://goo.gl/QXrbtV). My intuition (common sense) says yes, but wondering from a theoretical point of view if this always holds true.
I am trying to implement a simple FEM approach, using p1 triangular elements, for solving the diffusion equation with variable nodal diffusivities and I was wondering how to incorporate the variable nodal diffusivities when computing the element stiffness matrices. I would really appreciate if someone could point me in...
$\displaystyle \frac{\partial u}{\partial t}=\alpha(x,t)\cdot \frac{\partial^2 u}{\partial x^2}+b(x,t)$ $u(x,0)=f(x)$ Initial condition $u_x(0,t)=0$ 2nd type Boundary condition $u_x(1,t)=0$ 2nd type Boundary condition There is my code in Maple for the 1st type B.C. And I really do not know, what I should change in this...
Is it possible to call an external linear solver from Abaqus and/or Ansys? This solver (which is supplied by me) would get the sparse matrix A and the right hand side vector b as inputs, and would return the solution x (with A x = b) to the program. Ideally, Abaqus/Ansys would also inform the solver about the desired a...
I have two coupled nonlinear partial differential equations of the form: $ \begin{align} \dot{u} -f(u,u',u'',v,v',v'')=0 \\ \dot{v} -g(u,u',u'',v,v',v'')=0 \end{align} $ The boundary conditions are such that I know $u$ at time $t=0$ and $v$ at time $t=-\infty$. I also know the values of both functions at the two bounda...
I have a pdb file and I would like to make a pqr one. In GROMACS, I use editconf -mead to produce the pqr file, with topol.top taken from pdb2gmx and use it to produce pdb file, then use pdb2pqr. Which one is the better? First 10 lines of PQR made from GROMACS ATOM 1 N PRO A 1 0.63000 39.63000 17.25000 -0.2...
A small nonlinear equation system (sizes around 12 ✕ 12) needs to be solved repeatedly (millions of times); each time with some variation in parameters/coefficients (although the equation set is always the same). Most solvers are not very optimized for small systems like this, only achieving higher "GFlops" when using ...
I am curently using R package nleqslv for solving a non-linear system of equations with 300 variables. I need to scale this to the system with ~50k variables and naturally this does not scale very well, since the jacobian then takes up to ~30G of RAM, and I do not have access to a machine with such amount of RAM. The j...
I want to add hydrogens to some linear polymer molecules (polyethylenes). I know some working methods like using PyMOL internal function h_add. This method works, but hydrogens are added at distances from the backbone carbon atoms that vary from 1.07 to 1.1 Ångstroms. I need to control the hydrogen distances from the b...
As my experience with CFD grows, I start to gain the feeling that turbomacinery is kind of special in CFD: there are special tools tailor for it. For example, ANSYS has TurboGrid or Vista TF for turbomachinery design. And OpenFOAM has special working group for turbomachinery. I wish to know what makes turbomacinery so ...
I want to solve a poisson problem on two domains,(interface problem: Let $\Omega $ be a square, $\Omega=\Omega1 \cup \Omega2$ and let $\Omega1$ be a circle inside the square. $\Gamma$ is the boundary of circle. $$\Delta u_1=f_1 ~~in ~~\Omega1$$ $$\Delta u_2=f_2 ~~in ~~\Omega2$$ $$u_2=g~~on ~~\partial \Omega$$ $$u_2-u_...
I am trying to solve the Helmholtz equation in some complex unbounded 2D domain: $$\left( \frac{\partial^2 \psi}{\partial x^2} + \frac{\partial^2 \psi}{\partial y^2} + E \right) u(x, y) = 0$$ However, to start with, I tried doing that in the simplified domain $\Omega = [-\infty, \infty] \times [0, H]$, that is, just a ...
Consider the following: I would like to solve a differential equation in Fortran (with a Runge-Kutta routine), e.g. x'=-a*x, where a is a constant. I then want to solve this for different a. I now would like to write the code such that it can be applied to other problems. But in general I do not know what additional in...
The Fast Marching Method is a way of solving the Eikonal Equation on a discrete grid, essentially just computing a wavefront speading out from initial points, IE: The idea is that we want to compute the time at which a wavefront, moving across a field with a velocity function $F(x, y)$, reaches each point in a grid, I...
I need an accurate implementation (for use in C/C++) of the logarithm of the incomplete Beta function: $$\log \mathrm{B}(x,y;\alpha,\beta) = \log \int_x^y t^{\alpha-1}(1-t)^{\beta-1}\mathrm{d}t$$ with domain $\alpha,\beta>0$, $0\le x\le y \le 1$. I need this to avoid overflows with very large values of the incomplete B...
I like to have a list just like in Python, but for Fortran. I know that there is a generic list type. But here I would have to define a type for each data I would like into the list, e.g. one for Real*8, one for Complex*16,Dimension(:,:) and so on. I would like to put data into the list for which I do not have to defin...
In the technical report on Galahad[1], the authors state, in the context of general nonlinear programming problems, To our minds, there had never really been much doubt that SQP [sequential quadratic programming] methods would be more successful [than Augmented Lagrangian methods] in the long term... What could be th...
Reading through Tim Davis' book Direct Methods For Sparse Linear Systems, he says that matlab can use a supernodal Cholesky decomposition but never uses a multifrontal Cholesky decomposition. At least when using the backslash operator. By contrast, HSL MA57, used in many optimization codes, is a sparse symmetric indefi...
Is there a common / good way to represent graphs in Matlab and operate on them? I need to read in an image as a graph and use several algorithms of graph-theory like minimal cut.
I am trying to find the solution for the M variables in the following system. \begin{equation} 0 = C_{b} M^{b}_{x} - M^{a}_{x} k_{2a} + M^{a}_{y} \left(\omega - \omega_{a}\right)\\ 0 = C_{a} M^{a}_{x} - M^{b}_{x} k_{2b} + M^{b}_{y} \left(\omega - \omega_{b}\right)\\ 0 = C_{b} M^{b}_{y} + M^{a}_{x} \left(- \omega + \ome...
A consistency notion in constraint programming: Let $P = (X, D, C)$ be a CSP. Given a set of variables $Y \subseteq X$ with $|Y| = k -1$, a locally consistent instantiation $I$ on $Y$ is $k$-consistent iff for any $k$th variable $x_{i_{k}} \in X \setminus Y$ there exists a value $v_{i_{k}} \in D(x_{i_{k}})$ such that $...
To get a numerical evaluation of the first (K) and second (E) complete elliptic integrals: $$K(k)=\int_0^1\frac{dt}{(1-t^2)^{1/2}(1-k^2t^2)^{1/2}}, \ \ \ \ \ E(k)=\int_0^1\frac{(1-k^2t^2)^{1/2}}{(1-t^2)^{1/2}}dt$$ in a left neighbourhood of the point $k=1$. What numerical methods do you recommend to get a "good" approx...
I have a set of known points/nodes irregularly spaced in N-Dimensional space (N>=2), and I would like a way to generate the Delaunay triangulation of these points, and return the corresponding elements. Are there any existing meshing libraries that will do an N-D Delaunay triangulation? (I am doing this because I want...
Disclaimer In the process of typing up this question, I determine its solution. Since I went through the trouble of typing up the question in its entirety, I will post its answer as well. It may help out others who find themselves in the same predicament. Think of this as a sort of blog-post, if you will. The Goal C...
I want to develop a visual simulation of a propagating 2D wavefunction with an added attractive potential. Basically I have to numerically solve the time-dependent Schrodinger equation (PDE with x,y,t as variables) but, instead of boundary conditions, I want to have an incoming wavefunction of my choice as the initial ...
How to do transpose for trtrs (or tptrs) in blas? I want to solve: XA = B But it seems that trtrs only lets me solve: AX = B Or, using the 'transpose' flag, in trtrs: A'X = B which, rearranging is: (A'X)' = B' X'A = B' So, I can use it to solve XA = B, but I have to first transpose B manually myself, and then, agai...
I'm compiling a blas to use with scalapack. Some blases, such as openblas, are naturally multithreaded, but scalapack uses mpi, so maybe needs a single-threaded blas? My questions then are: does scalapack need a multi-threaded blas? a single-threaded blas? or it will work just fine on either because, for example, i...
I am given a $12 \times 12$ matrix $Q$ that is symmetric, invertible, positive definite and dense. I need to test if $$\det(Q) = \det(12I-Q-J) \; \; (1)$$ where $J$ is the all ones matrix. I am currently doing this with the armadillo library but it turns out to be too slow. The thing is that I need to do this for a tri...
Overview My understanding is that one should use a time step $\Delta t < \frac{h}{v}$ (where h - smallest mesh element, v - velocity) to get an accurate result. But how important is this really for the accuracy of the simulation? Is it as important as having an independent mesh? Is there even such a thing as a time ste...
Hello there and thanks for taking a look at this problem. This problem is related to my previous question and I will therefore use a similar introduction from, Choice of step size using ODEs in matlab. Introduction: I'm currently studying a 2D exciton spinor Bose-Einstein Condensate and am curious about the ground sta...
What libraries can compute dense Cholesky factorizations in distributed-memory environments (preferably using MPI). I'm using C/C++, and have access to a cluster of between 1 and 40 nodes, where each node has 12 cores. I've heard of ScaLAPACK but am interested in alternatives.
I would like to use a high-quality renderer (physically based path-tracing or MLT) to generate some images of molecular systems I have. Right now I'm just using some of the simple renderers in VMD, but I am curious if anyone has developed a plugin for something like Indigo Renderer or Luxrender? Essentially it would c...
This is maybe a trivial question, but I am stuck with the problem. Suppose we have a general graph: $$G=(V,E)$$ Each edge represents a task, each vertex represents a data for the task (hence each task works with two vertices). When two tasks with common vertex run in parallel, some computation time is lost because two ...
I have a $50000\times 50000$ matrix $A$ sparse matrix containing only 5 non-zero elements in each row. Now the problem is that the diagonal elements and the constants (in $B$ matrix such that $AX=B$) get updated after every iteration. If I go by the usual Matlab function inv or via Gauss Elimination, it takes around 13...
I'm currently looking into parallel methods for ODE integration. There is a lot of new and old literature out there describing a wide range of approaches, but I haven't found any recent surveys or overview articles describing the topic in general. There's the book by Burrage [1], but it's almost 20 years old and hence ...
I'd like to compute $u(y) = \int f(x,y) dx$, but don't see a really efficient way to do this in FEniCS. My first thought was to just assemble(f*v*dx) for two different meshes. (try1, below), but it seems I can't combine 1D and 2D meshes, and that the DG meshes have to have at least 2 basis functions in each direction,...
I'm new here so please forgive me if I lack proper stack exchange etiquette. So, I was wondering if anyone here could provide insight on a problem that I am running into with with a Hartree-Fock calculation. I wrote a code from scratch that attempts to calculate the HF energy and basis for a 1D potential that is suppo...
I want to use the PETSc library to do some numerical work on finite element and parallel computing, but I wonder what I should know first to use these libraries. Could you give me some guiding information? Any answer of comment will be appreciated. Thank you.
I have a Matrix<double> on a single core, the result of doing an MPI_Reduce. I want to do the Cholesky, so I need to distribute over multiple cores. What's the easiest/most standard way of doing this in Elemental? Do I need to MPI_Bcast it out to all nodes first, and then move it into a DistMatrix, or is there some w...
TVD (total variation diminishing) finite difference methods that produce non-oscillatory solutions are based on the total variation. In LeVeque's book the total variation of a function $q(x)$ is defined as (p. 109) $TV(q)=\sup\sum_{j=1}^N\left|q(\xi_i)-q(\xi_{i-1})\right|$ where "the supremum is taken over all subdivis...
What implementation details need to change if I use a cell average approach rather than a cell total approach for the finite-volume method? For example, consider the conservation law, $$ u_t + \mathcal{F}_x = s(x,t) $$ A cell average approach yields, $$ \frac{\partial}{\partial t}\int_{x_{j-1/2}}^{x_{j+1/2}} u(x,t)~dx ...
Is there any free / open source solution to search for the minimum energy path with the nudged elastic band method in combination with the Turbomole Package?
How to make Elemental Gemm run quickly? I have the following code: #include "elemental.hpp" using namespace std; using namespace elem; extern "C" { void openblas_set_num_threads(int num_threads); } int main( int argc, char *argv[] ) { Initialize( argc, argv ); const mpi::Comm comm = mpi::COMM_WORLD; c...
Quiet a lot of insight can be gained form experience, I was just wondering if anybody has seen something similar to this before. The plot shows the initial condition (green) for the advection-diffusion equation, then the solution at iteration 200 (blue) and then again at iteration 400 (red). The solution of the advect...
I have two FMU developed with different simulation tools. I would like to connect them through some variables and run a co-simulation with an open source tool as OpenModelica. This co-simulation has to be rather tight as both FMU have discontinuities. Is that possible?. Could you provide a simple sample?
In some linear program that is hard to find an initial feasible point, simplex method will fail in its phase one algorithm. But we can find such a feasible point through other method such as genetic algorithm: the problem is such solution may have many "noise" of small numbers for some coordinate. We want to use simple...
I have written a short example to run the simplex algorithm with coin-or Clp, something quite simple like this: ClpSimplex solver; solver.readLp(file_in); solver.initialSolve(); if(solver.isProvenOptimal()) { int ncol = solver.getNumCols(); const double *solution = solver.getColSolution(); for(int i=0; i<...
I would like to know which is the algorithm Comsol uses in order to correct the time step it uses. For example, when you try to solve an equation you've written in the PDE coefficient interface, and you set free time-step, Comsol automatically choose the time step in order to obtain the specified absolute error. Anyway...
CHOLMOD is very fast, but I am just wondering what kinds of size A such that it can solve Ax=b. I have a A of 200,000 * 200,000, but it outputs errors" problem too large". I am very appreciated if anyone can tell me which solver/software for numerical computing can solve such large size problem. Thanks!
I'm comparing the performance of distributed gemm, using Scalapack over OpenBLAS, with threaded gemm, using OpenBLAS. It seems quite hard for me to get scalapack to give better results than multithreaded BLAS. Is there some tweaking/optimization/configuration I need to do, or something I need to do differently someho...
I want to implement thin spline interpolation of scattered elevation data $ \{z_i(x_i,y_i)\}_{i=1..n} $ in C++. This seems fairly simple using Radial Basis Functions: $$ z(x,y) = p(x,y) + \sum_i l_i\phi(r)$$ where p(x,y) is a polynomial and $\ \phi= r^2\ln(r) $ . Requiring the interpolated surface to go exactly trough ...
Changing cholmod_* to cholmod_l_* results in the following error: sparse:error: integer and real must match the routines What does this error message mean? This message shows after cholmod_l_start(&c); cholmod_l_print_sparse(A,"A",&c) and then the following steps L = cholmod_l_analyze(A,&c); cholmod_l_factorzie(...
I am trying to solve numerically next PDE system: $$\frac{\partial c}{\partial t}=\epsilon\frac{\partial}{\partial x}(\frac{\partial c}{\partial x}+\rho\frac{\partial \varphi}{\partial x}+\frac{vc}{1-vc}\frac{\partial c}{\partial x})$$ $$\frac{\partial \rho}{\partial t}=\epsilon\frac{\partial}{\partial x}(\frac{\partia...
Given a real symmetric matrix $M$, ostensibly of "low rank", efficiently find an expression $M = \sum \alpha_i u_i u_i^T$ using the number of terms rank($M$). A 2011 StackOverflow Question Dense Cholesky Update in Python asked about doing low rank updates to Cholesky decompositions, but was answered largely with ways t...
I would like to apply Dirichlet conditions to the advection-diffusion equation using the finite-volume method. This answer, "How should boundary conditions be applied when using finite-volume method?" emphases the benefit of staying with integral form of the equations for as long as possible. This works fantastically f...
I have to write a finite volume code for Magnetohydrodynamics (MHD). I have written numerical code before but not at this scale. I just wanted to ask which will be a good choice, using a data structure (object orientated approach) with classes or just using multiple arrays for different properties, in terms of speed, s...
I want to numerically solve the non-linear diffusion equation: $$ \frac{\partial}{\partial t} T(x,t)= \frac{\partial}{\partial x}\left(T^{5/2} \frac{\partial T}{\partial x} \right) $$ I want to use finite difference approach to solve it via Crank-Nicolson method. But I don't understand how to treat the non-linear coeff...
my question is between mathematics, physics and informatics. Suppose i have an Hamiltonian (hermitian matrix) that i can diagonalize. The matrix that allows this transformation is a unitary matrix build with the eigenvectors of my Hamiltonian. Now suppose I select only the $n$ first eigenvectors of length $m$. The matr...
I'd very much appreciate if you could help me out with this as I think I'm missing something simple out or should be using alternate syntax: I am running the following Python code in FEniCS, where I solve for a variable - the solution looking as I expect it to, so no problems there, now I wish to solve a next equation ...
I am using an Euler-Euler method to model two phases - both are treated as a continuum using modified Navier-Stokes equations. One phase is air and the other is particles, that are being entrained by the air. The original geometry is very small, the airpath being 2 x 20 mm. When the mesh is scaled up 10 times (grid fin...
Monte Carlo simulations for MATLAB sometimes require a huge usage of CPU and in some cases may take a long time. MATLAB has provided some structures in order to enable the parallel processing. But I have been intrested in using the processors of the graphical card (GPU)... Is there any tutorial for using GPU in order...
I have X, Y and Z variables in matrix form, each of size n x 1. Eg.: X = [-38.0400, -38.6700, -38.9300, -39.4500...] Whenever I run the code below: % find center of X minx = find(X==min(min(X))); maxx = find(X==max(max(X))); centx = (minx + maxx) / 2; xy = Y(centx); xz = Z(centx); centx = [centx xy xz]; I'll get the...
I'm trying the Torque scheduler. I have previous experience with the LSF scheduler, and I quite like being able to use 'bsub -I make -j 12' to compile a program really quickly, i.e. running an 'interactive' job, and seeing any errors as they happen. Now, there is an interactive option in Torque, but it's really, reall...
I have some large (n~100) square matrices with entries two variable polynomials of bounded degree (roughly <20, but many entries are smaller) and integer coefficients, and I'd like to be able to compute their determinants (exactly, as two variable polynomials with integer coefficients). What method should I use? Is th...
I have a certain ODE problem that needs to be solved using Scilab. dx(1)/dt=k*x(1)-x(5) dx(2)/dt=k2*x(2)-k1*x(1) dx(3)/dt=k1*[x(2)-x(3)] dx(4)/dt=k1*[x(3)-x(4)] x(5) takes value 0 till time t0 Can anyone help me with coding this problem? Any suggestions would be of immense help.
For a project, I have to implement these two methods and compare how they perform on different functions. It looks like the conjugate gradient method is meant to solve systems of linear equations of the for $$ A\mathbf{x} = \mathbf{b} $$ Where $A$ is an n-by-n matrix that is symmetric, positive-definite and real. On t...
My code solves the incompressible Navier-Stokes equation in a conducting fluid, together with the induction equation: $ \partial_t u + u \nabla u + 2\Omega \times u = -\nabla p + \nu \Delta u + (\nabla \times b) \times b \\ \partial_t b = \nabla \times (u \times b) + \eta \Delta b$ where $u$ and $b$ are the velocity an...
I have just read "Accelerating the convergence of spectral deferred correction methods". The link is here: http://www.unc.edu/~junjia/papers/sdcgmres.pdf‎. But I wonder how to understand deferred correction method. Can you give me a description of this method? Or any other papers or books to read to understand this met...
I am interesting in solving the following nonlinear, time-dependent pde in 2 spatial dimensions (complex Gross-Pitaevskii eq): $$i \frac{\partial \psi}{\partial t} = \left[ -\nabla^2 + (1-i \sigma)(|\psi|^2-1) \right] \psi$$ The goal is to find steady state solutions for the function $\psi(x,y,t)$, for different parame...
The Parareal, PITA, and PFASST algorithms are all across-the-domain techniques for parallelizing the solution of time-dependent problems in time. What are the guiding principles behind these methods? What are the main differences between them? Can I say that one is based on another? How? What about their applications...
I have got an input series of matrices $A_1, A_2, A_3, \dots $ and the difference between $A_i$ and $A_{i+1}$ is the replacement of one single column. Before i get to know $A_{i+1}$, I have to compute $A_i^{-1} b$ for some fixed vector $b$, so I also have a series of vectors $A_1^{-1}b, A_2^{-1}b, A_3^{-1}b, \dots $ to...