instruction stringlengths 43 28.1k |
|---|
I want to compute the value of an integral of a function.
This function, however, is not given by a formula, say $f(x) \: \forall x \in [0,1]$, but is only known through its values on some given points, say
$f \left(\frac{k}{n} \right) \: \forall k \in \{0,\cdots,n\}$. (is the name for that scattered data ?)
How should... |
I do understand the meanning of "conservative discretization" within the FVM/FDM framework, indeed it is well explained in this post.
Now, according to the table in this slide (pp.8), it concludes:
FEM suffers from "Stability for conservation laws", while Discontinuous Galerkin (DG) is just fine
I interpret this stat... |
I'm trying to implement nonzero Displacement Boundary Conditions in VegaFEM on a non-linear model, using the method outlined in §3.6.2 of University of Colorado's intro to FEM (modify $f = Ku$: set desired displacements in $u$ and eliminate rows and columns in $K$ by calculating forces and applying to $f$).
However it'... |
Is it better matplotlib interactive mode or matplotlib animation in terms of performance?
I have a continous flow of data coming from the serial port. I get 2 measures let's say var1 and var2. I need to plot them in a 3d plot adding the 3th dimension, the time. I've tried different approches based on ion, but i couldn... |
This is something I've been trying to figure out for a long time, and all I have is vague numerical results. I'm trying to answer the following question analytically:
Suppose I have a time dependent system:
$u_t = L(x, u, u_x, u_{xx}) , u(t=0,x) = u_0 $
I approximate differences with some finite difference scheme, for ... |
I am currently working on 2D interpolation and I am using cubic splines.
In 1D given N points one would use N+2 splines and would have to apply additional constraints in order to achieve a square system. For example requiring that the interpolant, S, second derivative is equal to zero ,Sxx = 0, at the end points (Natu... |
I want to solve
$$\min_x f(x)\qquad \textrm{s.t.}\qquad g_i(x) \geq 0\ \ \textrm{or}\ \ h_i(x) \geq 0$$
for $i=1,\ldots,m$.
Clearly if the inequality constraints split the feasible set into $2^m$ disconnected components, there is no hope for an efficient numerical solution. But in my case I know there is only one feasi... |
Cross posted in Mathematica.SE, I'll try to rephrase it in a more general way here.
A friend of mine showed me this initial value problem (IVP) for a linear ordinary differential equation (ODE) with variable coefficient:
$$y''(x)=\left(x^2-1\right) y(x)$$$$y(0)=1$$$$y'(0)=0$$
Seems to be a simple one, right? Actually i... |
When I run the following (in Matlab) on a sparse matrix $A$, I get larger band width. The symrcm (symmetric reverse Cuthill-McKee permutation) is not guarenteed to find the smallest band width, but it makes no sense for it to increase. What is wrong here?
reorderingForSmallBand = symrcm(A);
A = A(reorderingForSmallBand... |
This question is based more on the theory of neural networks than my particular implementation. Therefore I will leave out my code unless requested.
I'm working on a project in C# which can create and train feed forward neural networks. It works well and can train networks to perform some simple functions such as squar... |
I am trying to write a 2D Navier Stokes solver using an RK3 for time advancement in python. For debugging, I have converted the RK3 to an Euler step for simplicity. Checking my divergence for my predictor velocity I find that the divergence is acceptably close to zero. I then go to my pressure solver and the solution i... |
I'm working with the Boundary Element Method and want to integrate an expression over a triangular region. I would like to use Gauss Integration to do this, but I'm having trouble since the triangular element is zero order(1 degree lower than a constant stress triangle). Unlike the higher order elements, the zero order... |
Consider two functions
$$X=\sum_{n=-N}^N i\ sign(n) y_n e^{-in\xi}; \quad \quad Y = \sum_{n=-N}^N y_n e^{-in\xi}.$$
where $y_n$ are the dependent variables of the system, and are functions of time. sign(n) is $1,0,-1$ for n positive, 0 and negative respectively.
Based on the physics of my system, I find that the Lag... |
I am facing a problem solving a mechanical system which is shown in the scheme below.
We assume that coupling of the two shafts is done with a clutch
Equations:
$$J1*\frac{d\omega1}{dt} + Td(\omega12) + Ts(\phi12) = T_1$$
$$ J2*\frac{d\omega2}{dt} - Td(\omega12) - Ts(\phi12) = T_2$$
where $$w1 = \frac{d\phi_1}{dt}... |
I want a numerical method to evaluate:
$$\log \int_a ^b f(x) \mathrm{d}x$$
when what I have is a numerical routine to evaluate $\log f(x)$. The problem is that if $f(x)$ takes very large or very small values, direct evaluation of $f(x)$ will lead to overflows/underflows. I am wondering if anyone has approached this num... |
The equations of motion for an elastic solid are given by
$$\begin{align}
&\nabla \cdot \boldsymbol{\sigma} + \mathbf{f} = \rho \ddot{\mathbf{u}}\\
&\boldsymbol{\sigma} = \mathbb{C}\boldsymbol{\varepsilon}\\
&\boldsymbol{\varepsilon} = \frac{1}{2}\left(\nabla \mathbf{u} + [\nabla\mathbf{u}]^T\right)
\end{align}$$
or in... |
I am currently working with a optimization problem involving a non-linear least square problem. I have chosen to use lsqnonlin in Matlab. What follows is a simplified short description of the problem.
Let $P_i=(x_i,y_i)$ $i=1,...,n$,
$A_1=(a_1,b_1)$, $A_2=(a_2,b_2)$ be a set of points which are known. Let $\tilde{R}_1$... |
I am trying to numerically solve a simple second order differential equation $x'' = -x$. I used a new variable $x'=v$, so I have two equations. While it seems simple, it somehow produces a result that's really far of the correct result.
def f(x):
return -x
def rk4(f=f,h=2*pi/100,x0=1,v0=0,t0=0,n=100):
'''RK4''... |
I have a 4D surface in the form of the spin quadric. I would like to display this surface onto the screen. One of the method which I would like to use to present surface onto the screen is projection. I would like to perform 4D->3D and then 3D->2D projections.
To be able to perform a projection I need to have a set of ... |
I need to write a DNS code for simulating reacting flows in turbulent conditions. The code has to be highly scalable, because the computational cost of simulations is expected very large.
My idea is to use C++ and I was wondering if you have suggestions about a very efficient C++ library to manage vector/matrix operati... |
I am solving a non-linear second order system of PDEs in two variables. The equations are too complicated to write out here, but an essential feature is that there is a propagating wave which then bounces on a boundary.
The problem I have is that the numerics breaks down at the boundary, when the wave reaches this poin... |
I'm using Armadillo to do very intensive matrix multiplications with side lengths $2^n$, where $n$ can be up to 20 or even more. I'm using Armadillo with OpenBLAS for matrix multiplication, which seems to be doing a very good job in parallel cores, except that I have a problem with the formalism of multiplication in Ar... |
In texts I often read that meshless methods, as opposed to the FEM, do not exhibit the Kronecker Delta Property [1]:
$N_I(x_J)\neq\delta_{IJ} = \begin{cases}1 &\mbox{if } I=J \\0 &\mbox{otherwise}\end{cases}$
Where $N_I$ is the meshless shape function at position $x_I$. I understand this property, however, I'm not sure... |
I'm trying to integrate an incredibly simple ODE:
$$
y'(x) = -f(y),\quad y(0) = y_0 \ ,
$$
from $x=0$ to $x=1$. This is a decay type of equation, $f$ is the (variable) decay rate and $y$ is the abundance. Both $y$ and $f(y)$ are positive everywhere.
I'm faced with a couple of constraints. Sometimes $f(y) \gg 1$, wh... |
I have a question about Matlab and restarted gmres. I would like to use gmres.m provided here. This code seems to be popular for the scientific computation newcomer. I also want to modify this code for my particular case.
But I have a question about recording the number of matrix-vector products and the
2-norm of each... |
I've been given an assignment:
Create a console application (using C and Obj C) that will calculate area of a random polygon.
The application should process input data as a .txt file with a list of Cartesian coordinates pairs in the following format:
(12;34)
(23;35)
(85;23)
...
From those pairs a polygon should be ... |
Consider the following two point BVP:
$$
-u''(x)=f(x),~~~u(0)=u(1)=0.
$$
An interior penalty DG method for this BVP that weakly imposes homogeneous Dirichlet boundary conditions is of the form:
$$
\sum_{i=0}^{N-1} \int_{I_i} u'(x) v'(x)\,dx
+
\frac{1}{h}
\sum_{i=0}^{N }
[\![u]\!]|_{x_i}
[\![ v]\!]|_{x_i}
- \epsilon... |
I am interested in learning numerical methods that specifically have to do with analyzing dynamical systems. In particular:
drawing phase plane diagrams
drawing phase portraits
analyzing bifurcations and drawing bifurcation diagrams
I have found the following sources so far:
Numerical Methods for Nonsmooth Dynamical ... |
An unpivoted QR factorization produces a triangular factor $R$. A rank-revealing QR factorization is typically done with column pivoting. My question is, how does an unpivoted QR factorization fail to reveal rank? If a matrix is singular, then a diagonal element of $R$ must be zero or tiny. And this element is almost a... |
I'm learning MPI in order to use MPI with a model written in Fortran. What are some good resources (books, websites, etc.)? Introductory/beginner material, and detailed references would both be appreciated.
|
I am using the Hydra Process Manager from MPICH and I plan on running jobs on multiple compute nodes. Currently working with an Intel Xeon E5-2680v2 with a total of 20 cores with 2 sockets (32 GB of memory and 25 MB L3 cache for each socket). Socket 0 has hwthreads labeled 0-9 and Socket 1 with 10-19.
I see within hydr... |
The default option for matplotlib's pcolormesh (also true for VisIt and I think also true for Matlab) is to allow the maximum and minimum of a colorbar vary. Which in my case looks like:
I think that this default behavior makes sense and is also much more aesthetically pleasing.
However, my advisor wants me to keep t... |
I'm interested in implementing the muscle model used in Geijtenbeek and Wang et al's work.
Both papers link to the paper by Geyer and Herr, which describes this model:
However, the paper on this model assumes you already know how to model a Hill-Type muscle, and are simply augmenting it and placing many copies of it t... |
I have data of the form:
X Y
3.53 0
4.93 50
5.53 60
6.21 70
7.37 80
9.98 90
16.56 100
And I want to find out $n$ so that this can be fit to a function of the form:
$$y = \frac{a}{x^n} + b$$
I am trying to determine $n$ by Box-Cox transformation. Can n be determined with Box-Cox transformation... |
I am working with an objective function that is convex globally, but the path downward is lined (if you will) with quartz crystals. In this case, the update vector (gradient solution) of partial derivatives of a potential crystal's surface you land on sometimes points upward, so the algorithm throws you backward. Hence... |
This question is related to the previous one, but I believe the extension to several variables is a problem in itself.
I have a collection of points $(x_j,y_k,f(x_j,y_k))$ for $x_j=\frac{j}{n}$ and $y_k=\frac{k}{n}$ a grid over $[0,1]^2$. These values come from a PDE solver for $f$. I need to compute the integral of $f... |
I have a 2D square ABCD in a 3D space, with side length 2s, that is represented by four vectors (one for each vertex) and a fifth vector v for the center point.
The square lies standing upright on the plane z = -1 (xy plane).
v = < 0, 0, -1>
OA = <-s, s, -1>
OB = < s, s, -1>
OC = <-s,-s, -1>
OD = < s,-s, -1>
Now, con... |
Let us consider the following equation :
$$\partial_t u = \Delta_x u + K*u$$
where $K$ is a smooth kernel, $u(x,t)$ is the unknown and $x$ is in $\Omega$ a domain in 1d or 2d.
I want to numerically solve it by the method of lines :
$$\dot{u_i} = \frac{u_{i+1}-2u_i+u_{i-1}}{h^2} + (K * u)_i$$
Is this a good way to go ?... |
Ok, I've already asked this question in math.stackexchange, but I feel it is more appropriate to ask here (hopefully I am not violating any rules by repeating!). So here it is:
I wonder if there is a local convergence proof for ADMM applied to biconvex problems? More specifically, my problem is as follows:
$$\min_{x,y... |
When sampling configurations of point particles in statistical mechanics by means of (Markov chain) Monte Carlo, we may work with a potential that only depends on the positions of the particles, and to generate new states we assign probabilities to configurations according to the Boltzmann distribution, which (to my un... |
I am maximizing a linear functional subject to an integrates to one constraint. More explicitly, my problem is
$$\begin{align}
&\max_{x \in \mathbb{R}^n}\quad c \cdot x\\
&\text{subject to} \int_{a}^{b} \prod_{i=1}^{n} e^{x_i \cdot y^i} dy <=d
\end{align}$$
where $a, b, d \in \mathbb{R}$, $c \in \mathbb{R}^n$, and $n \... |
I am trying to optimize the execution time for this particular piece of fortran code.
Details:
i_gc is a (ngpts, 3) array of containing (i,j,k) indices for each grid point. This is a subset of the full NX x NY x NZ grid. The subset is connected in the sense that density of sampling varies, but the points aren't scatter... |
I need to use line segments to approximate a function, f = 1/x. The range of x is from 1 to 2048 with an interval of 1. I will pick 10 locations for x and interpolate y between two adjacent x using line segment. The error between interpolated values and real values is expected to be minimum. I am using MATLAB for imple... |
I am interested in numerically solving the following system of coupled ODEs
$$\left(i-\frac{1}{2\Omega}f_{m,n}\right) \frac{d a_{m,n}(t)}{dt} =E_{m,n}^{\text{kin}}(t) + \left(\omega_{0}+V_{m,n}-\frac{i}{2}\gamma+\frac{i}{2}f_{m,n}\right)a_{m,n}(t)
+\left(g-\frac{i}{2}r\right)|a_{m,n}(t)|^2 a_{m,n}(t)$$
Here $m$ and $n$... |
Are there any tools in Python that are like Matlab's parfor? I found this thread, but it's four years old. I thought maybe someone here might have more recent experience.
Here's an example of the type of thing I'd like to parallelize:
X = np.random.normal(size=(10, 3))
F = np.zeros((10, ))
for i in range(10):
F[i]... |
I'm trying to model adiabatic passage between two levels in a three-level atom interacting with two laser fields using Scipy and Numpy..
I'm not sure if my model is wrong due to my incorrectly formulating the equations in python or the Scipy ODE solver picking up errors.
To get the coefficients of each of the three st... |
I am running some quantum chemical calculations on a refurbished PowerEdge rack server, with dual quad-core Xeons, 16GB RAM, and a single 500GB SATA HDD. OS is vanilla Debian Wheezy. For one of the calculation types I'm running, I think I'm becoming disk-I/O-limited and so I installed a spare 160GB HDD I had on hand ... |
When using the SIMPLE method on a mesh with a collocated variable arrangement, the following interpolation is used for the advecting velocities:
\begin{equation}
u_f = \overline{u}_f - \overline{D}_f\left(\left(\nabla P\right)_f - \overline{\left(\nabla P\right)}_f\right)
\end{equation}
where the over bar denotes a geo... |
In this paper on Deep Learning for Machine Learning, the approach is referred to as Hessian-free method. That is because the Hessian is never computed explicitly. Instead, the product of the Hessian and a vector is obtained using finite difference approximation. This is used by the Conjugate Gradient step to compute th... |
Is there a standard approach to testing codes with refined regions? Specifically, I am interested in testing whether the refinement is working correctly.
For the sake of simplicity, let's consider a (time-independent) boundary value problem in a domain with only one refined area, and a case with a known exact solution.... |
I am simulating a Mixed-Boundary value (Dirichlet-Neumann) problem using Finite Difference Method on a unit 3-D cube such that the left, lower, and front plane have $u=u(x,y,z)=1$ (Dirichlet) and right, upper and back plane have $\frac{\partial u}{\partial n}=0$. I know that the true solution is $1$ everywhere and henc... |
I want to use one of these two libraries into my C++ project to basically invert a dense matrix (with Cholesky). Of course, I am interested in a distributed environment.
Both libraries seem nice so choosing between them is hard. Does anybody have experience on them? Can anybody provide a comparison for them?
So far I h... |
I'd like to numerically integrate $\frac{1}{\sqrt{f(x)}}$ on an interval between two consecutive zeros of the function $f(x)$, which makes the integrand singular at two endpoints. Standard practice seems to be to split into intervals so that each has one singularity at an endpoint. However, I don't know the locations o... |
i have an array of boolean variables. The array has a sort of structure, it's formed of many sequences of zeros and ones, sequences of different length. such as:
[1111111100001111111111000000000000001111111000000111111111111111110000]
"commas omitted between values"
i need to separate it in this way
[111111110000],[11... |
I would like to solve for the optimum $A$ values for a series of matrix equations $Ax_{1} = b_{1}, Ax_{2} = b_{2} ... Ax_{n} = b_{n}$ where only the $x$ values are known and when I start with an intelligent guess for $A$. I am using QR decomposition to solve the individual matrix equations for $b$, but wondering how to... |
I currently use FEniCS and Deal.II to solve various FEM problems. I am also writing my own implementation of these problems by directly implementing the data structures, routines, and solvers within PETSc. What kind of comparisons can I draw between these three various implementations given the same FEM problem/discret... |
I am used to using GPU hardware for large scale matrix operations and vectorizing mathematical operations on a continuous space which has been discretized for numerical computation, but this is a completely different problem and I would like to know if it is suitable for a GPU.
Suppose I have a string X of length N and... |
I use Armadillo as an interface to OpenBLAS. In my current program, I have a loop, in which I do multiplications of the form
for(long t = t0; t < t1; t+=tStep)
{
stateMatrix %= elementWiseEvolutionMatrix;
}
The operator % is an element-wise multiplication operator. The problem here is that for matrices of side len... |
It has been known that Fourier power spectrum somehow obeys power law therefore the slope of the spectrum can be used to calculate the fractal dimension of an image. Many people have used it for texture analysis.
I wanted to calculate the Fourier fractal dimension of a binary vessel image and have produced radially ave... |
It is well known that upwind schemes are stable when calculating convection flows with $|\text{Pe}|>2$, $\text{Pe}$ is the Peclet number. Why is that, and why is central difference unstable?
Is there any intrinsic reason there?
Any explanation, references, links will be helpful.
|
I have a collection of sample particles, with (x,y,z) coordinates generated by a simplified Monte Carlo-like code. I expect that these particles will follow an anisotropic diffusion process, which would give me a 3D Gaussian distribution with different variances along different axes (based on the geometry of the probl... |
Given a positive definite symmetric matrix, what is the fastest algorithm for computing the inverse matrix and its determinant? For problems I am interested in, the matrix dimension is 30 or less.
High accuracy and speed is really necessary. (millions matrices are performed)
The determinant is necessary.In each calcul... |
I need to include experimental results for lots of PDE (partial differential equation) matrices in my research work. How can I identify PDE matrices? For example, matrices in the UFL Sparse Matrix Collection.
|
What does the following scipy.integrate.odeint error mean numerically?
Repeated convergence failures (perhaps bad Jacobian or tolerances).
That is, if I have some certainty that the model's programmatic implementation is correct, then what does the error message itself regarding the numerical scheme's issue with the so... |
There are many well defined measures for many basic geometrical objects such as rectangularity (area coverage of minimum bounding rectangle), triangularity (area coverage of minimum enclosing triangle), circularity ratio (area/perimeter$^2$), etc.
I am looking for relevant measures to classify C-shaped objects (or simi... |
With scipy, I have the choice of using "lsoda":
Real-valued Variable-coefficient Ordinary Differential Equation solver, with fixed-leading-coefficient implementation. It provides automatic method switching between implicit Adams method (for non-stiff problems) and a method based on backward differentiation formulas (B... |
I have been stuck at this problem for a while :(
Given $\mathbf{A}\in\mathbb{R}^{p\times p}, \mathbf{A}\ge 0,\mathbf{A} \text{ symmetric}, \mathbf{b}\in\mathbb{R}^n,\mathbf{c}_i\in\mathbb{R}^p\forall i,\mathbf{d}\in\mathbb{R}^p$.
Consider the function:
$$f(\mathbf{x},\mathbf{y},\mathbf{z}) = \sum_{1\le i\le n} x_i\mat... |
To somewhat follow up on the question asked here, I have been told that the Roofline model is one way of assessing the performance of any scientific code. Basically I compute the Arithmetic Intensity (ratio of FLOPS over DRAM bytes) and multiply this by the STREAM bandwidth to obtain the ideal FLOPS/s. I could also use... |
I obtained a mass matrix through Finite Elements discretization. Now, I want to check if it is symmetric. To do that I subtract to my matrix $M$ its transposed $M^T$. The result is another matrix of which I compute the norm. The norms that I use are max norm defined as $\max(|a_{i,j}|; i,j)$ or infnorm defined as $\max... |
I am solving a PDE, and one of the intermediate steps is to numerically integrate a function over a compact interval. The function is represented on a linearly spaced grid. I am using Simpsons rule (so I use the value of the integrand at $x_i$,$x_{i-1}$ and $x_{i-2}$ as well as the value of the integral at $x_{i-2}$ to... |
I have a grid of data on a 3D Cartesian grid and I would like to find a routine that will allow me to input this data and output a spherical harmonic transform for specific values of radial distances. Does anyone know if such a routine exists??
Thanks
|
I have implemented a backward-Euler solver in python 3 (using numpy). For my own convenience and as an exercise, I also wrote a small function that computes a finite difference approximation of the gradient so that I don't always have to determine the Jacobian analytically (if it is even possible!).
Using the descripti... |
Can I solve the integral given below using Matlab?
$$\frac{C(J)}{C_0} =
\frac{2e^J}{\pi}\int\limits_{0}^{\infty} \frac{e^{\frac{\gamma}{2}\left[1 - \sqrt{\rho}\cos(\theta/2)\right]}}{a_1^2 + a_2^2} [a_1\cos(ZJ-w) + a_2\sin(ZJ - w)]\, dZ$$
where
\begin{align}
&\theta = \arctan(v/u)\\
&u = 1 + \frac{4}{\gamma}\left[1 + \... |
I have been trying for 2-3 days now to get L2 regularized logistric regression to work in Matlab (CVX) and Python(CVXPY) but no success. I am fairly new to convex optimization so I am quite frustrated. Following is the equation that I am trying to solve using CVX/CVXPY. I have taken this equation from the paper
https:... |
I am a beginner with Unix and MPI. For the serial program, I run the program by typing make in /directory/buildagain and then ./runPR.sh values.txt. (values.txt just contains the line Chain)
Here is a small portion of my code.
int main( int argc, char *argv[ ] )
{
if( strcmp(argv[1],"-PR") == 0 )
ru... |
Let W be a graph Laplacian (symmetric diagonally dominant, and thus PSD), and X the matrix variable.
Let $<A,B>=Tr(A^TB)$.
$$\text{Maximize}\;\; \displaystyle\sum_{i,j} w_{ij}(x^{(i)}\cdot x^{(j)})$$
$$\text{Subject to}\;\; x^{(i)}\cdot x^{(i)}=1$$
I want to write this in standard semidefinite programming form. The be... |
I have an equation $Ax=b$ for which I need to solve for numerous $x$ matrices given $b$. Both $x$ and $b$ are nx1 matrices. Unfortunately, $A$ is a 32x32 matrix and inversion gives highly unstable values. I am wondering what the appropriate algorithm/technique is for obtaining a stable $A$ matrix.
My searches for an al... |
I am going to rewrite an algorithm using genetic methods for mutating my solutions, and I am wondering what I should expect and only consider my algorithm "optimized" or "finished" if various runs of the algorithm give the same result.
For example, if I run the program once and get a good solution, "A", but the second ... |
I am trying to plot spherical particles in a cube of fixed dimension in matlab. I face a problem here where the center of the sphere is too close to the edge of the cube in this case the rest of the sphere needs to be plotted in the opposite side. I hope I am clear. How can I do this
|
I simulated nanowire deformation using LAMMPS and visualized it using VMD in Centos 6.5. But I'm not able to generate .jpg image file or the simulation movie. How can I proceed??
|
I have seen in some papers that the energy levels in some arbitrary potential are specified. How can one find the energy levels in such arbitrary potentials. For example, $V(x)=\sin^2(x/2)$ with $x\in[−3\pi,3\pi]$.
I understand that in a triple well potential, there will be 3 bands comprising of three energy levels. B... |
I am currently working on a CFD code over a cubic grid. Now, the number of elements used in the simulation is decomposed among the number of processors. Each of those processors (a section of the cube) is then divided up in a number of elements that corresponds to the polynomial order. I would like to understand the ma... |
I am a beginner in adaptive mesh refinement (AMR). After I am done with the first two papers by Dr. Marsha Berger, I was trying to write my own code for a problem which has a parabolic partial differential equation. In this regard, I wish to know if I could use the same trick as described by Dr. Berger to this problem?... |
Hyperbolic space in the Poincaré upper half space model looks like ordinary $\Bbb R^n$ but with the notion of angle and distance distorted in a relatively simple way. In Euclidean space I can sample a random point uniformly in a ball in several ways, e.g. by generating $n$ independent Gaussian samples to obtain a direc... |
I am trying to solve the 1-dimensional diffusion problem numerically using method of lines:
$$ \frac{\partial c}{\partial t} =D \frac{\partial^2 c}{\partial z^2},$$
where the right hand side is discretised and the left hand side is handled with a standard ode solver.
I have two boundary conditions. One boundary condit... |
I am trying to solve the Navier Stokes equations using the finite element method. I plan on using the pressure correction method to deal with the pressure and an implicit time stepping scheme for diffusion and an explicit time stepping scheme for convection. My question is: How does one deal with the non-linear term us... |
I am trying to fit a restricted cubic spline (natural cubic spline) with 4 knots to toy data, attempting to follow
Hastie, Tibshirani, Friedman 2nd ed. 5.2.1 p.144-146, Eqs 5.4 and 5.5.
Data: Is basically a transposed ‘S’ shape. R-code is:
n <© 100
x <- (1:n)/n
true <- ((exp(1.2*x)+1.5*sin(7*x))-1)/3
noise <- rnorm(n,... |
I have the underdetermined outer optimization problem
$$\text{min}_{x\geq 0}\quad \|Ax-b_1\|_2^2+\|AT(x)-b_2\|_2^2$$
with $A\in\mathbb{R}^{m\times n}$ and $m<<n=64^2$ or in corresponding CVX Matlab code
variable x(n) nonnegative
minimize(sum( (A*x-b1).^2 + (A*T(x,p1,p2,p3,p4,p5)-b2).^2 ))
where p1,...,p5 are fixed par... |
Is there an analytic solution or series approach to the 2D time-dependent heat equation in a square with a harmonic source and Neumann boundary conditions $\nabla u.n=0$?
|
Wikipedia tells me that the equations for linear elasticity and biharmonic equations have the same solution for Dirichlet boundary condition. How do you show the equivalence in the variational formulation?
|
When solving time dependent PDE's using the finite element method, for example say the heat equation, if we use explicit time stepping then we have to solve a linear system because of the mass matrix. For example if we stick with the heat equation example,
$\frac{\partial{u}}{\partial{t}} = c\nabla{}^{2}u$
then using f... |
I try to use sparse matrix operations in GPU in Python and now try to use PyCUDA with theano. But I can't find how to do sparse matrix and vector multiplication. I only got an example showing how to solve $A\cdot x=b$ using CG from the library document. Is there any document or example detailing how to do some basic sp... |
If you want to use a computational library on a high-performance computing center where you have no root access to install new software you can use header-only template libraries such as MTL4, Eigen3, GMM++ easily by including the library folder in the linking path. How about other libraries such as PetSc, Trilinos, Ar... |
Suppose we have an initial value problem of the form
$$ \frac{\mathrm{d} \mathbf{x}}{\mathrm{d} t} = f(\mathbf{x}) \qquad \mathbf{x}(0) = \mathbf{x}_0 $$
where $\mathbf{x}_0 \in \mathbb{R}^n$ is known exactly (i.e. to unlimited precision) and we can efficiently evaluate $f: \mathbb{R}^n \to \mathbb{R}^n$ to any precisi... |
I have a quantity which is estimated from a number of noisy measurements. I know that the real underlying value must be some integer multiple of two quantities, e.g. $M = I_1C_1 + I_2C_2$ where $C_1$ and $C_2$ are some known (from theory) values and $I_1,I_2$ are the unknown integer multiples.
I'm casting this as a lea... |
Are there guidelines to follow in selecting the right FE discretization. Specifically, for subsurface flow models like Darcy's equation (both single and multi-phase), Richard's equation, etc.
I know one of the most important issues in the fluid mechanics community is the issue of local mass conservation, which the stan... |
I am reading the work "Blessing of Dimensionality High dimensional feature and its efficient compression for the face verification" CVPR 2013.
One of the key contributes is the authors propose a new so called "rotated sparse regression" method for the dimension reduction. However, I don't know how to get the closed fo... |
The answer to this question implies that reducing the time step would make it more stable. However I have tried reducing the time step but the system is still unstable(the total energy increases to a very large value). What I understand is that if two balls are very close and the end of some step, in the next step they... |
I am doing some statistical signal analysis and was wondering if there are any C/Java packages that do L-moment calculations, specifically L-Kurtosis as I am wanting to do things such as differentiating delta trains and sine waves with similar standard deviations, as one example.
If there are other more appropriate sha... |
I am trying to make a very simple molecular dynamics simulator with Reflective Boundary Conditions. I am assigning the initial positions in a cube randomly while making sure they are not too close to each other and keeping the initial velocities zero. I am using the Lennard-Jones potential and Velocity-Verlet algorithm... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.