instruction
stringlengths
43
28.1k
I have a nonlinear system of algebraic equations of special kind: $$ \begin{array}{rcl} x_{i}+y_{i}+z_{0,1}+c_{i,1}z_{1,1} & = & d_{i,1}, \\ x_{i}^2 + y_{i}^2 + z_{0,2} + c_{i,1} z_{1,2} + c_{i,2} z_{2,2} & = & d_{i,2} \\ \ldots & = & \ldots \\ x_{i}^{m} + y_{i}^{m} +z_{0,m}+c_{i,1} z_{1,m} + \ldots + ...
In my research I have come across the following integral \begin{equation} f = \int_0^{2\pi} \text{d}\theta \exp\left\{\frac{3}{2}(h_1 \cos^2\theta + h_2 \sin^2\theta + 2 h_{12} \sin\theta \cos\theta)\right\} \end{equation} where $h_1$, $h_2$ and $h_{12}$ are constants of order unity, but which can be either positive or...
Is there a way to partition a mesh consisting of 20 noded hexahedral elements for parallel processing? I used METIS for partitioning mesh with 8 noded hexahedron elmements, which works fine but i don't know how to extend this to 20 noded element mesh. My Fortran code is as follows, which works fine for 4 node quad and ...
Strassen’s Matrix Multiplication algorithm has theoretical performance of $ O( n^{log_2 7}) $. Regular MM algorithm has performance of $ O( n^{3}) $. At certain sizes of matrices (lets call it $n*n$), Regular MM works better. However, once size $n*n$ is breached, Strassen’s MM works better. Question: at what size of th...
I'm beginning to learn Comsol Multiphysics as part of a modelling course in my masters degree. Currently, we are modelling a circuit with a spark gap, which presents some problems for me. I'm using a 0D domain with some global equations defined, and I'd like to model the spark gap as a resistor with a very high resist...
I need to simulate the movement of a large number of agents. The processes that govern the agents' movement are complex and so the entire process requires parallelisation. The output from this simulation needs to be visualised in 3D. As I will be running this simulation across many different nodes (MPI or even MPI+GPGP...
I am solving $u_t=u_{xx}+u_{yy}$ with a solver which is locally $O(dx^2+dy^2+dt^2)$. I use the following norm for the error between the numerical vector solution and the analytical solution $$||e||_2=\sqrt{dxdy\sum_{i,j}^{N_1,N_2}e_{ij}}=\sqrt{dxdyN_1,N_2O(dt^2+dx^2+dy^2)}$$ Now I want to test the rate of convergence, ...
Does some of you know a mesh partitioner that assures non empty subdomains? For METIS, ParMETIS and Zoltan this is not the case.
I have the following problem in Finite Element Method $$ -(\alpha u')' + \beta u' + \gamma u = f$$ with $ \Omega = (0, 1)$, $ u(0) = 0 $ and $ u'(1) = 3 $ to be able to write the weak formulation of the problem do I need a lifting function? i.e., do I need to define something like $$ \tilde u = u - R$$ I'm stuck after ...
I would like to implement a Numerical Optimizer in my favorite language Go. It shall find solution(s) to this problem: maximize a function f(x) where f is non-linear and x is a real vector of dimension 10 or 20. f is real-valued. What is the best method in terms of: simplicity to implement opportunities to paralelli...
When we have a numerical model that represents a real physical system, and that exhibits chaos (e.g. fluid dynamics models, climate models), how can we know that the model is performing as it should? We cannot compare two sets of model output directly, because even small changes in initial conditions will dramatically ...
The theory behind computing a single Householder reflector to zero out part of a column of a matrix is pretty well described in Matrix Computations by Golub and Van Loan. However, the blocked algorithm in Lapack's xDLARFB routines do not match the description in Matrix Computations. The book describes computation of a ...
Given a convex quadratic function $f(x)$, to obtain a solution for which $f(x)$ has minimal value one sets $\nabla f(x)=0$, and solves for $x$. Suppose that the result of differentiation of convex quadratic $f(x)$ is $$Ax=b.$$ Does the solution $x$ satisfying the above always exist? Statement that a solution can be obt...
I read about computational science on Wikipedia, but my understanding is not very clear. Does computational science involve programming? How different is computational science from computational _____, where the blank could be any discipline (materials science, engineering, chemistry, biology, and so on)? (I will be do...
I am facing a problem where I want to find the complex roots of $f(z)=z-sin(z)=0$ numerically. There are infinitely many roots of the function, but I am only interested in the $N$ closest to the origin, or to put it more general, within a certain domain in the complex plane. The Newton-Raphson method also works on comp...
Is there public code in Matlab for solving the Laplace equation in polar coordinates in a circular domain? I tried a lot but my level of Matlab and Mathematica is not good enough, but still not quite understand the scheme. Excuse my English but I'm from Peru. Consider the equation of Laplace $\frac{1}{r}\frac{\partial...
I have some C++ code that links to matlab2008b. Are matlab 2012a and 2012b backwards compatible with 2008b? If it's not trivially compatible, are there some simple steps to make it compatible?
I am trying to understand the rebinning algorithm of the VEGAS (original publication (preprint from LKlevin) and implementation notes) Monte Carlo integration. I will try to explain first what I think I understood and then pose my questions. For simplicity, let's assume we have a 1-dimensional function $f(x)$ that is p...
I am working on estimating the position and orientation (pose) of a model (rigid object) from its silhouette in an image. For this, I have constructed an error measure between the model in its pose and the silhouette, which looks roughly like: $$ \epsilon ( \bar{x} ) = \sum_{\forall i} \| f(\bar{x}, m_i) - s_i \|^2 $$ ...
I am trying to fit the log-log plot of the cumulative distribution of a network to one of three models: Exponential (EXP) ($P(k)\sim e^{-ak}$), Exponentially truncated power law (TRU) ($P(k)\sim k^{a-1}e^{k/k_c}$), and Power law (POWER) ($P(k)\sim k^{-a}$). I know this is a low-information test, but I am simply trying ...
For positive semi-definite symmetric matrices $A,B$, how can I find an $X$ that minimizes $\text{Trace}(AX^TBX$) under the constraint: that $X$ is orthogonal. All the matrices have real entries and $A,B$ are square while $X$ is rectangular. Thanks. This is what I have: Define $B=F^{T}F$. Define $Y=FX$. You get the abov...
I have a symmetric positive semidefinite covariance matrix $A$, which is approximately computed as the output of a quadratic regression. I then need to invert $A$, but often it is close to singular. I've reduced the problem by using scaling. That is, I create a diagonal matrix $D$, with elements $D_{ii} = 1/\sqrt{A_{ii...
I am looking for a method to solve the matrix equation $$ DXa = Xb $$ where $D\in \mathbb{R}^{n\times n}$ is diagonal, $a, b\in \mathbb{R}^{n}$ and $X$ is the unknown orthogonal $n\times n$ matrix such that $X^TX = I$. The matrices $a$ and $b$ have unit norm, and $D$ has diagonal entries of unit magnitude, so that the ...
Solutions to PDEs over irregular domains can be computed using the finite difference method by the introduction of so called body fitted coordinate systems where the coordinate lines are aligned to the domain boundary. The benefit of the idea is that the finite difference method can be applied directly to the problem i...
I want to perform $k$-Nearest Neighbor Search in multidimensional space, but not using for example $L_2$-distance. I want the user to specify some "similar"-pairs examples and then perform a search using this information. What algorithm can I use for this?
Hello scicomp community, I have worked in the area of graph algorithms using frameworks such as NetworkX (Python), JUNG and YFiles (Java). I am now entering the area of parallel and high perfomance computing. For a new project, I am looking for a C++ graph library with the following features: has an intuitive interfac...
For the 2D Poisson equation, there exist on finite-difference mesh, some code taking $O(n \log(n))$ operations to solve it on a mesh with $n$ nodes. They rely on Fast Fourier Transform or Block Cyclic Reduction. Is there anything as fast on unstructured meshes? I am afraid no, but fast solution of Poisson equation on u...
I am dealing with a tricky integral that exhibits NaNs at certain values near zero and at the moment I am dealing with them quite crudely using an ISNAN statement which sets the integrand to zero when this occurs. I have tried this with the NMS library in FORTRAN (the q1da routine - q1dax is no different) and with the ...
I'm interested in an advice for efficient data structures for cell browsing in unstructured cell-based finite volume CFD. One example that I encountered (in dolfyn cfd code) goes like this (I'll show relevant segment) \begin{listing} do ip=1,Ncel ... do j=1,NFaces(ip) k = CFace(ip,j) ...
Some background: define a process $Y_t=\frac{1}{t}\int_0^tX_sds$, where $X_t$ is a standard Brownian motion. Then I define a function $u(t,X_t,Y_t)$ and require it to be a martingale. Thus, by applying Ito formula and setting drift to zero I end up with a following p.d.e.: $$u_t+u_{xx}+\frac{1}{t}(x-y)u_y=0$$$x,y\in \m...
In principle, I know finite differences. In university, we discussed it and derived consistency and boundary conditions. But I am still left with a big question. How to design a good finite difference scheme? What should I do, that my solution does not oscillate or makes other weird things. When I look at a scheme, ho...
So the Cholesky decomposition theorem states that that any real symmetric positive-definite matrix $M$ has a Cholesky decomposition $M= LL^\top$ where $L$ is a lower triangular matrix. Given $M$, we already know there are fast algorithms to calculate its Cholesky factor $L$. Now, suppose I was given a rectangular $m\...
Suppose I have the following MATLAB code. syms a b c1 c2 c1 = a + b + pi*b c2 = a + b + 0.5*b Then c1 gets evaluated to a + b + pi*b and c2 to a + (3*b)/2 However, I need MATLAB to calculate double-precision values for the coefficients for a and b and not just symbolic expressions. How do I do this? e.g. I want c1 ...
Aside from extra computational cost due to having to compute both fluxes over a certain region, is there any downside to blend two flux evaluations for a hybrid scheme in a finite volume method? The flux evaluation would look like this: $\mathbf{F}_{i+\frac12} = \Lambda_{i+\frac12} \mathbf{F}^c_{i+\frac12} ...
I am looking for flexible and easy to learn mesh framework which provides data structure for representing and manipulating meshes in 2D i 3D. I've already found a few: MSTK https://software.lanl.gov/MeshTools/trac OpenMesh http://openmesh.org/ It should work both on windows and linux in C++ and be open source or free...
I have the following boundary value problem: $$-(\alpha u')' + \gamma u = f $$ in $\Omega = (a,b)$ with b.c. $u(a) = u(b) = 0$ and $\alpha > 0, \gamma ≥ 0$ and $f:(a,b) \to \Re $ The weak formulation I got is $$ \int_a^b \alpha u' v' + \int_a^b \gamma uv = \int_a^b fv~~~~~\forall v\in V=H^1_0(a,b)$$ Then to discretize ...
I'm having a difficult time understanding the difference between the linear algebra packages MAGMA and PLASMA from just a quick glance. It looks like MAGMA is oriented towards GPU's and vector coprocessors, while PLASMA is oriented towards a vanilla multicore system. But I'd appreciate an explanation comparing them, an...
When evaluating cylindrical harmonics, one needs to evaluate trigonometric functions $\cos(m\theta)$ and $\sin(m\theta)$, potentially for large integer $m$ and $\theta\in[-\pi,\pi]$. What is the best way to do this in C code? Currently, I just evaluate at the angle $m\theta$, but I would suspect that standard libraries...
What is a good way to check if the any numerical error is occured in conjugate gradient algorithm. Additionally why is it not suggested to check error by checking A-orthogonality of search direction or checking orthogonality of residuals? Note: here by error I mean error from floating point unit of CPU because of incor...
I was wondering, before trying to do that myself, has anyone attempted to do orthonormalization of Bernstein polynomials using Gram-Schmidt? I discussed this with several people and have been told that Bernstein polynomials don't make a good basis for FEM because they are not orthogonal. I didn't use FEM, instead I mad...
According to Wikipedia the rate of convergence is expressed as a specific ratio of vector norms. I'm trying to understand the difference between "linear" and "quadratic" rates, at different points of time (basically, "at the beginning" of the iteration, and "at the end"). Could it be stated that: with linear converge...
I've been doing FORTRAN programming for 10 years and I've started using python for a few years now, mostly for data processing. I've been lucky enough to work with people that are knowledgeable python programmers and so I've learned quite a bit of practical skill. However, I feel like I'm rarely if ever thinking, if n...
I have two tables at my disposal, one work dataset and one reference dataset. Each dataset has got two columns, lets say these are fields A and B. I would like to associate the rows in the reference dataset with the rows in work dataset that are 'closest' w.r.t. some distance. I have more rows in the work dataset than ...
I'm trying to solve the steady state of a heat equation problem in 2D $\Delta u = 0$ (3D also), with the method of solving the huge system of equations that arises from the discretization of the domain. My boundary conditions are different from any example that I've been able to find. If my domain is a 2D square, I wa...
I'm trying to solve the following system of equations for the variables $P,x_1$ and $x_2$ (all else are constants): $$\frac{A(1-P)}{2}-k_1x_1=0 \\ \frac{AP}{2}-k_2x_2=0 \\ \frac{(1-P)(r_1+x_1)^4}{L_1}-\frac{P(r_1+x_2)^4}{L_2}=0$$ I can see that I can turn this system of equations into a single equation of a single vari...
Does anyone know a good library that implements basic sparse matrix operations such as transpose, SpMV eigenvalues, etc. in GPU (cuda/OpenCL)?
In my studies in computability I have come across the notion of the "machine", an abstract representation of a device that essentially computes. I have read about Turing Machines and Wolfram's binary cellular automata and I understand them.ie. the rules, states, colours, etc. and how they work. What I really don't get ...
I am trying to create a series of randomly distributed spheres in Matlab, three will be three sub-sets. I would like each subset to have a different color. I am using a structure because each sphere will also have different properties associated with it. I tried using colormap, and set(...'FaceColor'..) but am having s...
In programming dense matrix computations, is there any reason to choose a row-major layout of the over the column-major layout? I know that depending on the layout of the matrix chosen, we need to write the appropriate code to use the cache memories effectively for speed purposes. The row-major layout seems more natur...
I could not get accurate description that aids to my understanding of inner blocking size parameter that is used in many LAPACK routines(such as DGEQRT, DLARFB). Thanks
First of all, I am quite new to this field and I excuse myself in advance for any stupid content in this question. In the field of compressed sensing or deblurring I have a nonlinear optimization problem of the form $\min R(x)$ s.t. $Ax-b<\epsilon$ Currently, I solve the optimization problem using the Langrangian form...
I have been slowly learning C++ and ROOT for over a year now, in order to debug a program made with it. Now I reached a point where I can really understand that this will never become easier. Therefore I'm looking for some advices in alternatives. What I need is something that can do, plots, histogram, 2D and 3D, and t...
I'm trying to simulate basic semiconductor models for pedagogical purposes--starting from the Drift-diffusion model. Although I don't want to use an off-the-shelf semiconductor simulator--I'll be learning other (common, recent or obscure) models, I do want to use an off-the-shelf PDE solver. But even for the simple 1D ...
I have the following linear program: $$ \begin{array}{cc} \text{Maximize} & a^T x \\ \text{Subject to} & x_{\min} \leq x \leq x_{\max} \\ & \mathbf{1}^T x = 1 \end{array} $$ where $x \in \mathbb{R}^n$, $\mathbf{1}^T x$ denotes the sum of entries of $x$, and $a$ is known and has distinct strictly po...
I have a list of numbered elements 1 to N that fit into positions on a number line starting with 1. I also have constraints for these elements: The element 1 is in position 1, and element N must be at a position >= the position of element N-1. (i.e. element 2 could be at position 1, element 3 at position 7, and elemen...
I have a data-set that has four columns [X Y Z C]. I would like to find all the C values that are in a given sphere centered at [X, Y, Z] with a radius r. What is the best approach to address this problem? Should I use the clusterdata command?
I would like to know about the effect of using a higher order interpolator for the methods of characteristics. I am solving $$u_t+a(x,t)u_x=0$$ with some nonsmooth initial data $u_0(x)$ by the method of characteristics. It seems to be a great method, since I need not deal with any of the difficulties that arise from t...
I am searching for the most important literature and slide references for modeling current and future energy costs of floating-point operations and data transfers across the CPU, memory, network, and storage. I have marked this question as a community wiki, and I would prefer that you limit each answer to the followin...
I tried to search the answer and I found that method cs_multiply from this book has been adopted for the purpose of multiplication of two general sparse matrices in MATLAB. In the book it says that "The time taken by this method (A * B) is O(n + f +|B|), where f is the number of floating-point operations performed (f...
I am trying to code up logistic regression in Python using the SciPy fmin_bfgs function, but am running into some issues. I wrote functions for the logistic (sigmoid) transformation function, and the cost function, and those work fine (I have used the optimized values of the parameter vector found via canned software ...
I am modeling fracture propagation using a 2-D dynamic unstructured grid. As the fracture propagates over time, the elements move accordingly. For a given time step, I would like to interpolate the data of my unstructured grid $z_i=f(x_i,y_i)$ (where $(x_i,y_i)$ are the nodes of the unstructured triangles) to obtain th...
I'm curious to know what good numerical algorithms exist for evaluation of the generalized hypergeometric function (or series), defined as $${}_pF_q(a_1,\ldots,a_p;b_1,\ldots,b_q;z) = \sum_{k=0}^{\infty} \frac{(a_1)_k\cdots(a_p)_k}{(b_1)_k\cdots(b_q)_k}\frac{z^k}{k!}$$ In general, this series is not necessarily going t...
I am interested in learning firsthand about graph data structures but have no data to put into the database. Can anyone recommend a source for a beginner to find graph data? (Preferably a source that has nothing to do with Facebook.)
I managed to build the Voronoï diagram of n points using Fortune's algorithm. This gives me a set of half-edges, some of which being infinite (no starting point and/or no end point). I'd like to restrict this diagram to a specific polygon P, by creating new vertices at the intersections of the polygon and the inifinite...
For a kinetic Monte Carlo simulation of solids that crystallize in the diamond lattice structure, I need some efficient representation of the diamond lattice as integer(s), to store it in some array-like structure, where each array index can uniquely be mapped to a certain atom in real-space: $$ array[i] \rightarrow (x...
I have need to compute the functions: $$ f(x) = \frac{\sin^{-1}x}{x}$$ and $$ g(x) = \frac{\sin a x}{\sin x} $$ where $a\in[0,1]$ and $ x\in[0,\frac{\pi}{2}]$ and is often very small ($x\ll 1$). Are there any general ways of generating highly accurate algorithms for "special" functions like these?
I was wondering where I could get a detailed account (either in print or online) on applying a Neumann/mixed Boundary condition along the $r=0$ axis in an axially symmetric geometry. Though this is a very common task I have always struggled to find a reasonable account of it. Piecing together sparse and poorly referenc...
I am looking for efficient algorithm to interpolate values from one unstructured 2D mesh grid to another. Both grids are constructed using the same type of elements (triangles or quadrilaterals). Both meshes are created for the same geometry.
I have an mathematical theorem on the QR decomposition, which relies on the QR decomposition of an invertible square complex matrix always constructing a triangular matrix with real diagonal entries. While at least in Octave this seems to be true, I wonder this can be relied upon in practice. I am looking for an implem...
In finite difference theory, you learn, that you have to use upwinding for equations with high convection, like Burgers' equation. What does the finite volume equivalent look like? What if the convection is nonlinear like in Burgers' equation?
Where is the divide between a computational scientist and a computational X (X = some natural science or discipline)? What questions could someone ask themself to decide which is the best route for them?
I have $n$ arbitrary $p\times 1$ vectors $x_i$, and $p\times k$ matrices $A_i$, and $n$ $p \times p$ positive semidefinite matrices $S_i$, where some (often most) of the $S_i$'s are same (for example only two different $S$ matrices, one positive definite which applies to $i=1,\ldots n-1$ and semidefinite $S$ for $i=n$...
Some background: the Front-Tracking method uses a triangular surface mesh to describe the boundary between two immiscible fluids. To deal with the breakup and coalescence of the fluid interface, direct topological operations are executed on the surface mesh. Since in this case, there exists a history of topological ope...
I recently read Wolfgang's answer to the question found here and found myself wondering about a related followup question. Assume you have two sparse matrices $A$ and $B$. You need to do the matrix-vector multiplication $a = Xb$ where $X=AB$. He states in his answer that forming X is much more intensive than just d...
I have a partial differential equation of the form $$ \frac{d}{dt}f(x,t) = \Theta(x) f(x,t) \qquad \Theta(x) \sim \left[\frac{d^2}{dx^2} + k^2(x)\right] $$ subject to $f(x,t=0) = f_0(x)$, and $f(x=0,t) = f(x=1,t) = 0$. The function $k(x)$ is piecewise constant over $x\in[0,1]$. Call the $x$ intervals where $k$ is const...
First I'm not 100% sure I'm on the good stack for asking my question. I would like to get a bilinear form for linear elasticity that separate a rotational part from a pure divergence part, so starting from the Navier equation \begin{equation} \mu \nabla^2 \mathbf u +(\mu+\lambda)\nabla(\nabla \cdot \mathbf u) + \mathb...
It is stated in http://users.eecs.northwestern.edu/~yingwu/teaching/EECS510/Reading/Williams_NIPS01.pdf that the PCA mapping from $h$-dimensional data to low $k$-dimensional space minimizes $$\sum_{i,~j} d_{ij}^2-g_{ij}^2,$$ subject to orthonormality of direction vectors. Distances $d_{ij}$ and $g_{ij}$ correspond to ...
I'm solving a simple 1D heat diffusion problem $$u_t=u_{xx},\quad \Omega\times[0,T]$$ $$u=0\quad, \partial\Omega\times [0,T]$$ $$u(x,0)=f$$using a fully discrete galerkin finite element method. This effectively reduces solution of the parabolic problem into solving a recursive sequence of elliptic problems $\{U_h\}^t$...
I often see that it is common to put "more points" in the region of interest in the computational domain of the numerical method, i.e. use non-uniform grid. The proofs are usually done for the uniform grid though and then using some arguments like "the proof can be extended to non-uniform grid as well" the results show...
I have the following eliptic 1-D problem $$-\mu u'' + \beta u' = 1$$ $$u(0) = u'(1) = 1$$ where $\mu = 10e^{-5}$ and $\beta = 1$. For this specific problem I am using the following space steps $h=[0.1, 0.01]$ What surprises me is that this problem doesn't present oscillations. I think it is related to the Péclet number...
Consider a set of 7D vectors. Each vector belongs to one of four classes. After mapping to 3D with PCA and coloring each point according its class the dataset looks like as shown below: For the animated GIF version, click here https://docs.google.com/open?id=0B26-1RYIJR_oOWRmSXZyWUl4M2M What classification technique...
I have a comsol model. I want to draw a few plots for different values of a global parameter called plot_z, e.g. if plot_z can have 5 different values I want to draw 5 different plots, one for each value. In each plot I need to write the value of plot_z parameter in the plot title. I have typed many expressions such as...
I am solving $Ax=b$ for a huge sparse positive definite matrix $A$ using the conjugate gradient (CG) method. It is possible to compute the determinant of $A$ using the information produced during the solve?
I am new to the PETSc package. I have a ~4000x4000 matrix A in matrix-market format and I want to get PETSc to solve this using multiple processors. I know how to solve the system on a single processor, but I don't know how to distribute the matrix and vectors among different processors. Is there a simple set of ins...
I would like to know the which is more advantageous when it comes to solving nonlinear hyperbolic equations, Finite Element or Finite difference methods? Which method will be better in capturing shocks? Is it possible to provide a detailed answer/references? Also, I want to solve problems with non-reflecting boundary c...
Assume that we are given a block matrix of the form: $$ M = \left[ \begin{array}{cc} A & b \\ b^T & c \\ \end{array} \right] $$ where $b$ is a column vector. and $c$ is a scalar. Schur's complement of $A$ in $M$ is given by: $$ s = c - b^T A^{-1} b $$ Assume that we know $A$ is invertible and we want to check if $M$...
Does somebody know about any tool for simulation and visualization of magnetic fields either of permanent magnets or solenoids, that can be used on Mac OS X? Maybe there is some software for Linux, but is open-source and can compiled for Mac OS X? I want to have something like a canvas at which I can put the magnets, m...
I've just started a thesis on nonlinear dynamics which entails numerical analysis of the Duffing oscillator (DO). It's basically just a second order ODE, or equivalently a set of ODEs. Say, after integration, I have data that looks like this: I need to write an algorithm that 1) analyzes the data, 2) outputs the perio...
If I have the following problem $$-\mu u'' + u' = 1$$ with boundary conditions $u(0) = u'(1) = 1$ in the interval $\Omega = (0,1)$. The exact solution is $$u(x) = x + 1$$ Will the FEM approximation with piecewise linear functions ($\mathbb{P}^1$) have a very small (or no) error? If so, how to think about it to have an...
Computational science remains uncommon in many computer science departments, particularly in universities without an engineering school. Is it not considered part of the standard computer science curriculum?
I wrote a program/library which I used to obtain results in an article. (Here it is, but my question is general.) I have tests that I run regularly using ctest (it takes a few minutes to run). In order to reproduce some tables or figures in the article, I have to construct a script or a simple driver program, that runs...
Parallel computation is frequently modeled using a deterministic local rate of computation, latency overhead, and network bandwidth. In reality, these are spatially variable and non-deterministic. Studies such as Skinner and Kramer (2005) observe multi-modal distributions, but performance analysis seems to always use e...
Suppose a configuration $X\in\mathbb{R}^{n\times 2}$ is output of PCA on some high-dimensional data $Y\in\mathbb{R}^{n\times h}$. Note that this PCA is performed by $$X=Y\cdot U,$$ where columns of $U$ are eigenvectors of $Y^TY$ corresponding to its 2 dominant eigenvalues. Since $X$ is a result of PCA, then $X^TX=diag(...
I asked this question before but did not have any luck with an answer. It might be a student level question but I need to understand that with possibly some help. I am considering the hyperbolic equation of the form $$u_t+\frac{x}{T-t}u_x=0$$ and some initial data $u(x,0)=u_0(x)$. I would like to claim that this is a w...
I have a feeling my question is a very basic one, but I am not at all well versed in computational sciences. My equations are of the form: $$ y \in \mathbb{R}^3 \\ \dot{y}(t) = f(y(t)) \\ y_1(0) = a \\ y_2(T) = b \\ y_3(T) = c \\ $$ Is there a known method to numerically solve such a set of equations?
The use of DDM in FEA makes parallel solution of the whole analysis e.g. assembly, solver etc possible. DDM splits the model in domains and runs them in parallel. Since there are interconnected nodes between domains, Will DDM give unreliable result? Also, is there any other factor that can affect the correct solution r...
Say I have a function function u = somefxn(f,n) where f is some function, say f = pi^2*sin(pi*x), and n is the number of discretizations (let n = 1024) on the interval $[0,1]$. In my code I've written h = 1/n %n = 1024 x = 0:h:1 %discretizations But what if the user uses y or z in the function instead of x? How do ...
I have a large number of parallel processes and a large integer $n$, and want to randomly partition the integers $[0,n)$ among the processes with only $O(1)$ communication. One nice way to do this would to generate a pseudorandom permutation $\pi \in S_n$ represented as a small function, so that only the random key/see...
I have a function with a number of arguments, but some of them are optional. 1.) If when the function is called, some are left empty, how do I code it so that it defaults to a specific value? 2.) What if of 5 arguments, 3 are optional, how can the code recognize which one to set to default? For example: function [u, v]...
I am currently trying to solve nonlinear constrained minimization problem as implemented in matlab "fmincon" function. My expectations are, minimize(fun1,x0,uB,lB,fun2) where x0 is initial state, fun1 is function that needs to be minimized, uB are upper bounds, lB are lower bounds and fun2 is function that provides vec...