instruction
stringlengths
43
28.1k
Suppose I have the following interesting function: $$ f(x) = \sum_{k\geq1} \frac{\cos k x}{k^2(2-\cos kx)}. $$ It has some unpleasant properties, like its derivative not being continous at rational multiples of $\pi$. I suspect a closed form does not exist. I can compute it by computing partial sums and using Richards...
I have a code similar to this: import numpy as np import multiprocessing as mp a = np.zeros((4, 4)) # 4x4 array containing zeros def f(x, y): # uses scipy functions # takes long to compute #result = <someValue after calculation> global a a[x][y] = x+y # simple example function # since f takes l...
I am having trouble with calculating a mean of vector with sufficient accuracy. My current solution which works but it quite slow and has unpredictable performance: mean_sum = mean = math.fsum(values) / n values = values - mean mean = math.fsum(values) / n while np.abs(mean) > np.finfo(np.float32).eps: val...
How does Matlab optimization tools works? It just gets the error function and doesn't need Jacobian (first derivatives) or Hessian (second derivatives)? How it is possible? If it is finite difference how it determines the value of dx for different degree of freedom?
I have an energy dispersion curve obtained from the eigenvalues of $$E(k) = \text{eig}(T e^{ik} + T^H e^{-ik} + H_0),$$ where $H_0$ and $T$ are $N\times N$ square matrices, $T^H$ is the Hermitian transpose $T$, and $k$ is the wave-vector. So, there are just 2 matrices $T$ and $H_0$ that determine the problem. I want t...
if i draw a polar plot with Octave the axes are cartessian, not polar axes. But in Matlab it seems polar axes exists for polar plots. Is there anyway to draw with polar axes in polar plots in Octave? Thanks
I am taking a Thesis-based Master degree now and I am going to choose my supervisor soon. I plan to take a PHD degree after graduation, so if possible, I wish my PHD research area could be an extension of my Master Thesis ( so that the researching experience during my Master wouldn't be wasted). Currently I am interest...
I am trying to solve a system of equations (A x = b) for 3D heat diffusion (i.e. each equation has at most 7 terms not including the constant "b" term) using UMFPACK with boost numeric bindings to C++. e.g.: namespace umf = boost::numeric::bindings::umfpack; umf::umf_solve(A,x,b); I can populate the A matrix and the ...
Software such as ParMetis or PTScotch partition a graph. When one wants to use it for mesh partitioning (for example for FEM), a dual graph whose vertices represent cells of the original mesh is usually constructed first. This dual graph is then partitioned. I was wondering why one cannot simply interpret the connectiv...
Let $f(x)=\frac{1}{5}x^5+\frac{1}{3}x^3+x-1$ Show that $f$ has only one zero $r$ in interval $(0,1)$ To find approximation of $r$ we apply Newton's method $x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}$. Show that for every $x_0\in(0,1)$ this method converges. Show that order of convergence is exactly quadratic First one is ...
I want to integrate a function over a radial domain $D=\{r<r(\theta)\}$. The change to polar coordinates yields: $$ \int_D f = \int_0^{2\pi} \int_0^{r(\theta)}f(r,\theta)rdr d\theta $$ so I tried calculating each integral using trapezoidal quadrature: $$\int_a^b f(x)dx \approx \frac{b-a}{m} (f(x_1)+...+f(x_m)) \text{ f...
Suppose I have two VTK files, both in structured grid format. The structured grids are the same (they have the same list of points, in the same order), and there is a field, call it "Phi", in each VTK file. I want to create a third VTK file, again with the same structured grid, and plot a field that is the difference b...
I'm reading up on the Finite Element Method (Zienkiewicz's Book), so I understand better what I'm doing in FEniCS and COMSOL. Currently, I'm wondering about this: Using FEM to solve fluid flow problems, do I have to re-assemble the entire system in each iteration of the solution process? I would assume not since re-...
My current project is a reprogramming of a protein folding model involving the solution of thousands of ODEs in C++. I've been making some stop and start progress as I'm writing the solver to run totally on the GPU. I finally got it integrating but when I try to solve dC/dt=-C using the fifth order solution from the R...
I apologize if this is a vague question, but here goes: Over the past few years, functional programming has received a lot of attention in the Software Engineering community. Many have started using languages such as Scala and Haskell and claimed success over other programming languages and paradigms. My question is: a...
I want to do engineering and scientific calculations im Maxima/wxmaxima. I do not want to manually check every time if my units make sense, how can I achieve this? I'm looking at Maxima because it's free and solves equations etc. symbolically if asked.
I would like to hear about scientific codes and commercial packages utilizing meshless methods like Element-Free Galerkin based on Moving Least Squares functions. By "serious" I mean they could be used to solve problems comparable e.g. in size to those solved by FEM. It's already more than fifteen years since their inc...
There is a least-squares problem. It can be solved using backslash in Matlab. If Ax = b, then x = A \ b. Let's assume that I have the same problem, but all x must be non-negative (>=0). How can I solve this problem in Matlab by analogy with the previous one (without non-negativity constraints)? I think it can be someho...
I am trying to find a good way to handle the following problem: Let C be an N by 3 array (corresponding to points in $\mathbb{R}^3$). There is a method I am interested in testing which requires constructing, for i=1....N, a matrix $A_i$ of size $n_i <<N$ and a vector $b_i$ of size $n_i$ using only data from the row i o...
I'm reading now Shu, C.-W. (1999). High Order ENO and WENO Schemes for Computational Fluid >Dynamics. (T. J. Barth & H. Deconinck, Eds.)Lecture Notes in Computational >Science and Engineering, 9, 439–582. doi:10.1007/978-3-662-03882-6_5 The author provides two formulations of WENO methods: finite-difference and finit...
This was so much easier in Python (so much so that I'm considering going back to matplotlib for data analysis). But really, trying to figure out ROOT and Boost graph library and mathgl makes me want to die. What I'm thinking for the short term is to somehow export my 2d array to a text file and then import that file i...
On one hand, one may seed the domain with particles and track their trajectories in the Lagrangian sense by implementing a Lagrangian particle tracking model. On the other hand, one may use the Eulerian approach and solve a scalar transport advection/diffusion equation for a passive scalar similar to what is done for t...
I have a function that is expensive to evaluate whose inputs are n-dimensional (n is the order of a dozen or two). I need the output of this function at each node and each time step for a PDE simulation. I know that the portion of the n-d space sampled is small since n-1 of the inputs are species mole fractions. I ...
I'm trying to solve a multipole system. It involves a matrix of 3x3 tensors $A_{ij}$ and a vector of 3-tuples $\mathbf v_i$. $$\left(\begin{matrix} A_{11} & A_{12} & \cdots & A_{1n}\\ A_{21} & A_{22} & \cdots & A_{2n}\\ \vdots & \vdots & \ddots & \vdots\\ A_{n1} & A_{n2} & \cdots & A_{nn} \end{matrix}\right) \left(\be...
Given iterative method: $x_{n+1}=0.7\sin x_n +5 = \phi(x_n)$ for finding solution for $x=0.7\sin x +5$, I want to estimate $|e_6|=|x_6-r|$ as good as possible, with $x_0=5$, where $r$ is exact solution. This method obviously converges, because $\phi$ is contraction mapping, so $r=\phi(r)$ is a fixed point. So, with mea...
I'm searching for a way to generate a mesh that consists mostly of the same elements and i mean not only the same type, but the exact same size to ease the FEM-calculation. Is there a particular algorithm or software package i should look into?
I am a novice in the world of algorithms, ignorant of the taxonomy used.Please pardon me. I have two large sets of numbers A and B where A = {x| 0< x< 9999999999 } B= {y | 0 < y < 9999999999 }. The cardinality of these sets is more than a million. Which is the best algorithm to compute the set differences $A \setminus ...
I have a question relating to linear algebra. We have a fluid solver that solves the poisson equation for pressures. When there are areas of the domain that are entirely enclosed by Neumann conditions, the matrix has a nullspace and we must correct for this. We keep around a mask of the enclosed regions, and in each it...
The question is about the first-order exponential integration method described in this article. Consider a system of ordinary differential equations $$y'(t) = -A\,y(t) + \mathcal{N}(t, y), \qquad y(0) = y_0,$$ where $\mathcal{N}$ is a nonlinear function. The solution can be approximated using the exponential (explicit)...
The conjugate gradient method suffers from an accumulation of errors as it continues. For this reason it is unwise to use it as a direct solver. My question is, would it help to recalculate the residual every 5 or so steps in an attempt to mitigate these sorts of errors even when used as an iterative solver? I've not h...
Having multiple streams of pseudo-random numbers known to be independent and with a uniform distribution I want to do Monte Carlo simulations in parallel. In other words, one thread will have a full-period independent and uniformly distributed stream of pseudo-random numbers. Each thread will consume these numbers in f...
Say, I want to use the UPC code Water Supply Fixture Unit tables in my software that I'm writing ... is it okay or there will be copyright issues?
Let's assume that I have a comsol model for solving time-dependent problem. In order to find initial value for one variable I need to solve simple algebraic equation before starting simulation, therefore I added Global ODEs and DAEs module to the model. Now it works good, but it seems like equation from Global ODEs and...
I want to simulate capacitor with Comsol by using Poisson's equation in genaral and weak form. How can I specify boundary condition for this case?
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?