instruction
stringlengths
43
28.1k
I am curious as to what the current status is for symbolic computation, and future outlooks as well. Here are some questions I would like to pose : What is the current outlook for symbolic computation ? Will it replace numerical computation in the near future (is that even a possibility) ? Can symbolic computation ou...
I've got several sets of xyz-data where x,y are coordinates and z is a 'value'. I want to be able to do simple arithmetic operations on these data. The x,y locations are not necessarily the same in the different data sets. There must be a library (preferably python) out there so that I don't have to do all the work by...
I have the ODE below $$\frac{d}{dt}\pmatrix{x\\ y} = \pmatrix{0 &1\\-a &0}\pmatrix{x\\ y} \enspace .$$ The $m=1$ leapfrog method is defined as: $$y_{n+1} = y_{n-1} + 2f_nh \enspace .$$ For the $a<0$ state, how do I simply find the condition the solution must satisfy for the method to be successful? Further, how do I en...
What is the difference between the $l^2$ norm and the $L^2$ norm. I can not find a definitive reference. Wikipedia uses them interchangeably.
I need some help in numerically solving the nonlinear Poisson's equation for electrons in frequency domain. The steady-state equation is: \begin{equation} \nabla.(\epsilon\nabla\varphi) = q\left(n_i\exp\left(\dfrac{\varphi-\Phi_n}{V_\text{T}}\right) -N_D\right) \,. \end{equation} In small-signal analysis, we have $\var...
I was wondering if anyone could help with understanding the geometric conservation law for moving domains. I came across Link1, and have tried to understood the paper by Farhat et al Link2. So far my understanding is that the two things to consider are 1) the time step to which the cell areas using for integration of ...
So I'm given a solver that can solve for $x$ in the matrix equation $\underset{=}{A} \underline{x} = \underline{b}$ where $b$ can be anything we specify. (NB: A is an NxN matrix). I now want to find the inverse of matrix A, $\underset{=}{A}^{-1}$, using the solver. How would i go about doing this? My first two ideas we...
On page 18 on this text: http://www.dima.uniroma1.it/users/lsa_adn/MATERIALE/FDheat.pdf , the graph in figure 8 on this page, how would I write a suitable code in matlab or maple that will produce this graph? It's a graph of the different truncation errors of the different finite difference methods (on the last page o...
I have the following function that has been vectorized so that for every element in input array t, an array is output: @np.vectorize def Ham(t): d=np.array([[np.cos(t),np.sqrt(t)],[0,1]],dtype=np.complex128) return d I am getting an error: TypeError: only length-1 arrays can be converted to Python scalars. I b...
I am using the Newton's method to solve $3\times3$ systems. For some particular cases, it turns out that at a given iteration, the Jacobian matrix cannot be inverted and that its determinant is very close to zero (looking at the matrix, there are terms that are around 1e+0 and others that are 1e-15). After investigat...
In my research, one of the steps is to choose a numerical method to estimate $\int_a^b f(t)dt$, where $f$ is Lipschitz continuous but not differentiable. For simplicity, I used midpoint rule but the overall result is not that good. I was thinking whether the problem came from the fact that I didn't select a correct num...
I am dealing with an optimization problem that has a large number of variables to optimize over - for example let's call these variables $x$, $y$, and $z$ and I wish to minimize the function $f(x,y,z)$. The optimization method that I am using is not able to handle optimizing over all the variables at once. I am instead...
I am trying to solve the CDR-Equation in 2D: $$\frac{\partial c(x,y)}{\partial t} + \nabla \cdot ( -d\nabla c(x,y) + \vec{v}(x,y) c(x,y))+ a c(x,y)=0\,,$$ with Boundary Conditions (length of square is $L$): $$c(0,y)=0$$ $$-d\nabla c(L,y) + v(L,y) (c(L,y))=0\,.$$. $$ c(x,y=0)=0$$ $$ c(x,y=L)=0$$ 1.) Why exactly is thi...
I am working on a program that tracks a flying object through space and predicts the future position of said object. I was given some equations to use, but some of them do not look right, mainly the equation I was given for finding slope: slope = (N * sum(t*GCx) - sum(t) * sum(GCx)) / (N * sum(t^2) - sum(t) * sum(t)) ...
Are there any one dimensional hyperbolic test cases for a 1D uniform flow? (I need the test case for the purpose of showing the satisfaction of geometric conservation law on a moving mesh).
My first question, please excuse me if its too basic. I have a matrix of evenly spaced geographical points; say 10 x 10, which I will call seed points. Each seed point has a lat/long and the spacing can vary. Then I place $n$ random points on the same matrix. I call these demand points. What algorithm can I use to calc...
Im doing a computational biology project in which I simulate evolution under different inheritance rulesets and I am generating phylogenetic trees (beautifully visualised in python with ete3, which I recommend and can be found here: http://etetoolkit.org/download/ My question is: Can someone point me in the right direc...
Between these four different meshes for the same shape, compare them whilst considering the different results for displacement and stress. Moreover, the difference in computational cost and accuracy of the meshes.
I am accepted to computational science master program. The master program just started to accept students in our university and today each group of 3 students was assigned to an advisor teacher (we are only 13 students). Our advisor asked us to research for valuable topics in Computational Science, so I thought why don...
I have a rudimentary question about the differences between finite difference (FDM) and finite volume methods (FVM). In FDM we concentrate on the nodes (points) in space while in FVM we concentrate in the volumes enclosed by faces. Correct me if I am wrong here. When the Gauss Divergence theorem is applied on the integ...
I hope this is not a vague question. I would like to know if any researchers and students in this community have used or considered using 3D graphics software (such as Blender) or a game engine to visualise scientific data as opposed to specialist software. I understand there are many limitations to using popular 3D g...
We know that in classical two-phase Stefan problems, let's say in the temperature distribution of ice-water problem here, the governing PDEs are: \begin{equation} \left. \begin{aligned} C_1\frac{\partial T_1}{\partial t}=\nabla\cdot(k_1\nabla T_1),\ in\ \Omega_1\\ C_2\frac{\partial T_2}{\partial t}=\nabla\cdot(k_2\nabl...
I am developing a BEM code based on a deal.ii tutorial. Consider the Poisson equation $$ \Delta u=-f\,, $$ and its Green's function $G\left(\mathbf{x},\mathbf{x}'\right)$ with the property $$ \Delta G=-\delta\left(\mathbf{x}-\mathbf{x}'\right)\,. $$ Applying Green's 2nd identity leads to the well known boundary integra...
Suppose I have the following integral: $$\int_{-1}^1 \int_{-1}^1 C_if(x,y)dxdy$$ where \begin{equation} C_i= \begin{cases} C_1 \quad \text{in }\Omega_1\\ C_2 \quad \text{in } \Omega_2\\ \end{cases} \end{equation} So how can I compute it using Gauss quadrature without having to splitting the unit cell into two seperate ...
While trying to solve a stochastic Gross-Piaevskii equation I have found a problem that can be tracked down to something buggy occuring in the simplest Schrodinger equation possible: $\partial_t \psi = i \partial^2_x \psi$ This has the very simple solution of a plane wave: $\psi(t) = A e^{i k x - i\omega t}$, with $\om...
I am trying to understand the divide and conquer division algorithm that is used in the GMP bignum arithmetic library. The code is very optimised and that makes it somewhat hard to understand. the doc does not really offer an explanation of how it is done, (and the references do not point to an actual algorithm, not on...
I am looking for a simple subroutine in Fortran 90 (GNU Compiler) to solve linear equation of the type $AX=B$, where $A$ is an $n\times n$ symmetric matrix stored in the form of symmetric skyline matrix. I want a solution of this type: X = skysolve(A,p,X,B,n) A = {11,22,13,0,33,24,34,44,55,16,0,0,46,56,66} where p is ...
In the FEM we usually use a trick to find the coefficients for shape functions: Finding $M^{-1}$ in the system $MC=I$, where for example in the linear case: $$ \begin{aligned} M&=[1 ,x_1,y_1;1 ,x_2,y_2;1 ,x_3,y_3],\\ C&=[a_1, b_1,c_1;a_2, b_2,c_2;a_3, b_3,c_3],\\ I&=[1,0,0;0,1,0;0,0,1]. \end{aligned} $$ and $\phi_1=a1+...
I am interested in computing the ranks of fairly large, the largest being of magnitude $10^6$ x $10^6$, sparse matrices whose entires are all 0, 1, or -1. I have been trying to use Matlab to accomplish this. In particular, my approach has been to use QR-factorization -- that is factoring my matrix $T$ as $TP=QR$ were $...
I am currently writing software in c++ which solves the eigenvalue problem of sparse hermitian matrices. The size of the matrix depends on the user input, but as an estimation it will roughly be 1000x1000. I will have to solve about 300 (again relies on the user input) of them for different initial conditions. What is...
I am interested in generating a 1D non-uniform grid on the interval [0, L] with N points, where a region of width $\sigma$ and centred at $\mu$ is at a higher density and where the transition from low and high densities of grid points occurs over a length $\ell$. This is for a finite-difference code, where particular a...
I'm planning on building a program that will carry out HPC. I'm aware that C/C++ is significantly better than Python in terms of the speed of computation. However, I'm not yet proficient in C/C++, so do you think it'll be wise to build a fully functioning prototype of sorts in Python and then get it rewritten in C/C++ ...
my name is Lorenzo and I am a postdoc researcher in Italy. My job is related to tomography imaging using synchrotron radiation. This is a new field for me and I start to face with Matlab to write some code. I am completely new with tomography imaging and Matlab shows new challenges for me. My actual problem is to creat...
Solve a matrix equation of the type $AX=B$, where $A$ is an $n \times n$ symmetric matrix stored in the form of symmetric skyline matrix. With the solution given by Bill and some more research on factorization, I used the prototype code provided by S.H Lee along with the same test code: parameter (neqs = 5) rea...
all, I've tried to find an answer to this question and have come across some related threads but nothing I was able to apply to my problem given my relative lack of experience in this arena. I basically have a constrained minimization problem using both inequality and equality constraints. I will have more variables (~...
I am looking for the Butcher tableau of a fourth order accurate Runge-Kutta method with IMEX splitting. I have been reading the ''classical'' paper on the subject by Ascher, Ruuth and Spiteri as well as a number of works that cite this paper (through Google Scholar). However, in all papers I looked at, only methods of ...
It is written in a book I'm reading that $$\nabla f(x) = \left( \frac{\partial f(x)}{\partial x_1}, \frac{\partial f(x)}{\partial x_2},...,\frac{\partial f(x)}{\partial x_n}\right)$$ and $$\nabla^2 f(x)_{ij} = \frac{\partial^2 f(x)}{\partial x_i ~\partial x_j}, \qquad \forall i,j=1,...,n.$$ According to 2nd-order con...
I want to plot a numerical integral function of some function $f$ using scipy and matplotlib. How can I do this? I tried the following but it didn't work (run with ipython %pylab): import numpy as np from scipy import integrate def f(x): return x*np.sin(1/x) X = np.arange(-0.5,0.5,0.001) #plot(X,f(X)) def F(x):...
I need to write the fast fourier transform in C++ and I am referring to this formula from wikipedia: But for some reason I am not getting the correct output when I simply enter (1,1) (1,1) (1,1) (1,1) for by vector $v$. Here is my code: #include <iostream> #include <complex> #include <cmath> #include <time.h> using n...
I need to solve a very large linear system (coming from finite element method). I'm currently using the Intel MKL library, but the system has been delayed more than 20 hours. The matrix of the system is sparse and it is written in Morse (CRS) I'm programming in Fortran 90, but I guess the language of the library is not...
I asked this question over at StackOverflow and someone told me that I'd get a better answer here. So here's my problem: I'm working on a machine learning project which involves doing a Principal Component Analysis on some labeled data and using those labels to extract more valuable information from the data. To do tha...
My question may be elementary, but it is quite essential as I am getting confused. Here I am supposed to solve the following equation: $Ax=B$ From my understanding I have options of using either direct solvers or iterative solvers. I have tried using iterative solver GMRES(It is quite simple in terms of implementation ...
I need consultancy for a possible p=np workaround. First of all sorry for my English because it is going to be long question:) To better understand the architecture which I design maybe you will need to have experience with matrix operations and a bit object oriented programming. I wanted to tag this question also to c...
For a start I need to implement a 2-D, vertex centered, finite difference scheme, Adaptive mesh refinement serial code. I have the following doubts before starting: Is the input to AMR (say 2-D) always a box bounding the entire domain ? Is a cell-centerd scheme easier to implement than vertex centred scheme ? Do I nee...
cannot delete my own question, so I try to overwrite it instead...
I'm solving the 3D Diffusion equation $$u_t=k(u_{xx}+u_{yy}+u_{zz})$$ in MATLAB using Fourier techniques. I assume a 3D Fourier expansion $(e^{-ipx},e^{-imy},e^{-imz})$of the solution. Physical space: $u(x,y,z,t)$. Fourier Space: $c(m,n,p,t)$. Substitution and differentiation result in: $$c(m,n,p)^{N+1}-c(m,n,p)^{N...
I am trying to solve the following problem, where $a_{ij} \ge 0 \ \forall i,j$: \begin{align} \mbox{minimize}\quad & \sum_{i=1}^m\sum_{j=1}^n (a_{ij}x_{ij}^2 + b_{ij}x_{ij})\\ \mbox{subject to}\quad &\sum_{i=1}^m x_{ij} \le 1 \quad \forall j,\\ &\sum_{j=1}^n x_{ij} \le 1\quad \forall i,\\ &x_{ij} \ge 0 \qua...
Assume $X$ and $N$ are two sets of vectors (observations) from two different normal distributions, where $X$ represents clean data and $N$ represents noise; and $A$ a projection matrix of a filter. the scenario is that our clean data was corrupted by a multiplicative noise via matrix $A$ and an additive noise of $N$. ...
Suppose we have an optimization problem $$ \mathbf{x} = (x_1, x_2, \ldots, x_m) = \arg\!\min_{\mathbf{x}\in \mathbb{R}^m}f(\mathbf{x})$$ and a second related problem: $$ \mathbf{y} = (y_1, y_2, \ldots, y_n) = \arg\!\min_{\mathbf{y}\in \mathbb{R}^n}g(\mathbf{y})$$ because we have the relations $$ \mathbf{x} = \mathbf{t...
Could somebody explain to me why periodic boundary conditions are automatically satisfied if you solve your problem assuming a Fourier series? So, if we assume a Fourier series for our solution, we don't need to impose any type of boundary conditions because the necessary periodic boundary conditions are naturally sat...
It is necessary for me to find the element indicator for poisson equation by linear basis in FEM. Therefore I have to find the following: $$\eta_k=h_k||f+\Delta u_h||_{L^2(k)}+\frac{1}{2}h_k^{1/2}||n.\nabla u_h||,$$ So, I should approximate $\Delta u_h$ numerically, and I need to second order derivative of the shape fu...
For an optimization routine I needed to compute the derivative of the right-hand side $\: f_u(x_k, u_k)$ of a discrete-time system $x_{k+1} = f(x_k, u_k)$. Since $\: f_u(x_k, u_k)$ includes terms that are divided by $u_k$, it is not possible to evaluate $f(x_k, u_k=0)$. From the physics, it's pretty clear that a limit ...
Assume $X$ and $N$ are two sets of observations from two different normal distribution, where $X$ represents clean data and $N$ represents noise; and $A$ a projection matrix of a filter and the relation between $X$ and $Y$ defines as: $Y=A \times X + N$ considering that $X_i$ are not sequential samples and are just dif...
I'm coding the simplex method and observing that it easily falls into cycling, even if Bland's rule is used. It seems to me I have found the reason and I would like to check my understanding is correct. It seems the problem is in tiny detail of the choice of the pivot row. We choose the pivot row "r" by the codition B...
Reposted from: https://stackoverflow.com/q/34909093/472610 I work in scientific research. Technical tools aren't always ideal or even really thought through sometimes, but with recent developments one recurrent need (in my field and many other I know of) is that of storing reasonably large datasets (10GB - 1TB) with la...
Assume I start with an 8x8 coarse mesh (see Fig 1) where the vertices (except boundary vertices) represent the unknown variable. After iterative approximation - I find 2 vertices (unknowns) where the error exceeds a certain bound (see Figure 2 red dots). Now I further refine the red dots (high error points) (see Figu...
I have some data defined in an array (an image) and I need to find the curl of a certain function. Wikipedia has an integral definition of curl that I like, maybe it can be discrete. $$ \nabla \times F = \frac{1}{|A|} \oint F \cdot d \mathbf{r}$$ Can we write this as some kind of finite difference. Let $F = (F_1, F_2, ...
I need to ask a question about partial derivatives. I want to solve this equation (steady state, one dimensional continuity equation): $$\frac{\partial (\rho u)}{\partial z}=0$$ which is equivalent to: $$\rho\frac{\partial u}{\partial z}+u\frac{\partial \rho}{\partial z}=0$$ and discretized by means of finite differenc...
A scalar field f approximated on a triangular mesh using the FEM method can be given as $f(x,y) \approx \bar{f}(x,y) = \sum_{n=1}^3 \left(\phi_n(x,y) \cdot f_n \right)$ I am of the understanding, then, that the gradient of f can be found inside each triangle with $\nabla \bar{f}_t = \sum_{n=1}^3 \left(\frac{\partial\p...
I'm having trouble solving a second order differential equation with Gaussian white noise. The equation I'm solving follows the form: $$Ax'' + Bx' + \sin(x) = i + i_{n}$$ where $i_{n}$ is the Gaussian white noise, and $i$ is a constant source. I'm ultimately interested in $x'$, not $x$. Without the Gaussian source, I'...
I have the following problem, I have a class of N people and I want them to do stuff by pair, but I want them to do this with everybody but as fast as possible. For N = 4 I got this: A-B C-D A-C B-D A-D B-C so in three turns it's finished. I need to find an algorithm (simple to explain if possible) to solve this probl...
I am aware that I could use deconvolution algorithms such as LUCY, Weiner and Blind but I am confused as to how to estimate the PSF (point spread function), which is needed for the LUCY and Weiner algorithms. I am currently using the Widefield Florescence Microscopy setup. I have read in a lot of places around the int...
I need some advices to start to solve some problems about fluid motion in a conduit. The problem domain is shown below: a conduit with some obstacle of different geometric properties. The fluid is a "real" and viscous, the viscosity is very high in relation to speed (low speed, very high viscosity). The fluid is in p...
I have problem to solve stiff equations. Any idea on how to solve this? I have tried "StiffSwitching" but it didnt work. Im solving this using Mathematica 10. Here is my code. Im sorry if I wrote the code badly but I have fllowed the instructions on how to copy and paste code from Mathematica and this is what I end up ...
I am seeking of any already written R package which could help in an optimization technique which is called Difference of convex functions. This technique is sketched here and could be very useful for reinforcement learning processes. Does anyone know something, that could be helpful? I have found package called ccc...
I have $n$ boolean variables $x_1,\ldots,x_n$ with associated real-valued costs $c_1,\ldots,c_n$, respectively, and a boolean function $(x_1,\ldots,x_n)\mapsto\Phi(x_1,\ldots,x_n)$ in conjunctive normal form (CNF). I'm looking for a dedicated (ideally free) software package to find an assignment for $x_1,\ldots,x_n$ th...
So in ${\bf R}^{n\times p}$ we have the Frobenius inner product given by $$\langle A, B\rangle=\text{tr}(A^TB)$$ which can be interpreted as the Euclidean inner product on ${\bf R}^{np}$. My understanding is that all inner products on ${\bf R}^{np}$ can be written as $$a^TPb$$ for $P$ positive-definite. The best I cou...
during the development of my N-body simulation with visualisation in WebGL, I devised an optimisation, and I'm wondering if it has a name. I find it unlikely that it has never been done before. It works like this: During the first timestep, make an all-pairs iteration. During that iteration, for each particle: Store a...
I have a set of 3d points to which I want to fit two planes. I know the assignment of points to the planes so I don't need any RANSAC or similar. Currently, I'm using a PCA-based approach to fit two planes and they are rather orthogonal (+/- 2 deg) but I'd like to integrate this knowledge directly into the plane fitti...
I have an expression like the following (anyway to input latex?), $$ z^{m}\left( \ln\left(\frac{z}{z-1}\right)-\sum_{k=1}^m \frac{z^{-k}}{k} \right)$$ for m integer, z complex It seems if I code it the following way, it gives noticeable round-off error in case $|z| \approx 1$. Z_1=1/Z ZV1=LOG(Z/(Z-1)) ZK=...
I have a system of ordinary differential equations (ODEs). It is a large system that has dozens of equations and hundreds of parameters. I wish to reduce its size so it becomes computationally more efficient to simulate, and I'm willing to tolerate some error in the reduced model. So the end result should be a system o...
There are some technique to generate mesh in a domain. My qustion is that: Is there any difference between the results using different techniques for mesh generation? If yes which one is better. For example If I solve an equation by regular triangle mesh and by criss-cross mesh wich one must be better (especially in ad...
I would like to construct a surface on a 2D mesh, given a set of Fourier coefficients for the original function $V(x,y)$. Given some $\mathbb{K}\subset \mathbb{Z}^2$ I have a partial double sum of a Fourier series for $V(x,y)$, which could be some potential, for example $V(x,y)=\frac{1}{\sqrt{x^2+y^2}}$ then $f(x,y)=\...
I have the function $cos(x+t)$; the following PDEs have $cos(x+t)$ as the analytical solution of them: $$u_t = u_{xx} -\sin(x+t) + \cos(x+t) \\ u_x(0,t)=-\sin(t) \\ u_x(1,t)=-u(1,t)^4-\sin(1+t)+\cos^4(1+t)\\ u(x,0) = \cos(x)$$ $$ v_t = v_{xx} -\sin(x+t)+\cos(x+t) \\ v_x(0,t)=-\sin(t)\\ v_x(1,t)=-\sin(1+t) \\ v(x,0) = \...
I have a PDE defined over $\mathbb{R}$, for which I don't have the exact solution, and I am to approximate it with finite differences so I need to input some BC. Can anyone suggest any good references for dealing with infinite intervals as BCs? Possible attempts: Input $[-M,M]$ as domain for large M and try to guess ...
I've seen a few other posts on this topic but none have full answers. I'm trying to implement some eigen-decomposition algorithms. I've managed to get the Explicit QR algorithm and the Implicit (Francis) algorithm to compute the eigenvalues. My question however relates to computing the eigenvectors. My core question i...
Update: Someone changed the title to this post to a possible answer ("Fourier decomposition of parametric shapes") but I changed it to a different title as that makes it clear what I was asking. As I think putting the answer in the title makes it confusing to a new reader. I am learning about programming so this quest...
I've been trying to understand the Fast Multipole Method but not really getting anywhere. It seems like the fastest mainstream N-body simulation algorithm, and I would like to implement it in an efficient javascript version, mostly for amusement in browsers. My math is pretty weak, but my programming is strong, relativ...
Briefly, what are the different types of basis used in FEM and why is the nodal basis so popular and advantageous in the finite element context?
I am a physics undergrad and I have MOKE data for a magnetic material (thin permalloy film on a silicon substrate). Here is one of the hysteresis loops I obtained, plotted using Python: The form of the $y$-axis is irrelevant since I am just going to normalise the signal. I am also going to shift the loop horizontally ...
I'm working on a Magnetization simulation and writing an algorithm using the metropolis method. I am using a change in energy and a Boltzmann distribution, but, my question is about the trial step. Should the trial position of the magnetization be completely random or should it be a random differential added onto the ...
I have the system of equations \begin{align} &A \frac{\partial u_1}{\partial t} = 1 - u_1 B \frac{\partial u_2}{\partial y}\\ &\frac{\partial u_2}{\partial t} = \frac{\partial}{\partial y}\left[ e^{u_1} \frac{\partial u_2}{\partial y}\right] \enspace . \end{align} The initial condition is $u_1(y, 0) = 0$, and $u_2(y<1...
The cfl condition for linear advection equation $$ u_t + a u_x = 0 $$ using a DG method of degree $k$ polynomials, upwind flux and an RK scheme of $k+1$ stage/accuracy is stated to be $\frac{1}{2k+1}$ for $L^2$ stability. However I have not been able to find a paper which proves this though it is mentioned in some pap...
I am trying to identify a non-linear plant using the identification toolbox of Matlab. In particular I would like to identify a non-linear arx model, where the nonlinearities are expressed by means of tree partitions. According to Mathworks (http://it.mathworks.com/help/ident/ref/treepartition.html): TREEPARTITION is ...
Lets say I have a system of differential equations which has the form $$\dot{C}_{\alpha,\beta,m} = f_{\alpha,\beta,m}(C_{\alpha,\beta,1},\ldots,C_{\alpha,\beta,N};t).$$ The $f$s are some functions of time and of the $C$s. The exact form is not important. In principle, this can be solved with a simple RK4 algorithm. How...
I work on an inverse problem for my Ph.D. research, which for simplicity's sake we'll say is determining $\beta$ in $L(\beta)u \equiv -\nabla\cdot(k_0e^\beta\nabla u) = f$ from some observations $u^o$; $k_0$ is a constant and $f$ is known. This is typically formulated as an optimization problem for extremizing $J[u, \l...
I am looking to numerically solve many different integrals where the integrand is simply the indicator function for a region (i.e. 1 on the region, 0 outside. This is for measuring areas). The dimensions range from 1 to 5. What is an efficient quadrature method solving this? It seems like the standard methods which ut...
Assuming that the crosses in the figure below are unknowns in a vertex-centered finite difference scheme in an Adaptive Mesh, how can I calculate the double derivate (Laplacian) at the Red x ? The Red x has only Eastern, Western and Northern neighbours but not a Southern neighbour. Can I take the average of just 3 poin...
It is necessary for me to solve a Poisson equation by adaptive finite element method with transition elements technique to get conforming mesh. For the first local refinement everything is OK, because there is not any transition elements, but after that there are some of them. After the first step, the error must...
So after posting this question and reading all your comments I would like to make this new question (update). If you consider the three equations presented here: $$\frac{\partial \rho}{\partial t} +\frac{\partial (\rho u)}{\partial z}=0$$ $$\frac{\partial C_i}{\partial t} +\frac{\partial (u C_i)}{\partial z}=Reactionra...
I'm used to displacement forumlation of elastic wave equation: $$ \nabla \cdot \sigma (u) + F = \rho \ddot{ u } $$ where $u$ is the primary variable. Recenty I started experimenting with DG and in almost every paper the stress-velocity formulation is used as a "conservative or divergence form". What's special about thi...
We have an elliptic projection $$P: V \rightarrow V_{h}$$ which satisfies $$\Vert u - Pu \Vert_{L^{2}(\Omega_{e})} \leq Ch^{k+1} \enspace .$$ Can we say anything about $\Vert u - Pu \Vert_{L^{2}( \partial \Omega_{e})}$? I know if we have use the Trace theorem we can bound it by $h^{k}$, but I would not like to lose th...
I want to use ADMM to solve a LP defined over a graph. According to Distributed optimization and statistical learning via the alternating direction method of multipliers S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein, 2011 the first primal update ($x^{k+1}$) is given by the solution of $$ \begin{bmatrix} ...
When solving fluid flow problems using finite elements you typically end up requiring that $p\in L^2$. For Darcy flow problems, a popular choice of elements is the Raviart-Thomas element and discontinuous pressure elements. For Stokes/Navier-Stokes flow a popular choice of elements is the Taylor-Hood element which ha...
I'm working on a finite volume advection scheme for unstructured meshes which uses a multidimensional polynomial weighted least squares fit for interpolating from cell centres onto faces. In 2D, the advection scheme typically uses a 4x3 stencil of cell values in the domain interior to fit a polynomial that is cubic in ...
Markov Chains can be used to generate, or auto-complete, text. https://en.wikipedia.org/wiki/Markov_chain#Markov_text_generators Training text is read, and some information about the text is remembered, for example: The word "I" is usually followed by the word "have". The word "to" is usually followed by the word "go",...
Recently I work on mechanical shocks (e.g. impact) in FE (fenics). I've already put together simple timesteppers (Euler, Crank-Nicolson). I use higher order basis, so I think of higher order time integration schemes like RK4. Is it worth the effort in mechanics? I can't find any appropriate example of this method in el...
$A$ is a symmetric matrix and is known to be invertible. $X$ is rectangular of size $(N+p) \times N$ with $p > 0$ but full column rank. Can we provide an upper bound on the condition number of $X^{T}AX$ based on this information along with the condition number of $A$ and norm of $X$? Can we use the pseudoinverse of $X...
How does the pseudo inverse of a full column rank matrix change if I rescale a single row? In more detail the problem is the following: We have a fixed matrix $V$ with linear independent columns and lots of matrices $D_i$ of the form $$D_i = \begin{pmatrix} d_i & 0 \\ 0 & E_n \end{pmatrix} $$ where $E_n$ is the iden...
I am using finite elements, Newton Raphson technique and MUMPS direct solver, to solve for $P$ in this equation: $$\frac{\delta K}{\delta x} \frac{\delta P}{\delta x}= \frac{\delta K B}{\delta x} + A$$ $A$ and $B$ are constant parameters. $K$ is a parameter varying over space. $P$ is the solution variable. $K$ is distr...