instruction
stringlengths
43
28.1k
I am attempting to simulate fluid flow through a porous foam. I would like to have no-slip boundary conditions on part of the boundary and free flow conditions on the inlet and outlet. Right now I am using the Darcy-Brinkman equations: $-\mu\Delta\mathbf{u} + \mathbf{K}\mathbf{u} + \nabla p = \mathbf{0}$ $\nabla\cdot\m...
I'm Looking for an implementation of the IAPWS-IF97 water properties on C/C++. I'm aware of the library freesteam. However freesteam does not include all the properties I'm looking for. Particularly I need differential properties like dh/dp, dv/dp and in certain regions. I use a similar implementation for Octave/Matlab...
I'm currently conducting research into subway paths, but stand in front of a problem, with no programming knowledge and an extremely short time-limit. Probably the question I am asking is trivial, but I would be very happy if you could point me in the right direction or to the right forum! Having generated all possibl...
I am in the process of writing a finite element code to solve the Navier-Stokes equations using the theta method for time stepping (basically Crank-Nicholson for diffusion and forward Euler for nonlinear terms). To find the pressure I use the pressure correction method. Once I find the pressure I need to update the vel...
I wrote a program that calculates the best fit in VBA excel for the following model $$ y_k=c_1x_k+c_0+c_{-1}(x_k)^{-1} $$ solving for the best fit parameters $c_1$, $c_0$, and $c_{-1}$. However I wrote several custom subroutines to accomplish this. One subroutine calculates the moments of $x$ and $y$, another builds th...
I am trying to find the most optimized way to perform Matrix Multiplication of very large sizes in C language and under Windows 7 or Ubuntu 14.04. And searching led me to BLAS, LAPACK and ATLAS. However, I couldn't tell which one I can use? I mean BLAS Level 3 DGEMM seems like the function for my case but I couldn't f...
I am trying to predict y(t+1) of a function by using a feedforward neural network with Matlab. The inputs are the previous 3 previous values (y(t-2), y(t-1), y(t)) and the training output is the actual value I want to predict y(t+1). The "prediction" seems perfect! The output seems like a perfect copy of the original g...
I have an infinitely long cylinder defined using radius a point in 3d Axis defined using a 3d vector I have a set of points with 3d coordinates placed in a grid. I want to wrap this grid of points around the curvature of my cylinder. How to do it
Is there any (efficient) algorithm to select subset of $M$ points from a set of $N$ points ($M < N$) such that they "cover" most area (over all possible subsets of size $M$)? I assume the points are in 2D plane. The naive algorithm is simple, but prohibitive in terms of time complexity: for each subset of N points ...
I am not sure if my question is on topic but I have a piece of Fortran code that is used to perform successive over relaxation. Prior to performing successive over relaxation the author is calculating the spectrum of the matrix.There is very little documentation so I am just trying to figure out all the details for doc...
I am interested in a reference in the literature that discusses the performance of Dense Linear Algebra (blas routines) and dense linear algebra (sparse blas routines). I am interested in knowing for what combinations of size and density sparse routines outperform dense routines. I am mainly interested in a shared mem...
Given 2 vectors $\mathbf{u}$ and $\mathbf{v}$ the following are equivalent: $\mathbf{u}\cdot\mathbf{v}$ $\mathbf{u}^T \mathbf{v}$ $u_i v_i$ $v_i u_i$ $\mathbf{v}\cdot\mathbf{u}$ $\mathbf{v}^T\mathbf{u}$ Given a second order tensor (matrix) $\mathbf{A}$ and a vector $\mathbf{b}$, are the following also equivalen...
I am trying to reproduce Tang & Othmer paper which is related to excitations and oscillations in G-protein model in Dictyostelium discoideum, an amoeba species. The mathematical model in the paper is like below: where $w_1,w_2,w_3,w_4,w_5,u_1,u_2,u_4$ are biochemicals and other parameters are constants associated with...
I'm trying to implement 1D advection solver using WENO and ENO schemes. \begin{equation} \frac{\partial u}{\partial t} + \frac{\partial f(u)}{\partial x} =0 \end{equation} where: \begin{equation} f(u) = C\,u \end{equation} Discretized as: \begin{equation} \frac{u^{n+1}_j-u^{n}_j}{\Delta t} + \frac{F_{j+1/2}-F_{j...
Given a set $Q$ of $n$ points, we want to find the subset $S_\max \subset Q$ of $k$ elements that maximize the total distance between them. $$S_\max = \max_S \sum_{\substack{ i,j\in S\\ i \neq j}} d(x_i,x_j)$$ where in my case $x_i$ is a boolean vector and the distance considered is the Manhattan/Hamming distance. Is t...
I have a system of differential equations with some unknown parameters and I need to find the optimal parameter set that fits best with the data I have. For each parameter set choice (using for loops), my code solves the system of DE numerically, then extracts from the time vector a time subvector that agrees with data...
I need to invert a matrix. Of course, I'm not the first person in this situation, and I know that there's a wealth of powerful libraries out there, of which I only know a couple. That being said, there is a twist: I know that matrix inversion is (in general) numerically unstable, and I need a solution that is absolutel...
I am setting up a simple model that uses recursion to iterate between known constraints - relaxation, in other words. I need a spreadsheet that allows: A0 50 A1 =(A0+A2)/2 A2 =(A1+A3)/2 A3 =(A2+A4)/2 A4 100 It should be simple, but OpenOffice and Apple Numbers specifically forbid this. If you know of configuration...
Lets say in Graph $G$ we have two vertices $v$ and $u$, each vertex is connected to several neighbors by edges describing the distances $d_{ij}$ from these neighbors. The neighbors themselves are also connected to more vertices by such edges. If a vertex has relatively short edges and is connected to neighbors that als...
Lets say we have two things as input, $N$ scalars (measurements) that we know are erroneous to some degree (i.e. the correct values are somewhat similar). In addition, we also have a roughly more reliable order $O$ among the measurements. Using the ordering: $O = <u_1, u_2, u_3 ... u_n>$ we can deduct that with some k...
I am interested in computing only the generalized singular values, and was wondering if this was faster (and by how much?) than computing the full GSVD. In particular, I was wondering what the fastest algorithms are for computing the generalized singular values (ideally the pairs $(\alpha_i, \beta_i)$ instead of just $...
I am currently writing a small Python script to estimate the pulse duration from the optical spectrum. At the end, the idea is to observe the effects of the spectral phase on the pulse duration and shape. But for now, I cannot retrieve a well-known result without taking into account spectral phase. Indeed, a time-bandw...
To give you some context, I am currently implementing a simple finite element solver in Julia. I am getting run-times that are 70% of a Matlab code. (Both codes are essential equivalent in structure.) I've run some profiles on my Julia code and I find that most of the run-time is taken up by the linear system solver (e...
I have a PDE optimization problem, and a scalar field (which I am optimizing over) is supposed to be nonnegative everywhere in the domain. Since I am working in Fourier space for solving this problem numerically, I need to convert this non-negative constraint into Fourier domain (i.e. constraint on Fourier coefficients...
I tried using Python's matplotlib on the logarithm and here is what I got, a kind of starburst pattern. Since the angle jumps between $\theta = 0$ and $\theta = 2\pi$, contour assumes there is a contour line between those those two points. Here in in fact $\bbox[#EEEDAA,1pt]{0=2\pi}$ Perhaps instead of matplotlib.p...
I am interested in proving or obtaining a counterexample to the following conjecture. Let $\Omega\in \mathbb{R}^d$ be a bounded open domain. Let $u_d\in H^{1/2}(\partial\Omega) \times \mathbb{R}^+$. Suppose $u\in L^2((0,\infty); H^1(\Omega))$ is the weak solution of $$ \left\{ \begin{align*} u_t- \nabla \cdot \nabl...
I have four partial differential equations representing mass conservation of two compressible fluid phases (marked by subscripts $p1$ and $p2$) in two different continuum media (marked by subscripts $c1$ and $c2$) and they are coupled together by the term $T_{c1c2}$ as shown below. Continuum 1: $$\begin{align} \text{P...
Consider the following situation: There are two boundaries -- one is denoted using grey lines, and the other is denoted using black lines. The boundaries are numerically represented using "vertices", with edges assumed to be connecting these vertices, but otherwise not necessary for the calculation. At a given vertex ...
Basically, I am trying to solve the 2D poisson problem in order to learn implementation of IPDG methods. The problem states $-\nabla a(x)(\nabla u)=0\ \text{in} \ \Omega$ with $U=0$ on Dirichlet boundary $\Gamma_D$. The weak DG formulation gives find u such that $$a_{\epsilon}(u,v)=l(v)$$ where $$a_{\epsilon}(u,v)=\...
I tried to write an analysis program in python for the Millikan experiment based on a paper from Jones "The Millikan oil‐drop experiment: Making it worthwhile" However, I cannot reproduce the calculated values of this paper for the radius of the oil drops and the charges when using an iterative Cunningham correction ap...
I have created a 4-dimensional array (cell) of arrays called "a" where a{i,j,k,l} = [ v_1 v_2 v_3 v_4] for some vector v. each of the index variables runs from 1 to 10 in steps of 1. I have a total of 10000 entries in the cell. I want to reshape this cell into another cell whose dimensions are 1x10000. I want the first...
I am trying to find the minimum of this function. But I receive the following error when I run the script. What am I doing wrong: % pre allocating x=zeros(10,4); mu=zeros(10,1);% process parameter T=zeros(10,1);% spike times y=zeros(10,1);%number of spikes ...
I have been experimenting with using Autodesk CFD to investigate facade/ cladding pressures on a (rectangular) building, comparing results with cladding/ facades pressures pressures from design codes and wind tunnel results. I understand the complexities and difficulties in what I am doing generally and am really expl...
Problem Summary I am trying to estimate the (x,y) coordinates of each node in a graph, where I know the distances between connected nodes. For example Given this graph, I can define an equation for the length of each link simply using the Pythagorean theorem. $$L_{AB}=\sqrt{(X_B-X_A)^2+(Y_B-Y_A)^2}$$ $$L_{AD}=\sqrt{(X...
The Method of manufactured is commonly used for verification of computational science codes. I want to use the method for verification of Navier-Cauchy (elasticity) equations with periodic and Bloch-periodic boundary conditions. In this case, the coefficients of the PDE (material propertise) are periodic, and the form ...
I am attempting to write a matrix multiplication routine because I need to do some analysis in CUDA and I want to validate it with CPU code. I am trying to use dgemm to do this, but I seem to be doing it wrong. My matrices are constructed as 1D arrays since the same thing is done in CUDA kernels, so I am attempting to ...
I'm interested in solving an electrostatics problem in 2d case in some domain with a conductor placed inside the domain. From a mathematical point of view, I have to solve a Poisson equation with user-defined boundary conditions (let us consider a rectangular domain for simplicity) and a certain region in the domain...
When using the pressure projection method to solve the incompressible Navier-Stokes equations do we apply Neumann boundary conditions for pressure only where there are associated no-slip velocity boundary conditions? For example suppose we were trying to solve the vortex shedding problem. The velocity boundary conditio...
Objective: I am trying to simulate the following advection-diffusion-reaction equation in 2D space (x,y) and time. $$\begin{align} \text{ADR Equation: }\frac{\partial C}{\partial t} + \nabla\left(v.C - D\nabla{C} \right)= \alpha.C \end{align}$$ I discretized the above ADR equation in 2D using finite-difference implic...
Could someone please explain what is meant with e.g high precision low resolution flux. Does it mean, that I use some higher order method (still first order) but with a more complex stencil and consequently lower resolution ? While low precision and high resolution means essentially a forward or backward difference for...
Am implementing a monte carlo integration routine to compute this double integral in eqn 0.3 of page 2 of this paper 'Mobius energy of knots and unknots', Annals of Mathematics, http://www.math.ucsb.edu/~zhenghwa/data/research/pub/Mobiusenergy-94.pdf in a case where both the integrals run over a circle. $$ E(\gamma)=\i...
I am new to this community as well as to scientific programming. I programmed a simple 4th order Runge-Kutta for the 1-D Cahn-Hilliard Equation for some first simple calculations on pattern forming systems. It turned out to be extremely sensitive to the change of the size of the spatial grid. With 100 grid elements the...
I have a problem fitting a $N\times N$ ($32\times 32$ in this case) matrix in Matlab. Here is the deal I have this image, and I want to create 1 dimensional fit between the points and then be able to interpolate it in order to make it smoother. Does anyone have any idea if that can be done?
I have the following function that I want to implement in scipy.integrate.odeint def numericSolver(rv_,t,alpha=1.,gamma=1.): BVal = B_f(alpha,gamma,t) #this function returns a vector BdotVal = Bdot_f(alpha,gamma,t) #this function returns a vector matDynamics = np.array([[0.,1.,float(BdotVal[2]),0.,0.,0.], ...
Let us consider a smooth initial condition and the heat equation in one dimension : $$ \partial_t u = \partial_{xx} u$$ in the open interval $]0,1[$, and let us assume that we want to solve it numerically with finite differences. I know that for my problem to be well-posed, I need to endow it with boundary conditions a...
Let us say that I have a function like so: def f(x): return g(x)*h(x) Now, g(x) and h(x) are such that when g(x) produces a result large enough to cause overflow errors, h(x) produces a number that is approximately zero. So, the result provided by f(x) should be $0$. Would it be enough to write f(x) as follows: de...
I have a 3-D structured grid that I am trying to convert over to an unstructured grid. Here is a picture of the 2-D structured grid with the nodes shown. It is axisymmetric about the x axis (y = 0). I will rotate this to make it 3-D. My main concern in this conversion is that I need to output the volume of every cell...
I have been wrestling with how to properly deal with bonded (1-2 1-3 and 1-4) particle neighbor interactions, or whether they have to be dealt with, in the long range electrostatic solver codes (PME, SPME, etc). For instance, in the short range calculation, these interactions are typically excluded by omitting them fro...
I have a recurrence relation $$P_{n} = A_{n} P_{n-1} - B_{n}P_{n-2}$$ with given $P_{0}$ and $P_{1}$. Numerically, each $A_{n}$ and $B_{n}$ is calculated with some precision. The same applies to the $P_{0}$ and $P_{1}$. How can one estimates the error for the $n$-th term?
Objective: I am trying to solve for $C$ in 2D space (x,y) and time from following PDE. $$ \text{PDE: }\frac{\partial C}{\partial t} + \nabla\left(v.C - D\nabla{C} \right)= \alpha.C $$ Method: I discretized the above equation in 2D using finite-difference implicit scheme and as a result I get the following discretized...
How can I use Fourier Transform to solve Fisher-Kolmogorov Equation in 1D? \begin{equation} u_t(x,t) = u_{xx}(t) + u(1-u) \end{equation} \begin{equation} u(0,x) = \phi(x) \end{equation} with Dirichlet \begin{equation} u(0,t)=0 \\ u(1,t)=0 \end{equation} and Neumann boundary conditions \begin{equation} u_x(0,t)=0\\ u_x...
I am trying to do SVD of a large block-hankel matrix for model order reduction (Low rank approximation). However, I quickly run into memory issues in forming the large Block-Hankel matrix and CPU issues due to running SVD itself. In theory, it seems like we don't have to form the Hankel matrix itself. As long as we hav...
I am trying to solve $Ax=b$ a system of linear equation. The matrix $A=(a_{ij})$ is constructed as $$a_{ij}=\int_0^1\int_0^1 K(x,y)h_i(x)h_j(y) dxdy.$$ The evaluation of integral takes a lot of time, and overall computation is very slow. Can I evaluate these integrals in parallel using GPU cores? Please suggest how can...
How many CPU cycle is required to simulate a complete human body from it's very initial stem cell using classical algorithms and also is it possible to use similar algorithms for simulating stem cells themselves from their very initial atoms? How much computing these models will cost based on available hardwares today...
I have the following quadratic form I need to evaluate: $x^T A^{-1} y$, where $A$ is a sparse positive definite matrix, $x, y$ are sparse vectors. Now assume that I am given for free both $A^{-1}$ and the Cholesky decomposition $A = L D L^T$. I understand that it still will be faster to evaluate $x^T A^{-1} y$ using a ...
I am wondering how can I solve following problem. Arrange randomly $n$ points inside a square of side $a$ under the condition that the distance between any two points may not be smaller than 1. I would like to see how can it be solved.
I need to know what library, given a vector of coefficients and modulus N return the roots of polynomial modulus N. The library should support big integer. I'm coding in C++.
I’m interested in solving nonlinear elliptic boundary value problems of the type $$ -a\Delta u + f(u) = 0, $$ $$ u|_\Gamma = u_0 $$ by Newton’s method when its convergence is global and monotonic. Could you advice some references concerning this problem, containing proofs of global convergence? Newton's method takes th...
I am working on a transient heat transfer problem. The problem that I have is as the time goes the range of temperature is changing but Tecplot only use one sort of levels for contour for all of time steps. Therefore the change in temperature is not very sensible at the end of the time which transient diminishes. I am ...
I am using ANSYS Fluent 15 to simulate a case of fluid flow. In my case, I have three cell zones in my simulation, let's call them top, middle and bottom. My requirement is to put a vertical constant force in the "middle" cell zone. I can not use gravity because it is then acted in all other cell zones as well. My purp...
I had written a code a while ago which attempted to calculate $log(x)$ without using library functions. Yesterday, I was reviewing the old code, and I tried to make it as fast as possible, (and correct). Here's my attempt so far: const double ee = exp(1); double series_ln_taylor(double n){ /* n = e^a * b, where a is a...
I need to know what libraries (in C++) support polynomial arithmetic specially over a field. So I can give to it an array of coefficients of polynomial over a field and it returns the roots of polynomial over the field. It also should support big integers, as the coefficients and the roots are big integers. For securi...
W==a(x)=2*(W* x)/41; I'm attempting to make a new type of compression algorithm. A rubber band ball type. I'm trying to make a software that extracts, from that formula, the secret volumes of number sets within. By taking the the opposite formula, b(x) i should get the answer. But unfortunately, i dont. I have to searc...
Consider the following example structure of overlapping images marked A,B,C,D. The possible overlaps are marked by gray color: The structure can be represented by a weighted undirected graph (images being the nodes, edges representing overlaps and the weights representing overlap areas or time needed to process them):...
I have been struggling for two days with the following problem. I would like to do a $d$-dimensional interpolation over some data. I tried first to use polyharmonic splines, but when the size of data increase, the inversion of matrices is problematic because they are almost singular (large condition number). Therefore,...
Hello I am trying to shift points which have been previously generated in the square area. I am having a trouble with some additional conditions how they should have been shifted. xt=x(j)+2*rand()*shift - shift yt=y(j)+2*rand()*shift - shift Also I have more conditions to apply: a) xt<0 b)xt>a c)yt<0 d)yt>a d) the di...
I am trying to do analysis on a data set of atomic coordinates generated form lammps. I simulated an alpha glycine crystal in a triclinic box. The box vectors look like the following, where xy,xz,and yz, are the tilt factors. xlo = -0.34; xhigh = 40.466 ylo = -1.6283; yhigh = 49.50861 zlo = 0.77; zhigh = 3...
Ok so I am nearing the completion of my finite element Navier-Stokes solver that uses the $\theta$-method for time stepping and the pressure correction method for the pressure. I am following the notes http://ta.twi.tudelft.nl/users/vuik/burgers/fem_notes.pdf by Ir. A. Segal (page 74-75). So far everything seems to wor...
I am doing research in electromagnetics (a branch of physics) and I deal with complex numbers in my computing tasks (I use MATLAB). Let's say $z$ is a complex number. To calculate the square of the magnitude of $z$, which is $|z|^2$, I can use two different ways that are mathematically equivalent: $|z|^2 = \operatorna...
I am solving a system of linear equations, $\underline {\dot x}=\underline A\cdot \underline x$, numerically. I have done this using the popular of methods of Euler and Runge-Kutta (RK). I have noticed quite a difference between the two in accuracy to the analytic solution. What is the reason for this?
Let us start with a problem of the form $$(\mathcal{L} + k^2) u=0$$ with a set of given boundary conditions (Dirichlet, Neumann, Robin, Periodic, Bloch-Periodic). This corresponds with finding the eigenvalues and eigenvectors for some operator $\mathcal{L}$, under some geometry, and boundary conditions. One can obtain ...
I have an ODE of the form $$ \frac{dy}{dt} = -i H y \enspace .$$ where $y$ is a complex vector and $H$ is a time dependent Hermitian matrix. The norm of the solution $y(t)$ at any point in time should be 1, but due to accumulation of small numerical errors it ends up being substantially off. A solution for this proble...
I was reading about Petrov-Galerkin Enrichment Method for Darcy equations. Here are a couple papers that discuss this in detail: A Petrov–Galerkin enriched method: A mass conservative finite element method for the Darcy equation. A Symmetric Nodal Conservative Finite Element Method for the Darcy Equation. However, I ...
I need to find C/C++ libraries which offer function for computing Schur complement. I know about MUMPS and Pastix, but I need more of them to compare them in my research. Do you have any experience with other libraries?
I built a sparse matrix A at each step as follows: % 1 < DX < 120000 A = sparse(i,j,s,DX,DX,6*DX) b = (1, DX) The problem that I am dealing with is a discretization problem. I have maximum 120000 nodes. Each of these nodes have special characters and I choose only the ones that meet a (previously) defined criteria....
I managed to implement the Nearest-Neighboor Ising Model with periodic boundary conditions, it was doable. I also made a modified version of it, where the interaction would go further than the nearest neighbors. In this case the implementation of periodic boundary conditions got more complicated (matrices instead of si...
After my first course in the Finite element method I understand that elemental and global stiffness matrices are symmetric. What is the reason behind symmetry of stiffness matrices? Is it because symmetric property of the bilinear term in weak form?
I have calculated the first derivative of following equation using Euler method (first order), Three point Finite Difference method (second order) and Four point Finite Difference method (third order). $$f(x)=e^{-32*(x-5)^2}$$ in the domain $0 \leq x \leq 10$. I discretized the domain by 50, 500, 5000 and 50000 numbe...
I am currently trying to reproduce the results published by Hands et al.1 using MATLAB. They calculated the bases of the C60 wave functions of HOMO, LUMO and LUMO+1. I did the following: I implemented these functions into MATLAB syntax, e.g. Tp1uxL5 = @(x,y,z) 35.*z.*(x.^4-6*x.^2.*y.^2+y.^4)-5*x.*(1-14*z.^2+21.*z.^4)...
Since evaluating a matrix condition number usually takes $O(n^3)$, I wonder whether there is an efficient $O(n^2)$ way to estimate in MATLAB a matrix condition number given its LDL decomposition. Thank you!
I am trying to solve a large scale inverse problem using the Bayesian formulation. To estimate the Maximum a Posteriori Estimation (MAP) solution I will have to minimize the following objective function: $F(m) = F_d + F_\text{prior} = \frac{(f(m) - d)^T(f(m) - d)}{\sigma^2} + \frac{(m - m_\text{prior})^T(m - m_\text{pr...
Can you advise me any kind of existing software that can help to solve the disjunctive programming problem? The problem is the following. We have unit 3D planes $\Pi_{1}, \ldots, \Pi_{N}$ (they are known). Let us write them as follows: $U_{j} x = H_{j}, j = 1, \ldots, N$. Having the fixed numbers $n$ and $m$, we want t...
When we compute the complexity of an image processing algorithm, we get an $O(N)$. does the $N$ refers to the number of pixels in the image or to the height/width of the image, I mean it is computed related to $O(nm)$ with $n\times m$ the size of the image ? please, cite some references.
I'm trying to install Pastix library, but I'm still having problems with missing libraries and I'm really helpless now. I started with copying LINUX-GNU.in as config.in, because I'm working on Lubuntu 15.04. I've changed paths to Scotch and Blas. But now, when I try to make examples_s, it appears ok, but no compiled fi...
I am interested in approximating the time evolution of 2D curves. Here's an illustration: An issue that arises when naively making this approximation as illustrated above, is that as one increases the number of "line segments" used to approximate the curve, then one is also introducing extra "flexibility". That is, cu...
I have the following simple code v=[]; for i=10:-1:1 for j=0:0.2:5 v(end+1)=i+j; end end min(v) It returns the minimum of vector $v$ whose length in this case is 260. I would like the code to return the values of $i$ and $j$ that produce the minimum value of $v$. I defined a=cell(2,2) and I included the statem...
I am in the process of writing a finite element solver for the Navier-Stokes equations and am having trouble computing things like the divergence and vorticity correctly. Currently to compute the vorticity, $\omega = \frac{\partial{v}}{\partial{x}} - \frac{\partial{u}}{\partial{y}}$, I would multiply the r.h.s by a tes...
The Darcy equations for porous media flow are given by: $\frac{\mu}{\kappa}\mathbf{u} - \nabla p = \mathbf{0}$ $\nabla\cdot\mathbf{u} = 0$ where $\kappa$ is the permeability and can in general be spatially dependent. This can be put into a weak formulation that looks like: $a(\mathbf{u},\mathbf{v}) + b(p,\mathbf{v}) =...
Please, I am currently implementing direct multiple shooting methods* and I need one simple but fundamental concept answered: When I want to provide not only objective function value (the result of ODE integrator) but as well derivatives (for the NLP solver), for the control parameters it is just sensitivity analysis o...
Objective: I am trying to numerically solve $C(x,y,t)$ from the following advection-diffusion-reaction equation in 2D space (x,y) and time. I will be testing my numerical solution with an approximate 1D analytical solution (given on 2nd page in this file). However, the issue is that I am not able to get correct numeric...
I am trying to implement a 1D k-$\varepsilon$ turbulent model for a turbidity current, hence the conservation equation for $c$. I'm solving for the variables $u,c,k$ and $\varepsilon$. The remaining terms are parameters. $$ \newcommand{\cmu}{c_{\mu}} \newcommand{\cmuc}{c_{\mu c}} \newcommand{\dervz}[1]{\frac{\partial #...
I am wondering if I am thinking correctly about the following problem : Define the box of the dimensions $(a,a,H)$ in the $X$,$Y$, and $Z$ directions, respectively. Insert $n$ particles into the box using PBC in $X$ and $Y$ directions Move the particles using a quite analogous condition as in the previous pgms (of cou...
I want to invert large matrices ($10^4 \times 10^4$ to $10^6 \times 10^6$) but sparse (less than $100$ non-zero entries per line) on clusters with $16$ to $48$ processors per node. I'm looking for an efficient method to do so. I've tried a few different solutions but I face some problems. As the matrix is big, my firs...
Assume I have a data set $ { \left\{ {x}_{i} \right\} }_{i = 1}^{N} $ which represents the value of each data point. For each data we have its features $ {f}_{i} \in {\mathbb{R}}^{d} $. The model I came for the data is $ \arg \min_x {\left( x - \sum_{j \neq i} {w}_{ij} {x}_{j} \right)}^{2} $, where $ {w}_{i, j} = \exp ...
I like to create interpolation functions for second order finite element meshes. For elements with straight edges all is good, but some of my elements may have curved edges as shown in the figure: I am looking for references on how to test efficiently and robustly if a query point is inside a curved element. The inter...
Most authors are very clear that it's very dangerous to just use $\mathrm{H}(curl)$ conforming edge elements, which are divergence free, to satisfy $\mathrm{div}(\mathbf{B})=0$ and implement this condition in no other way. I just don't understand why. Could anyone explain in which case this could fail or point me to so...
I have a numerical scheme to solve an hyperbolic system of equations of this type (this a more simple version just for clarity): $$\frac{\partial u}{\partial t}+u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}=\frac{\partial H}{\partial x}$$ $$\frac{\partial v}{\partial t}+u\frac{\partial v}{\partial x}+v\...
I would like to solve a generalized eigenproblem of real sparse symmetric matrices. Is there an efficient library which utilizes OpenCL in order to find a limited amount of the smallest eigenvalues in magnitude?
I'd like to learn how the Raviart-Thomas (RT) element works. To that end I'd like to analytically describe how the basis functions look on the reference square. The goal here is not to implement it myself, but rather just to get an intuitive understanding of the element. I'm largely basing this work off of the triangu...
I'm trying to plot the orbit of a compact binary star system where general relativistic effects become important. I'm using post-Newtonian approximation and I want to solve the orbit numerically based on the equation below: $$ \begin{aligned} \ddot{\vec{r}}_{i} &=& \sum_{j\neq i}^{ } \frac{\mu_{j}(\vec{r}_{j}-\vec{r}_{...