instruction
stringlengths
43
28.1k
I'm working on a heat diffusion problem, $$ \frac{\partial T}{\partial t}=\vec{\nabla}\cdot\left(\kappa T^{5/2}\,\vec{\nabla}T\right) $$ I know that, after discretization, the time step for the 1D case becomes, $$ dt= \frac{\rho\,dx^2}{\kappa T_{max}^{5/2}} $$ Does this imply/mean that the maximum wave speed is $$ \fra...
If you have a large multivariable ODE system, and certain processes occur at a much shorter time scale, how can you implement a solver that uses smaller time steps for state variables involved in fast processes, and large time steps for state variables involved in slow processes, while ensuring the result is still math...
generally, it is natural to use procedural programming approach (PP) to solve a partial differential equation by finite difference method (FDM). That is, one (1) defines matrices to store the properties at nodes and fluxes in between the nodes, (2) assembles linear systems based on discretization to the controlling equ...
Issue of data dependency with stencil code... How to parallelise this using openmp? I looked at the openmp manual, I figured out how to use DO ORDERED to get the same result as the serial version, but when run with openmp, it is x200 or so times slower. This is example code from the internet doing the update from neigh...
What is exactly the definition of "Straddle"? Can you please explain what do they mean exactly or a sketch? A segment P1P2 Straddles a line if point P1 lies on the one side of the line and point P2 lies on the other side. A boundary case of P1 or P2 lies directly on the line. (Taken from Introduction to algorithms 3rd)...
I have a system of 256 differential equations that I want to solve numerically. The system represents the Liouville equation, which is a first order, linear differential equation with complex numbers. What's the best method to solve this equation in parallel? Please advise. I'm a physicist, so I'm familiar with the bas...
How can we define the precision we require in a numerical differential equation solver? What is it that I have to optimize to know? And how do I know that I'm at a sufficient time-step value? For example, in those programs like Mathematica and Matlab, how does the differential equations solver know the suitable step si...
In general, is there a partial trace algorithm (ideally for systems of any size) that can be coded using basic matrix operations found in software like Mathematica or Maple? All of the methods I'm aware of seem to be suited for humans, and I am struggling to think of a way of implementing them in any programming langua...
This question interests me for a while. At one extreme, I found papers, and some thesis that were outcome of change of a single parameter in a CFD code, like in the case of "Atmospheric boundary layer" turbulence model, that was produced by a single change in $c_\mu$ constant of the $k-\epsilon$ model. On the other end...
I'm stuck on this PDE: $$\rho \cdot C \cdot \dfrac{\partial T}{\partial \tau} + u \cdot \rho \cdot C \cdot \dfrac{\partial T}{\partial r} = \dfrac{\lambda}{r^{2}} \cdot \dfrac{\partial}{\partial r}\left(r^{2} \cdot \dfrac{\partial T}{\partial r}\right) + K - \dfrac{\rho \cdot C \cdot T}{V} \cdot \dfrac{\partial V}{\par...
I have hjb equation where $V=V(x,t)$ and $u=u(x,t)$ $V_t + \sup(u) [A(x,u)V_x + B(x,u)V_{xx}]=0$ for $x$ in $[0,1]$ and $t$ in $[0,1]$ I have been able to successfuly resolve it numerically having theese boundary conditions: $V(0,t)=0$ all t in [0,1] $V(1,t)=1$ all t in [0,1] $V(x,1)=x$ all x in [0,1] I used finite dif...
I am trying to solve a set of couple ODEs: $V_l(r) - r W_l(r) - f1(r) W_l' = 0\tag 1$ $r^2 h''_l(r) + f2 r h_l'(r) + f3 h_l(r) - f4 U_l(r) = 0 \tag 2$ $\kappa (U_l + h_l) + V_{l+1} + W_{l+1} = 0\tag 3$ $\kappa (U_{l-2} + h_{l-2}) + f5V_l' + f6W_l' + f7 U'_{l-1} +f8U'_{l-2} = 0 \tag 4$ for $V_l,W_l,h_l,U_l$ and $\kap...
I have implemented Levinson algorithm for toeplitz matrix by book: Blahut "Fast algorithms for digital signal processing". Book said - modification of this algorithm for Hermitian matrices is simple job. But I could not do it. How I can modify this algorithm for Hermitian Toeplitz matrix?
In general, is there a partial trace algorithm (ideally for systems of any size) that can be coded using basic matrix operations found in software like Mathematica or Maple? All of the methods I'm aware of seem to be suited for humans, and I am struggling to think of a way of implementing them in any programming langua...
lets say I have a 5 dimensional grid where each dimension has 10 points. There are 100000 combinations. Let's say I want a subset of 10000, is there a deterministic algorithm that will choose a set of points that "covers" the region the best and converges to the limiting case of choosing every point? If I had a weighti...
Does Paraview or Visit have any filters to draw a smooth surface for a set of points?
The netlib BLAS implementation is an excellent reference, being mostly un-optimized and well documented (e.g. zgemm). However, it is in Fortran 77, making it somewhat inaccessible to those with a more modern programming education. Is there a reference-level implementation of BLAS, like netlib, in C/C++?
This is a peice of code written in Matlab: while flag==1 flag = 0; disp('end of loop'); end Surprisingly, this does not display the string. If I remove the disp statement a figure1 window appears. Can anyone explain why?
I want to do a simulation of sound waves including wave propagation, absorption, and reflection in 3D space. I did some research and I found this question in stackoverflow but it talks about electromagnetic waves not sound waves. I know I can reimplement the FDTD method for sound waves but how about the sources and doe...
Introduction: I have a vertical segment S That i want to move across a plane (Left --> Right), and find intersections with horizontal lines. Problem : The problem which i am having is the following: if the vertical segment intersects with multiple horizontal lines, as a result i'll get multiple intersections as you c...
What is a simple algorithm for computing the SVD of $2 \times 2$ matrices? Ideally, I'd like a numerically robust algorithm, but I'll like to see both simple and not-so-simple implementations. C code accepted. Any references to papers or code?
Have FETI-DP or BDDC methods been applied to alternative FEM discretizations - for example, least squares finite elements? My Google searching doesn't seem to yield many results, so I'm wondering if I've missed any field-specific papers. If not, is there a reason for this (beyond "lack of interest or funding")? Edit:...
This questions may be a bit off-topic in comp-sci. if it is needed please suggest where does it fit with. The question is regarding on how to manage all the simulation runs efficiently. let's say, for instance, a simulation requires fixing 2 parameters which has to be defined at a certain suggested value range. To fin...
I am trying to use the nonlinear fitting routines of MINPACK for fitting a rather complicated equation of state to a set of experimental data. A subset of the data is fitted fairly well to a simplified form of the EoS, which gives me some confidence that the implementation is, in principle, working. However, it seems t...
I am starting a self study course in computational fluid dynamics. I use ( An introduction to computational fluid dynamics : the finite volume method) I am learning Python programming language. The problem is that I cannot understand most things in the book what do I need before beginning this course ? Update My probl...
Problem Let's say I can write a model as the Hermitian eigensystem: $$ A x = \lambda x $$ where $A \in \mathbb{C}^{n\times n}$ is Hermitian, or as the generalized Hermitian eigensystem: $$ \tilde A \tilde x = \lambda \tilde B \tilde x $$ where $\tilde A, \tilde B \in \mathbb{C}^{\tilde n \times \tilde n}$ are Hermitian...
I would like use N-body simulation for measure a torque on an object in a liquid (helium). It's a 2D study. On the site : http://www.browndeertechnology.com/docs/BDT_OpenCL_Tutorial_NBody-rev3.html I can understand the method. But it's only for free object. How can I do for compute particles when they reached fixed wal...
I have a system of nonlinear equations of which I know it has a single root I am interested in, and has a continuum of roots I am not interested in. I am currently using Newton with line-searching in an attempt to find that single root, but the algorithm will obviously always converge to one of the roots from the conti...
Can anyone tell me some very good/efficient numerial algorthims for GPU/CUDA to compute multiplication/ between sparse matrices (its good if you can recommend me some research papers)? I googled some papers on sparse vectors, but it looks like they are more interested in the operations involves sparse matrix and dense...
I have a mixed integer programming problem. And I am current using GLPK as my solver. But I found that GLPK is good for Linear Programming problem, but for Mixed Integer programming, it requires much longer time, therefore doesn't meet our requirement. I am so seeking other software. Is there any other good open sourc...
Short version: Is it ever a good idea to use multiple languages in scientific codes? Long version: May be its just me but these days I often see scientific codes written in multiple languages. The argument is that one language is used for performance and other one for ease of use, pretty syntax, because everyone else i...
As it known, according to the Polar Decomposition, square matrix can be expressed in the next form $$M=QR$$ ($Q$ - orthogonal matrix $R$ - positive-semidefinite Hermitian matrix) I need to find this $Q$ factor for the case of $3\times 3$ matrix. For this purpose I use next well known iterative formula $$ Q_{i+1} = \fr...
Is there a master degree in HPC (High Performance Computing) in US? I am asking this question because in my early research I found no direct mentioning of HPC instead invidual courese in parallel programming , distributed computing etc in additional to cs generic core course. I did not found so far a focused program in...
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?
I have a set of equations to integrate something in time $t$. At each time step I compute a scalar field $\phi(t)$ and a potential $V(\phi)$. I should also control the conservation of energy with an equation: $E=\frac{1}{2}\left(\dot\phi^2+V(\phi)\right)$ Or numerically: $E=\frac{1}{2}\left(\left(\frac{\phi_{n}-\phi_{...
Is there an efficient storage format for general, non-symmetric sparse matrices for which one can find all non-zero entries in a given row or column in $O(d)$ time? ($d$ is the max number of non-zero entries in any row or column.) If I store an $m \times n$ sparse matrix $A$ in the compressed row or ellpack formats, I ...
I am working on a model of social interactions in mice. I have mice and boxes and a simulation that outputs which mouse stays in which box during which time period (this comes out as a mouse is selected randomly to change a box). The problem is how to obtain, in the end and from this, the meetings of two mice which wer...
I am interested in globally maximizing a function of many ($\approx 30$) real parameters (a result of a complex simulation). However, the function in question is relatively expensive to evaluate, requiring about 2 days for each parameter set. I am comparing different options, and was wondering if anyone had suggestio...
I have a sparse $5\,656\,236 * 5\,656\,236$ matrix $A$ with $166\,526\,888$ non-zero elements. The matrix comes from using the finite element method on a linear elasticity problem and is positive semi-definite. I'm trying to use the preconditioned conjugate gradient method to solve it, particularly, the pcg() function ...
I'm trying to write an efficient bilinear (2D)-interpolation, after reading some recipes, as a fortran-mex for Matlab that is used extensively throughout a long algorithm of solar image processing, and therefore is one of my main bottlenecks. My 1st attempt work but is slow. See code below. Any advice that can speed u...
In my last question I noticed a peculiar error when solving the Poisson equation using finite volume method (FVM), Peculiar error when solving the Poisson equation on a non-uniform mesh (1D only) finite volume method. This is actually only one equation in coupled system of non-linear equations. The other equations in ...
There are two general approaches to representing solutions in the discontinuous galerkin method: nodal and modal. Modal: Solutions are represented by sums of modal coefficients multiplied by a set of polynomials, e.g. $u(x,t) = \sum_{i=1}^N u_i(t) \phi_i(x)$ where $\phi_i$ is usually orthogonal polynomials, e.g. Legen...
I'm working on translating a discontinuous Galerkin code from MATLAB to C and I'm at the final point where I need to solve a sparse system. I've taken a course in C before but I'm very rusty and wasn't all that good to begin with. I've used LAPACK before but was wondering if there are better options out there. My profe...
I need to numerically determine the convergence order of Euler's method for various step-sizes. I am unsure how to go about doing this. Here is the question: Problem statement: $\frac{dy}{dt}=\alpha t^{\alpha - 1}, y(0)=0$, where $\alpha > 0$. Use Euler's method to solve the initial value problem for $\alpha = 2.5,1,5,...
I’m going through some considerable effort to translate one of my codes from MATLAB. It’s a type of finite element code and I haven’t implemented the solver yet but comparing CPU times for simply assembling the global system between MATLAB and C, the latter is more than two orders of magnitude faster... Anyways, I have...
As we know, machine epsilon limits relative rounding error in the range of normalized floating point numbers. But it is easy to check that this is not true for denormalized numbers. My question is when one should take this subtlety into account and what sort of problems can this issue cause? Any references?
I have a sparse and symmetric matrix A(n x n). The method Lanczos tranforms matrix A into tridiagonal and symmetric matrix T and the Lanczos vectors in matrix V. From there how do I compute k smallest or largest eigenvalues and corresponding eigenvectors?
I am not sure if this is the correct place to ask this question! Is there a data set such as the University of Florida Sparse Matrix Collection which is produced from stencil operations? Or is there a way to generate such sparse matrices, maybe using Matlab?
I have an oscillatory, decaying function that can be decomposed as $$\sum_k e^{iz_kt} $$where $z_k$ are complex. What I want is the imaginary parts of all of the $z_k$'s with some range of real parts. I could do a fourier transform and extract the widths of the lines, but I don't know how to handle the case that the l...
This question popped up today in our group meeting. Suppose you are given a cloud of N points in 2D and each is associated with a velocity vector. These points are associated with particles on a 2D interface and velocities are obtained via simple particle tracking. The interface we are studying is not "clean" in the se...
I’m implementing a finite element code (translating from a working MATLAB version, so I have results to compare to) and for some odd reason, some of my computations are only accurate to around 6 decimal places. I’m working with doubles and PetscScalars and I’ve double and quadruple checked my code and am fairly certain...
You can calculate the electric potential over every point in a defined space by solving Laplace's equation. To do this in a computer program you set up an 2-d array/ matrix and loop the internal points applying the following formula: $$\phi(x,y)= \frac{\phi(x_{i-1},y_j)+\phi(x_{i+1},y_j)+\phi(x_i,y_{j-1})+\phi(x_i,_{j+...
I am reading Stephen Wolfram's "A New Kind of Science". At present, I cannot understand how the cellular automata illustrations on p79 are created. In the patterns, the active cell, representing the head, appears to change orientation between up and -45 degrees (towards bottom right). However, none of the rules seem to...
I have this problem in my textbook: Suggest efficient algorithm for solving system of linear equations with cyclic three-diagonal matrix, that is of the form: \begin{bmatrix} a_1&b_1&0&\cdots&0&d_1\\c_2&a_2&b_2&0&\vdots&0\\0&\ddots&\ddots&\ddots&0&\vdots\\\vdots&\vdots&c_{n-2}&a_{n-2}&b_{n-2}&0\\0&\cdots&\cdots&c_{...
Hej, I want to simulate a partial differential equation (a modified Cahn-Hilliard equation, but the details do not matter much. The questions also applies to the diffusion equation). I'm looking for a good framework to do heavy numerics. My requirements are: No license costs (matlab is no option, because we do not hav...
Background I am solving the unsteady heat equation in 3D using an alternating direction implicit (ADI) method. This means that I am solving three different tridiagonal systems within a single timestep (once for each cartesian axis). The size of these matrices is on the order of 10^5 x 10^5. Although each direction's A ...
I’m currently having some issues with my routine for the linear advection-diffusion problem. The model problem is as follows: $$ \nabla\cdot(\mathbf{s} u) - \nabla\cdot(\kappa\nabla u) = f, \;\;\;\text{in}\;\Omega \subseteq \mathbb{R}^{2} $$ $$ u = g_{D} \;\;\;\text{on}\;\Gamma_{D} $$ The boundary is purely Dirichlet i...
Can the Levenberg-Marquardt algorithm be used for minimization and not fitting? Usually we input the derivative of the function we want to fit in the minimizer. Now if I assume I have an objective function $f(t;a,b,c)$ (which I want to minimize with respect to the parameters $a,b,c$). Then I would not see a way to inp...
I am working on numerical method of Multigrid. What's the available implementation(solver) (actually used in scientific computation) of multigrid method?
I'm looking for analytic solutions to time dependent fluid flow problems (can be compressible or incompressible, Euler or Navier-Stokes equations). The main thing though is that I'd like there to be 'interesting' physics going on and for this 'interesting' physics to develop as time proceeds. I'm fine with having sourc...
In general (and in real application), suppose I am using a randomized algorithm (e.g. Use MCMC to sample from a distribution and then compute $E(f(x))$ for some function $f$) Assume my algorithm will face every possible input and I use a pseudo-random generator to provide randomness. Shall I derandomize my algorithm by...
I'm trying to numerically invert the following integral transform: $$F(y) = \int_{0}^{\infty} y\exp{\left[-\frac{1}{2}(y^2 + x^2)\right]} I_0\left(xy\right)f(x)\;\mathrm{d}x$$ So for a given $F(y)$ I need to approximate $f(x)$ where: $f(x)$ and $F(y)$ are real and positive (they are continuous probability distribution...
I was wondering if the use of incompressible flow approximation for fluid flow in heated pipes is reasonable. A previous question (Definition of incompressible flow) seemed to focus on Natural Convection heat transfer. It does not seem to apply to Forced Convection problems where the fluid is heated as it moves in a pi...
I'm writing a code using continuous piecewise linear finite elements on triangular grids to solve the diffusion-reaction problem. the source function f is a Dirac mass at the center. How can i compute the mesh in order to have the dirac in the baricenter of almost one triangle of the mesh? thanks
I'm solving a heat conduction problem in cylindrical coordinates with a composite cylinder made of two different materials. Essentially the cylinder is split into a central cylinder of material A, surrounded by an annulus of material B. My mesh is set up so that a control volume boundary aligns with the interface betwe...
I have a numerical computation problem which requires solving nonlinear equations (with long integers) in multiple precision. I tried an MPFR C++ wrapper from this link by Pavel: mpfr C++ wrapper by Pavel The wrapper can be downloaded here: mpfrc++-3.5.6.zip However, there is precision loss in the solution when handlin...
There is one 3D-diffusion IBVP for sphere (Dirichlet problem with zero conditions on the surface of sphere). The equation has the following view: $$\frac{\partial u}{\partial t}=\operatorname{div}\left(A(r,\varphi,\psi)\nabla u(r,\varphi,\psi,t)\right)+f(r,\varphi,\psi,t) ,$$ where the matrix $A$ is skew with variable ...