instruction
stringlengths
43
28.1k
I want to know if there is any way to define the test and trial function in the way that I want instead of using the default functions. So if I want define the polynomial and basis and coefficient, how can I do it in Fenics? Here is the concept in general: I am trying to solve stochastic partial differential equation w...
I found the following simulation of an orbit given the semi-major axis of the ellipse, eccentricity, initial velocity, the mass of the object being orbited, and initial position of the orbiting satellite. The program basically starts off with the following initial conditions: $$ h \to stepSize\\ a \to semiMajorAxis\\...
This might be a naive question, but when applying a implicit discretization to a PDE with a source term, should the source be averaged in time? For example if we take the diffusion equation with a non-linear source term, $$ u_t = u_{xx}+s(x,t,u) $$ We can apply the following central difference implicit scheme to the di...
I just started working in a lab that is trying to design microfluidics devices to trap and manipulate colonies of E. coli cells. Given a 3D model of such a device created in Autodesk Inventor (or a similar program), and leaving out the cells, what would be the best way to simulate fluid flow through the channels of the...
Starting with the advection equation in conservation form. $$ u_t = (a(x)u)_x $$ where $a(x)$ is a velocity which depend on space, and $u$ is a concentration of a species which is conserved. Discretising the flux (where the flux $f=a(x)u$, is defined on the edges of the cells between mesh points) gives, $$ u_t = \frac...
I know I already posted this question and I thank you for your answers, but unfortunately I didn't find what I was looking for among them. Anyway now I'll rewrite the question more clearly, because before perhaps I've not been specific enough. I've seen that there is a way to use the finite differences method, on a car...
Looking at the stokes-iterative demo of FEniCS, after solving the linear system using U = Function(W) solver.solve(U.vector(), bb) the solution U is split: u, p = U.split() Is there a function with which I can get the indices of Uwhich contain the u solution and the p solution? For example, if U =[u1 p1 u2 p2,...] th...
I want to determine the big and small frequency seperation from timeseries data for the sun. An excerpt of the data (timeseries and power series) is plotted below. The power series is calculated in MATLAB like this: n = length(t_obs); dt = diff(t_obs(1:2)); y = fft(d_obs, n); P = y .* conj(y)/n; f = (0:n/2)/(n*dt); f ...
I've just started messing around with FEniCS. I am solving Poisson with 3rd order elements and would like to visualize the results. However, when I use plot(u), the visualization is just a linear interpolation of the results. I get the same thing when I output to VTK. In another code I am working with, I wrote a VTK ou...
In the incompressible Navier-Stokes equations, \begin{align*} \rho\left(\mathbf{u}_t + (\mathbf{u} \cdot \nabla)\mathbf{u}\right) &= - \nabla p + \mu\Delta\mathbf{u} + \mathbf{f}\\ \nabla\cdot\mathbf{u} &= 0 \end{align*} the pressure term is often referred to as a Lagrange multiplier enforcing the incompressibility con...
Consider the semi-classical laser driving two-level atom, where the laser is treated classically and the atom is treated quantum mechanically. The effect of laser on the atom is a dipole coupling: $$ i\,\dot\Psi(t)=[-\frac{\omega_0}{2}\sigma_z+\Omega(t)\cos(\omega t)\sigma_x]\Psi(t) $$ where $\Psi(t)$ is the wavefuncti...
kernel LPP is of form: $$\min_{\alpha} \ \alpha^{T}KLK\alpha \\ s.t. \ \alpha^{T}KDK\alpha = 1$$ and it eventually results in solving generalized eigenvalue problem below: $$KLK \alpha= \lambda KDK \alpha$$ It has same eigenvalues as: $$Ly=\lambda Dy$$ so here I solve the above eigen system knowing that: $$y=K \alpha...
Suppose I have a function which divides an $m$-bit unsigned integer $a$ by an $n$-bit unsigned integer $b$ and returns the quotient as a fixed-point number with $t$ fractional bits, truncating towards zero. So I have $f(a,b)= 2^{-t}\lfloor 2^t\cdot(a/b)\rfloor$, with $0 \leq a < 2^m$ and $0 < b < 2^n$. What is the smal...
I am trying to solve Ideal MHD equation using semi discrete methods, ENO spatial reconstructions and TVD RK time stepping. I am getting different steady state solutions with different temporal order. Is it correct?
I have a gas (assuming air) at $T$ = 500 K that enters a cylindrical pipe. The outlet target temperature is 330 K. There will be heat transfer via: Forced convection from the gas to the inside of the pipe, conduction through the pipe thickness, convection to the ambient air environment ($T_\infty=300$ K) and radiation ...
Let $A$ be a general symmetric matrix operator and $P$ be the unique orthogonal projection onto $\operatorname{Range}(A) = \operatorname{Null}(A)^\perp$. Analytically, the system $$Ax = Pb$$ should have a solution for any vector $b$. If we further stipulate that this solution lie in $\operatorname{Range}(A)$, the solu...
I have the following semi-definite programming problem that I want to put in a standard form in order to estimate its order of complexity. The problem is: $$ \max_{x_{i,j}}\sum_{i \in \mathbf{F} }^{ }\sum_{j \in \mathbf{F} }^{ } w_{i,j}^{+}x_{i,j}+w^{-}\left(1- x_{i,j}\right ) $$ subject to the constraints $$ C1: x_{i...
I am running a mesh independence study. I start with Mesh 1 and proceed up to Mesh 4, each time doubling the number cells in the mesh. In parallel, I am comparing my computational results to experimental data. M. 1 shows poor results. M. 2 shows a significant improvement and a good match to experimetnal results. M. 3 a...
I have a big file with 3 columns: density, dimension, value. example: 10 0.3 200 10 0.4 300 20 0.3 250 20 0.4 320 ... I am trying to draw a 3d plot - mesh with mesh() function in octave, like this: data = load ("file.txt"); mesh(data(:,1), data (:,2), data (:,3)); Problem I have is , I always get erro...
Is there an rigorous proof of ENO-WENO schemes being non oscillatory?
I am looking for a simple method to compute potential flow (then non-viscous) around an obstacle. The method I am looking for must NOT use coordinate transformation, panel methods, finite element methods; it should work just on a standard cartesian grid and it should preferably use the finite differences method. There ...
can you give me a link for a good and simple explanation of the Shortley-Weller finite-difference scheme? I tried to google it but all I get is (inaccessible) academic publications. I also tried reading the dedicated chapter (4.8) in the Wolfgang Hackbusch's book "Elliptic Differential Equations" but I found it rather...
For the ODE $$ \dot{x} = f(x) $$ we have the 2-stage, second order SSP RK scheme (Shu, Osher, Gottlieb) $$ x^{(0)} = x^n $$ $$ x^{(1)} = x^{(0)} + \Delta t f(x^{(0)}) $$ $$ x^{(2)} = \frac{1}{2} x^n + \frac{1}{2}[ x^{(1)} + \Delta t f(x^{(1)})] $$ $$ x^{n+1} = x^{(2)} $$ What is the scheme in case of the following ODE ...
I am trying to gather literature material to study how people propose to implement generic frameworks to solve partial differential equations in C++. Despite my effort to search the web, the only thing I found so far is the Programmer's Guide of OpenFOAM, which in chapter 1 and 2 gives an idea of the mapping between ma...
I am solving an elliptic boundary value problem on a subset of the rectangle [-1,1]x[-1,1]. The domain contains the line segment x=0, however this does not need to be a part of the boundary, so it is not aligned with the facets by default. I want to compute the flux of a solution function across the line segment x=0. ...
I'm trying to solve for electron and hole distribution function using Boltzmann equation with various scattering mechanisms. Since I land up with an integro-differential equation, analytical solution is very difficult. So, I am looking for general advice on where to start, and on how this problem could be solved using ...
Well, in a numerical technique test we were given the following problem: A physical phenomenon is modeled such that, $F(f,d) = A(f)/d^2 + L$; Where, $F$ is a function of frequency $f$ and distance $d$, and $L$ is random error. Function $A(f)$ is unknown. A function is given, to produce data set $(F,f,d)$. The function ...
I'm looking for a mesh generation software that is free and open source, provides a sane scripting interface for domain specification, works for complex geometries, can generate 2D and 3D meshes, What options do I have?
I plan to implement some optimization algorithms in Python, say to follow the sequence here or here. What would be a systematic approach to testing the algorithms I write, using either well-known test datasets or creating my own?
I'm looking into moving some computations of mine to a data center to get more computation power. In the context of this process, I am getting confused by the differentiation of a computation node and a CPU. Apparently some commercial software packages differentiate between the two. Is it correct to imagine each compu...
The result I'm interested in is found within "Synchronization: A Universal Concept in Nonlinear Sciences" page $333$ figure $14.3$. The peculiar fragment is also provided at the end of this post. So basically there is this dissipative coupling applied to one-dimensional array of initial conditions (horizontal axis) whi...
Problem I'm building a simple MPI Send/Recv hello world in Fortran and am running into an odd error. I want to make sure I'm not missing anything trivial before blaming OpenMPI or gfortran. In the code below I send a simple array between two MPI processes. The first few entries of the data aren't sent correctly. The...
Assume we have few terms contributing to element tensor and each requires different quadrature degree to be integrated exactly. Does it generally worth using different quadrature degrees for each term or should one use the single one with highest degree for all terms? I would guess that for sufficiently large $N$ (numb...
I am interested in implementing an moving mesh for an advection-diffusion problem. Adaptive Moving Mesh Methods gives a good example of how to do this for Burger's equation in 1D using finite-difference. Would someone be able to offer a worked example on solving the 1D advection-diffusion equation using finite-differen...
I have COMSOL and the CFD package therein available, which provides me with an all-in-one solution for solving CFD problems. I have modeled and solved the geometry shown in the pictures below, which took me roughly one hour. Now (just for kicks) I want to do the same in FEniCS and see how that goes. At this point, I am...
Which is the preferred way to import into a FEniCS (python) program a mesh which was generated in an external generator which provides sub-domain and boundary markers? I was using MeshData->MeshFunctions for that purpose, but switching to parallel mpi program I've found that those MeshFunctions are not transferred to ...
I have a 3x3 covariance matrix (so, real, symmetric, dense, 3x3), I would like it's principal eigenvector, and speed is a concern. Is there a fast algorithm for this specific problem? I've seen algorithms for calculating all the eigenvectors of a real symmetric matrix, but those routines seem to be optimized for large ...
I use RBF kernel function to implement one kernel based machine learning algorithm(KLPP), the resulting kernel matrix $K$ $$K(i,j)= \exp\left({\frac{-(x_{i}-x_{j})^2}{ \sigma_{m}^2}}\right)$$ is shown to be extremely ill-conditioned.The condition number of L2-norm comes $10^{17}-10^{64}$ Is there any way to make it we...
For model reduction, I want to compute the left singular vectors associated to the - say 20 - largest singular values of a matrix $A \in \mathbb R^{N,k}$, where $N\approx 10^6$ and $k\approx 10^3$. Unfortunately, my matrix $A$ will be dense without any structure. If I just call the svd routine from the numpy.linalg mod...
What are the strategies one can use to keep maximum number of non attacking pieces (all pieces other than pawn) on an $n\times n$ board? It is like an $n$-queen problem but here instead of only queen other pieces also come into picture. Like if I have a knight, queen, king, bishop, knight what are the best strategies t...
Currently the way I compute histograms for data is by generating grid in $N$ dimensions (where $N$ is the dimension of the data) and searching through the $M$ data points in each dimension to see in which bin each one of them fits. This is the same as an exhaustive search and takes very long if $N$ and $M$ are large (i...
I am attempting to calculate temperature of section of rock in the earth as a function of vertical position in the rock and time. Along with it I am calculating the heat flow through the rock as a function of vertical position in the rock and time. Note that this is a one-dimensional examination of the problem- imagi...
I need to assemble a matrix (in dense form, of moderate size, say dimension 1000) which is most easily expressed as the product of several (4) sparse matrices. These matrices are most easily expressed by their action (a matrix-vector multiplication routine), although I suppose it's not too hard to write them out explic...
I'm using Trilinos for a problem and I have an Epetra_MultiVector object with 1 vector of length m*n*nFrames. I need to turn it into an Epetra_MultiVector object with nFrames of length m*n. The first m*n entries need to go into the first vector, the second into the second vector and so on. I have this working fine with...
I am following the approach of Hundsdorfer from Numerical solution of time-dependent advection-diffusion-reaction equations in which they introduce adaptive upwinding. The method can adapt from pure upwind ($\kappa=1$) to pure central ($\kappa=0$) discretisation for the advection term (N.B. the diffusion term is always...
I am trying to implement a program the numerical method to solve ODE called Block BDF as explained in this article: https://waset.org/journals/waset/v38/v38-49.pdf As it is variable step-size, I need to compute the LTE (local truncation), that is $LTE=y_{n+2}^{(5)}-y_{n+2}^{(4)}$. There is a formula in the article for ...
For a relatively simple Markov chain Monte Carlo process, such as using Metropolis to find calculate thermal averages for an Ising model, how is it possible to determine whether quantities have converged? If one knows the autocorrelation time, this seems relatively simple. You just run it for a sufficiently high multip...
I have to present a working 3D simulation of an arbitrary comet in a close proximity to the Sun or to the Jupiter. In specific, I want to simulate comets D/1993 F2 and C/2011 W3, using the theoretical model I have proposed in my recent reseach. My deadline is 1st April 2014. As I see it now - I make my comet of tons of...
I am a new Matlab user and wondering if there is any built-in operator or function which could convert the hour of the year into calendar date and time for that year. For example, Hour 0 in year 2000 is 2000-01-01 00:00:00 Hour 1 is 2000-01-01 01:00:00 and so on.
Is there any way to implement an element wise contraction force (i.e., a force which causes the FEs themselves to contract onto themselves)? For example this would happen when something dehydrates. Preferably with first order tetrahedral elements, but if the only way to do it is have a vertex in the centre of the eleme...
I have a two iterative method for approximating the inverse of given square matrix $A$ whose error terms are given as follows Error estimate of method $1$: $\lVert A^{-1} - X_{k}\rVert \leq q^{2^{k+1}-3}(1-q^{2^{k+1}})^{-1}\|R_{0}\|$, $0<q<1$, $k = 0, 1,\dots$ $R_{0} = I - AX_{0}$ , $X_{k}$ is the sequence of approxi...
I'm a bit confused by the vast amount of literature on solving eigenvalue problems. I have a sparse (large) matrix which I have already factored (by Cholesky or LDU). I would like to compute few eigenvectors of this matrix associated to the smallest eigenvalues. Is there any method that is : 1) efficient in terms of co...
I'm trying to understand and implement panel methods for a two-dimensional airfoil. I haven't found yet a very detailed explanation on how to implement it, and there are some things I don't' still understand. Here it is how I would implement it, I know it is only one of many possible implementations, please let me kno...
I'm modelling a tidal harbour in Ansys Fluent and want to include a turbulence model in my simulation. I want to predict the water movements around a pontoon which is situated in the harbour. Which turbulence model should I use, a $k$-$\varepsilon$ model or a $k$-$\omega$ model? The harbour is modelled as a rectangular...
I know that ATLAS is able to optimize itself for the machine it is compiled on and thus maximum benefits are found by compiling from source. Is there any benefit to compiling LAPACK from source? It would be much easier to just install the prebuilt package.
Suppose a function $f$ can be computed such that the bound on the relative error is $R$ i.e. $f^-(x) = f(x)(1+r)$ where $f^-$ and $f$ are respectively the computed and exact value $f$ and $|r| \leq R$ I want to bound the relative error of the following derivative approximations in terms of $h$ and $R$ for a general $...
I want to determine the spectral radius of a large non-symmetric matrix $A$ whose dominant eigenvalues are a pair of complex conjugates. My first instinct was to use a power iteration with a starting vector $x$ in the complex plane. I do recall that this method tends to have trouble when the dominant eigenvalue is co...
I have been reading about Tetrahedral Mesh Refinement algorithms, but the literature covering this is very wide. My work involves implementation of different 3D computational geometry algorithms, and I have often experienced that an algorithm with very good theoretical complexity may be an implementational nightmare. A...
For an implicit scheme I want to solve system $Ax=B$, where $A$ is a non-symmetric square matrix. I want source codes of large sparse matrix solvers (e.g. LU-SGS) to use in my code which is in C language. I have tried preconditioned GMRES code from this site but its getting slow and takes huge amount of memory(sometime...
I have one algorithm that generates a feasible solution to a linear programming problem. However, it is very likely that this is not a corner point. This makes it not suitable for direct use as an initial feasible solution for a bounded Simplex solver. How can I efficiently find a corner point from this solution that I...
I use matlab/fortran to deal with some large eigenvalue problem (FEM type). For example, I use spalloc and eigs to declare and solve the problem in Matlab, could anyone give some advice on how can I do it in Fortran? any routine like spalloc/eigs?
Is there a fast nearest neighbor search algorithm that generates the nearest neighbors, not based on Euclidean distances but based on geographic distances over a set of latitudes/longitudes. The fast nearest neighbor search based on Euclidean distances though is based on spatial indexing using R-Trees, K-D Trees etc. W...
Following Hundsdorfer approach the finite volume discretisation of the advection-diffusion equation (conservative form) on non-uniform cell centered grid can be written as, $$ w_j^{\prime} = \frac{w_{j-1}}{h_j}\left( \frac{ah_j}{2h_{-}} + \frac{d}{h_{-}} \right) - \frac{w_j}{h_j}\left( \frac{a}{2}\left[ \frac{h_{j-1}}{...
Has anyone here used double precision scientific computing with new generation (e.g. K20) GPUs through Python? I know that this technology is rapidly evolving, but what is the best way to do this currently? GPU is out of scope for the popular scientific Python libraries numpy and scipy, and I had wanted to use theano ...
I am not trying to start a Language flame war here. I merely want to ask a simple question: Is there a good resource for comparisons for languages for scientific computing? By comparisons, I mean on the grounds of: Number of stable libraries which can be used. Programming Effort Speed etc. I found a couple of compariso...
I am currently developing a domain decomposition method for the solution of the scattering problem. Basically I am solving a system of Helmholtz BVPs iteratively. I discretize the equations using finite element method over triangular or tetrahedral meshes. I'm developing the code towards my Phd thesis. I am aware of so...
I want to incorporate matrix solver into my program. Is it possible to separate out any library of matrix solver from PETSc? I am working in C language. It will be very helpful if I get any library without installing PETSc. If I get it, then I will just add those source codes and will use it.
What is the difference between explicit FEM and implicit FEM exactly? According to the post here, it seems that the only difference is whether implicit or explicit time integration is used. As I remember from one book that I read, implicit FEM is where the mass is not lumped to the nodes. What are the exact definitions...
I have a set of users who have won a game ('jim', 12), ('james', 54), ('john', 76), ('dave', 22), ('garry', 34), ('stuart', 16) I want to award them a share of points based on their position in the game on a sliding scale. The 'global pot' is $100 and I would like the winner to get the most with other users getting le...
I am comparing two iterative methods for inverting random square matrices. Since the matrices are random, every test case takes both different amounts of iterations and different elapsed times. My question is, on top of mean CPU time, is the mean value of iterations taken by both the methods useful information for co...
I just started working on some Biophysics research, and I was looking around for a good MD library to use. There is one right now at the university set up in C, with openMC parallelization, but the code is so hacked together at this point that it is hard to tell what is going on. I do have access to a computing cluster...
Following from my previous question I am trying to apply boundary conditions to this non-uniform finite volume mesh, I would like to apply a Robin type boundary condition to the l.h.s. of the domain ($x=x_L)$, such that, $$ \sigma_L = \left( d u_x + a u \right) \bigg|_{x=x_L} $$ where $\sigma_L$ is the boundary value;...
I'm trying to solve this problem using genetic algorithms and am having difficulty choosing the fitness function. My problem is a little different than the original Traveling Salesman Problem, since the population and maybe also the win unit do not necessarily contain all the cities. So, I have 2 values for each unit: ...
I have an issue of finding the cut sets of large voxel sets. The voxels are assumed connected if they touch by face/edge/vertex (can vary), and ideally what I want is given any two members of the set to find a minimal cut set of voxels that separates them into two components. The sets are 'large', 10^7 upwards, so I'm ...
After doing some research, I've found that most of the literature on operator splitting methods (e.g. Strang Splitting, Fractional Step, etc.) are specifically designed for a standard problem type of the form: $$u'=(A+B)u.$$ In my application, I have a slightly different form: $$Mu'=(A+B)u$$ where $M$ is not the identi...
I have worked out some poor code to achieve the goal of 3D Delauney triangulation(random points in E3), but the time consuming is huge, and when five points are exactly (or nearly due to the round-off error) on one sphere, my code can not handle this situation properly. I use the basic data-structure which is a list of...
I want to approximate the integral: $$ I = \int f(\boldsymbol{x})d\boldsymbol{x} $$ where $\boldsymbol{x}$ is $d$-dimensional. I have a set of non-equally spaced points $\boldsymbol{x}_1, \dots, \boldsymbol{x_n}$, and the corresponding values $f(\boldsymbol{x}_1), \dots, f(\boldsymbol{x_n}$), and I would like to use t...
For 1D derivative we have \begin{equation} F(x) = \frac{\partial f(x)}{\partial x} \end{equation} \begin{equation} f(x)=\sum_{i}f_ie_i(x) \end{equation} \begin{equation} F(x)=\sum_{i}F_ie_i(x) \end{equation} where $e_i(x)$ are the FEM basis functions. We can then apply the Galerkin procedu...
I'm testing Quicksort based on Niklaus Wirth algorithm. I'm checking how much time I need to sort an array. There is interesting thing that for an array consisting elements in these sequence: 1 3 5 7 9 10 8 6 4 2 (example how an array looks like for bigger instance) 0.14 seconds - array with ...
Suppose I have a time-dependent PDE discretized by the Rothe method and FEM, like $$ \int_{\Omega} k^{n+1/2}(u^{n+1}-u^{n}) v \;\mathrm{d}x = F^{n+1/2}(u^{n+1},u^n)[v] \quad \forall v\in V_h^n. $$ What is a good way of quantifying the difference between a transient solution $u^{n} \in V_{h}^{n}$ and a stationary solu...
I was attempting to do a discrete Fourier transform through a computer program on a list of numbers. Before doing that I decided to test it by running through a list of 1000 numbers which I created by summing 20 sine waves which were created by the formula sin(2*pi*integer between 1 and 1000/ desired frequency). Based ...
I have a set of known points/nodes irregularly spaced in N-Dimensional space (N>=2), and I would like a way to generate the Delaunay triangulation of these points, and return the corresponding elements. Are there any existing meshing libraries that will do an N-D Delaunay triangulation? (I am doing this because I want...
Disclaimer In the process of typing up this question, I determine its solution. Since I went through the trouble of typing up the question in its entirety, I will post its answer as well. It may help out others who find themselves in the same predicament. Think of this as a sort of blog-post, if you will. The Goal C...
I want to develop a visual simulation of a propagating 2D wavefunction with an added attractive potential. Basically I have to numerically solve the time-dependent Schrodinger equation (PDE with x,y,t as variables) but, instead of boundary conditions, I want to have an incoming wavefunction of my choice as the initial ...
How to do transpose for trtrs (or tptrs) in blas? I want to solve: XA = B But it seems that trtrs only lets me solve: AX = B Or, using the 'transpose' flag, in trtrs: A'X = B which, rearranging is: (A'X)' = B' X'A = B' So, I can use it to solve XA = B, but I have to first transpose B manually myself, and then, agai...
I'm compiling a blas to use with scalapack. Some blases, such as openblas, are naturally multithreaded, but scalapack uses mpi, so maybe needs a single-threaded blas? My questions then are: does scalapack need a multi-threaded blas? a single-threaded blas? or it will work just fine on either because, for example, i...
I am given a $12 \times 12$ matrix $Q$ that is symmetric, invertible, positive definite and dense. I need to test if $$\det(Q) = \det(12I-Q-J) \; \; (1)$$ where $J$ is the all ones matrix. I am currently doing this with the armadillo library but it turns out to be too slow. The thing is that I need to do this for a tri...
Overview My understanding is that one should use a time step $\Delta t < \frac{h}{v}$ (where h - smallest mesh element, v - velocity) to get an accurate result. But how important is this really for the accuracy of the simulation? Is it as important as having an independent mesh? Is there even such a thing as a time ste...
Hello there and thanks for taking a look at this problem. This problem is related to my previous question and I will therefore use a similar introduction from, Choice of step size using ODEs in matlab. Introduction: I'm currently studying a 2D exciton spinor Bose-Einstein Condensate and am curious about the ground sta...
What libraries can compute dense Cholesky factorizations in distributed-memory environments (preferably using MPI). I'm using C/C++, and have access to a cluster of between 1 and 40 nodes, where each node has 12 cores. I've heard of ScaLAPACK but am interested in alternatives.
I would like to use a high-quality renderer (physically based path-tracing or MLT) to generate some images of molecular systems I have. Right now I'm just using some of the simple renderers in VMD, but I am curious if anyone has developed a plugin for something like Indigo Renderer or Luxrender? Essentially it would c...
This is maybe a trivial question, but I am stuck with the problem. Suppose we have a general graph: $$G=(V,E)$$ Each edge represents a task, each vertex represents a data for the task (hence each task works with two vertices). When two tasks with common vertex run in parallel, some computation time is lost because two ...
I have a $50000\times 50000$ matrix $A$ sparse matrix containing only 5 non-zero elements in each row. Now the problem is that the diagonal elements and the constants (in $B$ matrix such that $AX=B$) get updated after every iteration. If I go by the usual Matlab function inv or via Gauss Elimination, it takes around 13...
I'm currently looking into parallel methods for ODE integration. There is a lot of new and old literature out there describing a wide range of approaches, but I haven't found any recent surveys or overview articles describing the topic in general. There's the book by Burrage [1], but it's almost 20 years old and hence ...
I'd like to compute $u(y) = \int f(x,y) dx$, but don't see a really efficient way to do this in FEniCS. My first thought was to just assemble(f*v*dx) for two different meshes. (try1, below), but it seems I can't combine 1D and 2D meshes, and that the DG meshes have to have at least 2 basis functions in each direction,...
I'm new here so please forgive me if I lack proper stack exchange etiquette. So, I was wondering if anyone here could provide insight on a problem that I am running into with with a Hartree-Fock calculation. I wrote a code from scratch that attempts to calculate the HF energy and basis for a 1D potential that is suppo...
I want to use the PETSc library to do some numerical work on finite element and parallel computing, but I wonder what I should know first to use these libraries. Could you give me some guiding information? Any answer of comment will be appreciated. Thank you.
I have a Matrix<double> on a single core, the result of doing an MPI_Reduce. I want to do the Cholesky, so I need to distribute over multiple cores. What's the easiest/most standard way of doing this in Elemental? Do I need to MPI_Bcast it out to all nodes first, and then move it into a DistMatrix, or is there some w...
TVD (total variation diminishing) finite difference methods that produce non-oscillatory solutions are based on the total variation. In LeVeque's book the total variation of a function $q(x)$ is defined as (p. 109) $TV(q)=\sup\sum_{j=1}^N\left|q(\xi_i)-q(\xi_{i-1})\right|$ where "the supremum is taken over all subdivis...
What implementation details need to change if I use a cell average approach rather than a cell total approach for the finite-volume method? For example, consider the conservation law, $$ u_t + \mathcal{F}_x = s(x,t) $$ A cell average approach yields, $$ \frac{\partial}{\partial t}\int_{x_{j-1/2}}^{x_{j+1/2}} u(x,t)~dx ...