instruction stringlengths 43 28.1k |
|---|
Say I have slow and fast versions of some code, and want to report a speedup number comparing the two. I run the slow version $n$ times and the fast version $m$ times, producing times $(s_1, \ldots, s_n)$ and $(f_1, \ldots, f_m)$. The simplest way to produce a speedup is to average the means:
$$\frac{\bar{s}}{\bar{f}... |
I have to approximate the smallest eigenvalue of the following generalized eigenvalue problem
$$
- \nabla \cdot D(x) \nabla p(x) + \alpha(x) p(x) = \lambda \beta(x) p(x)
$$
over a domain like follows (many more subdomains, this is only an approximation to illustrate the problem)
The eigenvalues are all positive, so t... |
I am trying to build a complex simulator for the transport of mass & heat in porous media. I am currently following coarsely the algorithm laid out in an older software and have got the simulator to work, but the iterative solvers that I use run into trouble at large timesteps and prevent the convergence of the system ... |
Let $\Sigma$ be a covariance matrix (e.g. symmetric positive definite). For arbitrary vectors $\epsilon$, I need to compute $\chi^2 \equiv \epsilon^\top\Sigma^{-1}\epsilon$, which I do using a Cholesky decomposition.
If $\Sigma=I$, then $\chi^2$ would be the 2-norm of $\epsilon$. I would then say that each coefficient ... |
I am trying to solve Poisson-Nernst-Planck system of equations for ions diffusion problem using finite volume method. Nernst-Planck equation for mass transport and Poisson equation for electrostatic charge distribution.
My jacobian is sparse and ill-conditioned (condition number ~ 1E+14). For a system of 4 ions and th... |
I have real symmetric positive definite matrix $M = \left(\begin{matrix} a & b \\ b & c \end{matrix}\right)$ where $a,b,c \in R,\ a,c>0,\ \left|b\right|<2\sqrt{a c}$.
I want to define CONVEX objective function of $M$ (preferably polynomial) which has minimum value for prescribed value of trace and determinant of $M$, ... |
I have a master equation for $P(N_A^+,N_B^+,N_C^+,t)$, with $N_A^+,N_B^+,N_C^+$ all discrete. The numerical integration is done by this Matlab program using Euler's method. Despite the crude Euler's method, the results from numerical integration are in agreement with the simulation, so the correctness of the program is... |
As you will know there are different numerical integrals (I believe Levin's method is the most popular one) for the numerical quadrature of oscillating integrands which may roughly speaking be written as a product of oscillating part and non-oscillating amplitude $exp(i \omega t) A(t)$ (the form can of course be slight... |
I am looking mainly for c/c++ implementations but also for theoretical algorithms to compute gaps between smallest positive eigenvalues of symmetric, singular matrix or real numbers. To be precise, I want to find index n of the eigenvalue such that between $\lambda_n$ and $\lambda_{n+1}$ (both are nonzero) there is the... |
I have an optimization problem that looks like the following
$$
\begin{array}{rl}
\min_{J,B} & \sum_{ij} |J_{ij}|\\
\textrm{s.t.} & MJ + BY =X
\end{array}
$$
Here, my variables are matrices $J$ and $B$, but the entire problem is still a linear program; the remaining variables are fixed.
When I attempt to enter this pro... |
I recently discovered that, in MATLAB 2013b at least, it is significantly faster to do repeated multiplication rather than integer powers. That is,
tic;test4p = a.^4;toc
is much slower than
tic;test4m = a.*a.*a.*a;toc
See http://www.walkingrandomly.com/?p=5377 for full details. Is there any numerical reason (accur... |
I'm considering learning a new language to use for numerical/simulation modelling projects, as a (partial) replacement for the C++ and Python that I currently use. I came across Julia, which sounds kind of perfect. If it does everything it claims, I could use it to replace both C++ and Python in all my projects, since ... |
I know that the finite volume method (based around a central different stencil) is unstable for advection dominated advection-diffusion problems. This leads to different adaptive schemes to can be applied to stabilise the basic approach (such as exponential fitting).
However, I don't have broad understanding of stabili... |
I am currently trying to port my code over to Trilinos because the problems that I am working on are too big for LAPACK/ARPACK. Specifically I am computing the generalized eigenvalues/eigenvectors:
$$\mathbf{A}x = \lambda\mathbf{B}x$$
where both $\mathbf{A}$ and $\mathbf{B}$ are large and sparse. I am mainly interested... |
I dont understand how this Higher Order Compact ADI scheme, which is fourth order in time and space, for the wave equation is derived:
I go through the following
Using Tylor's expansion $u(t+h,x,y)$ and $u(t-h,x,y)$ about the point (t,x,y) we have:\
(1)
\begin{equation}
\label{311}
u(t+k,x,y)-2u(t,x,y)+u(t-k,x,y)=k^2\l... |
I have a fairly sparse adjacency matrix showing connections between approx 5,000 points in my dataset. I'm looking at various ways to analyze the relationships between the data points.
This approach looks interesting:
https://www.cs.purdue.edu/homes/dgleich/demos/matlab/spectral/spectral.html
The author sorts the adjac... |
For a serendipity element, the shape function of a middle pt on a edge can be formed using the tensor product in each direction, e.g. point 5 on Quad8
$$
\phi_5(\xi,\eta)=\frac{1}{2}(1-\xi^2)(1-\eta)
$$
but the shape function on corner node (point 1) is
$$
\phi_1(\xi,\eta)=\frac{1}{4}(1-\xi)(1-\eta)-\frac{1}{4}(1-\xi^2... |
I have a generalized eigenvalue problem in the standard form
$\lambda \mathbf{B} \mathbf{x} = \mathbf{A} \mathbf{x} $,
resulting from a finite difference discretization of a coupled system of two linear stability equations, so the system is large $(10^5 $ x $10^5)$ and sparse. I know that $\mathbf{B}$ is indefinite, an... |
If while distributing particles to their corresponding nodes, two particles comes closer to a level smaller than the machine precision (or $\Delta d \to 0$), how is the situation to be treated? Should the recursive distribution stop and both of them be added to a single node?
This happens because of treating particles ... |
A lot of adaptive FEM libraries use more advanced mesh data structures to handle adding/removing nodes, edges, triangles, tetrahedra, etc. For example, the p4est library uses octree data structures for adaptive mesh refinement; you wouldn't often find octrees used for computations on a static mesh.
What changes on the ... |
I have a Simplex problem $ A y \ge b $, where some of the elements of $b$ are positive and some are negative, and thus setting $y = 0$ does not give a basic feasible solution (BFS). By previous work, however, I happen to know a specific BFS. How do I then set up the table to start at this BFS instead of the standard $y... |
Say I run a supercomputer computation on 100k cores for 4 hours on http://www.nersc.gov/users/computational-systems/edison/configuration, exchanging about 4 PB of data over the network and performing about 4 TB of I/O. The calculation is all integer, so the results are either right or wrong (no intermediate numerical ... |
I need to solve two point bondary problem for ODE. The solution of the problem itself is very easy. The real issue is that when solving arising non linear system of equations it always converges to one solution. However there exist two (physically justified) solutions. To illustrate this problem in detail consider the ... |
I'm dealing with physical simulation (position based dynamic). Now I'm trying to realize tracking for two meshes. In order to explain what does it mean, let's assume that we have two similar meshes: one with fine resolution and other with coarse. A need to make in the way that mesh with fine resolution followed the coa... |
I have a one dimensional convex function
$$f : [a,b] \to \mathbb{R}$$
and want to find the minimum value
$$\min_{a \le x \le b} f(x)$$
I know all derivatives of $f$, so the problem could easily be solved with any 1D minimization method even ignoring the convexity. However, I would like to not ignore the convexity:
Que... |
I am trying to maximize the following function (variable: $\theta$, a vector ($\theta_1$,...,$\theta_K$). most likely $K\leq5$
$$
\begin{aligned}
F(\theta, c_0, c_1) = &P_{\theta}(T_0 > c_0, \max T_i >c_1, \min T_i <-c_1) \\
&+ \sum_{S \subset \{1,2,.,K\},\\ 1\leq |S|\leq K-1} P_{\theta}(T_0 > c_0, \min_{i\in S} |T_i|... |
I have case of a rotating fan at Low- speed ie about 300-400 rpm. I have successfully carried out RAS simulations using cyclicAMI approach where, the motion of the fan is modeled as rigid body rotation of a cylindrical AMI mesh section, which has same speed as our fan. I have tried various levels of mesh refinement and... |
Am quite new to wavelet analysis and would like some help. I am performing a spatio-temporal analysis of monthly gridded rainfall data. With PCA, I can reduce the dimension of the rainfall data into a few leading modes, yielding EOFs (which explain spatial variability) and principal components (explaining temporal vari... |
I have a large array of zeros and ones and I need to count instances of
0 1 1 0 0 0 1 1
0 1, 1 0, 1 1, 0 0
And I would like to exclude all other $2 \times 2$ submatrices... such as
0 1 1 1
0 0, 1 0, etc.
In the space of $2 \times 2$ binary matrices has $2^4 = 16$ elements, and I could... |
I'm working with non-linear optimization for imaging, such as MRI and CT.
Our problem is of the form $\|Ax-b \|_2^2+\lambda \|Wx\|_1$. $A$ is never formed explicitly, so we're limited to approaches that only use $Ax$ and $A^Hf$. Even so, these evaluations are quite expensive, whereas $Wx$ and $W^Tx$ are quite inexpensi... |
This should be easy, but...
I would like to express the singular value decomposition of a 2 x 2 complex matrix $A$ as function of its coefficients $A_{ij}$. In "closed form", no intermediate values, straight up.
What I mean is that if I express the SVD in terms of eigenvalues, say, then I have to write those eigenvalue... |
I have an orthotropic material with a (6x1) stress vector known in the global coordinate system and yield surfaces known in a local coordinate system. So far I have only needed to convert from local to the global system and this has been done in the standard way of C = G.T*D*G where C is the stiffness matrix in the glo... |
The question is if Python Numpy library can use back subsitution to solve Ax=b if possible, that is, if A is lower triangular? Do numerical linear algebra packages do this? I would think Numpy would detect the triangular state and use the proper approach, but a Google search returns things like scipy.linalg.lu_solve or... |
In light of this question and some stuff I read online I am wondering if large FE libs (e.g., deal.ii, libmesh etc.) that do AMR keep the entire mesh or possibly a coarse version of the entire mesh on each core. Also, does this limit the size of the problems that can be solved on machines with low RAM per core.
Finally... |
In which problem category can I put a quadratic programming problem with only continuous values whereas the matrix A should be symmetric but needs not to be positive semi-definite?
minimize/maximize x' * A * x
whereas
lowerbound <= x <= upperbound
Can I reformulate it as a Mixed Integer Problem for example?
Or is ther... |
I am interested, how can we get CFL condition for every type of PDE? It's known that for 1st order linear equation
$$\frac{\partial u}{\partial t}+a\frac{\partial u}{\partial x}=0 $$
CFL is get from characteristics method, but how can we get in general? Any your advise will be welcome.
|
I use gpbsv command from Intel MKL to solve symmetric positive band system. But unfortunately when the system is large I get an error Access violating writing location in VisualStudio.
Could someone give an advice how could I solve this system. Maybe I could use more optimized library? Maybe it's simplier to write my o... |
What software or sites might simulate an N-body gravitational problem? Application is related to Klemperer Rosette or Iridium Satellites. Bias for C, C++, PHP, or Java. Nice visuals a big plus.
Similar questions are here in Computation Science for binary stars, satellites and comets but I need to simulate several pla... |
I have a nasty system of coupled integral equations, which I managed to discretize and recast a non-linear system, i.e. something like:
$$ \vec{w} = F \left( \vec{w} \right) \hspace{32pt} w \in \mathbb{R}^n$$
I am employing a naive iterative solution method. For some reasonable initial choice of $\vec{w}$ I repeatedly ... |
I am trying to write a 2d pseudo-spectral DNS code with random initial velocities. This is kind of a classic simulation where the very tiny vortices group together forming larger and larger vortices as the spectral energy cascades upward. So far I have done what I think is the intuitive thing to do: I have done a split... |
The model I'm working on is a multinomial logit choice model. It's a very specific dataset so other existing MNLogit libraries don't fit with my data.
So basically, it's a very complex function which takes 11 parameters and returns a loglikelihood value. Then I need to find the optimal parameter values that can minimi... |
Going to teach students of undergraduate level a course titled Introduction to Computer Programming. I am confused a bit. In Computational Physics scientists use C/C++ or Python or Fortran,CUDA etc..... this is time to build their base. What should I use? I know you can learn new programming language anytime in your li... |
I have constructed a function in Matlab that is convex and increasing (qualitatively similar to an exponential function but I am hoping to avoid the successive approximation requirement of exp). In my specification of the function I take a minimum of two convex functions which of course does not, in general, result in ... |
I'm trying to get a frequency plot, or PDF (probability density function) plot for my biometrics project in MATLAB.
I have two vectors genuine_scores and impostor_scores, and I need to have a graph like:
x-axis : value of elements
y-axis : frequency of that value
So the graph should look like this :
I tried probplot... |
I am trying to solve an assignment on solving the Bogoliubov de Gennes equations self-consistently in Matlab. BdG equations in 1-Dimension are as follows:-
$$\left(\begin{array}{cc}
-\frac{\hbar^{2}}{2m}\frac{\delta^{2}}{\delta z^{2}}-\mu+V\left(z\right) & \triangle(z)\\
\triangle(z) & \frac{\hbar^{2}}{2m}\frac{\delta... |
I am stuck with a problem about finding the condition number of an algorithm. I tried to find an example, but i couldn't. Can anybody help me, please?
Given is $f(x)=\ln(x)$. We have the algorithm $f_{A}(x)=[\ln(x)](1+\varepsilon )$, where $\left | \varepsilon \right |\leq 5\mathrm{eps}$ and $\mathrm{eps}$ is the mac... |
The objective function is $L = D(B)$, here $D$ is a function of $B$ and $D$ is a convex function. We have a prior information of $B$: it is rank one and we can write $B$ into $B = pq^T$. So we can change the objective function into $L=D(p, q)$. Obviously, for $p$ and $q$, this problem is not a convex problem anymore an... |
Is there a way of estimating Pi with the Buffon's method without assuming Pi known?
To be more precise: in a Monte Carlo simulation of the experiment invented by Buffon I would (ideally) generate 2 random numbers with uniform distribution within [0,1] and [0,Pi] respectively (the two numbers being the distance of the c... |
I need to get a stability criterion for the numerical scheme for equation
$$\frac{\partial u}{\partial t}-\frac{\partial^2 u}{\partial x^2}-\frac{\partial^2 u}{\partial y^2}-\frac{\partial^2 u}{\partial z^2} -\alpha\frac{\partial u}{\partial x}-\beta\frac{\partial u}{\partial y}-\gamma\frac{\partial u}{\partial z}-f=0 ... |
I want to discretize the LWR(Lighthill-Whitham-Richards)-v partial differential equation (as shown in 1)
$$
\frac{\partial u}{\partial t} + \frac{\partial R(u)}{\partial x} = 0 \quad \text{i.e.,} \quad \frac{\partial u}{\partial t} + \frac{dR}{du}\,\frac{\partial u}{\partial x} = 0 \quad \dots\dots \quad \text{(1)}
$... |
I'm dealing with SVDLIBC library. In order to compute singular values I need to specify my matrix in the Harwell-Boeing format. On Internet I have found next example:
Dense Text Format:
4 3
2.3 0 4.2
0 1.3 2.2
3.8 0 0.5
0 0 0
Sparse Text Harwell-Boeing Format:
SVDLIBC v. 1.32
3 ... |
I want to compute an integral with the following code written in Matlab.
function f = LO_scheme2a(r,kk)
% Run the Prog by : q = integral(@(r)LO_scheme2a(r,kk), 0, inf)
%% System parameters
lambda_m= 10^(-2);
lambda_f= kk.*lambda_m; %can be changed based on scenario
mu= 10^-4; %user density (find the proper user dens... |
Unless I'm mistaken, deep neural networks are good for learning functions that are nonlinear in the input.
In such cases, the input set is linearly inseparable, so the optimisation problem that results from the approximation problem is not convex, so it cannot be globally optimised with local optimization. Support Vect... |
Within the manual, the effective/von Mises stress or Hill's potential for anisotropic bodies is calculated in Abaqus in cartesian rectangular coordinates as
$\sigma_{eff}=\sqrt{I_{1}^{2}-3I_{2}} \\
f({\sigma})_{Hill}=\sqrt{\big( F(\sigma_{22}-\sigma_{33})^{2}+ G(\sigma_{33}-\sigma_{11})^{2}+H(\sigma_{11}-\sigma_{22})^{... |
I am working on analyzing a data set and I was wondering what would be the most statistically valid method of demonstrating that there is a strong spatial correlation between images.
I have a data set with about 50 pairs of images of cancerous tissue samples. The first image in each pair shows the locations of gold nan... |
I need to calculate the integral
$$I = \int_0^R f(r)J_n\left(\frac{z_{nm}r}{R}\right)rdr$$
where $J_n$ is the $n^{\mathrm{th}}$ order Bessel functions of the first kind, $z_{nm}$ is its $m^{\mathrm{th}}$ zero and $f(r)$ is a real function which is somewhat similar to $J_n$ (but not the same, it is quite complicated and... |
The parallel FFTW3 distributes different portions of a large data to different processors, so that each processor obtains and manipulates only a small fraction of the large size data that wants to be fourier transformed.
I am wondering, at the end of the transformation, as the transformed data are locating at differen... |
I am trying to calculate the numbers $n$ for which the $n$-th Fibonacci number $F_n$ is a multiple of $n$; that is fib(n)%n==0.
Here is the best PARI code I could come up with (for the counting function).
fibmod(n)={return(lift(((Mod([1,1;1,0],n))^n)[1,2]));};
S(n)=sum(k=1,floor(n),if(fibmod(k),0,1));
With this, I ca... |
I'm using modal decomposition to predict the steady state response of a beam structure to harmonic loading. The structure itself is very lightly damped, but we know from experiments that the aerodynamic drag force as it moves through the air is very significant.
I have the mass and stiffness matrices for the beam ($\bo... |
I've always heard that easy parallelization was one of the advantages of DG methods, but I don't really see why any of those reasons don't also apply to continuous Galerkin.
|
I'm working on this application where
I get the spectral decomposition (O,D) of a matrix A for free (A is of full rank) but not A itself, and I need to only recover the last column of A. I was wondering if there was a more efficient way to do this than reconstructing the whole of A first?
|
I have installed OpenCV and IntraFace, now the code can detect landmarks on the face, like this :
Now how can I convert this to a smile detector?
I have the landmark points as an array, so I should probably first find which ones belong to the mouth. How can I do that? Are there any tutorials for IntraFace? I could no... |
I have a function called f(x) which is convex and I can have access to its first order derivative , my objective function is
$$\ J(\bf{x}) = f(\bf{x}) + \lambda |\bf{x}|_0 $$
$$\ \bigtriangledown f(\bf{x}) \space is \space available$$
Could you please provide a list of state of the art methods in the literature that ... |
All the papers I have seen on DG methods for hyperbolic conservation laws together with limiters to compute discontinuous solutions make use of Taylor polynomial basis (Pk basis) or Legendre polynomials. In these cases, limiters have been developed. But if I want to use nodal basis on quadrilaterals/rectangles, then I ... |
I am working on a project involving some pattern recognition. For this I need to find the maximum value in a huge multidimensional dataset. For example I have a discrete 5-dimensional space containing 10^10 data points. Of course I can just do an exhaustive search but time is of the essence so I am searching for an tim... |
I would like to perform the numerical integration of an integral of the form
$$ \int_{-\infty}^\infty e^{i \omega 0+} G(i \omega, \mathbf{v}) d \omega ,$$
or, using the symmetry $G(i\omega)^* = G(-i \omega)$,
$$ \int_0^\infty \Re(e^{i \omega 0+} G(i \omega, \mathbf{v}) ) d\omega ,$$
where $\mathbf{v}$ is a vector of a... |
I need the Truncated SVD implementation in java.
I need to pass a matrix of doubles and an integer value representing the rank where to filter out noise. In output i need a filtered matrix of doubles.
Is there something ?
Thank you
|
I am looking for finding the velocity distribution using Principle of Maximum entropy when applied to Tsallis entropy.
Tsallis entropy is defined as:
$$
S_{T} = \frac{1}{q-1}\left(1-\int{f(p)^qdp}\right)
$$
I have the following constraints:
$$
\int{f(p)dp}=1\\
\int{pf(p)dp}=0\\
\int{p^2f(p)dp}=1\\
\int{p^3f(p)dp}=0\\
$... |
$\def\pd{\partial}$
$\def\l{\left}\def\r{\right}$
$\def\mdot{{\dot{m}}}$
$\def\eps{\varepsilon}$
Consider a tube with longitudinal coordinate $x$ from $0$ to $l$ and
varying cross-section $A(x)$. Derek S. Bale (a former student of
Prof. Randall J. LeVeque) gives in his PhD (http://faculty.washington.edu/rjl/students/d... |
I want to simulate the diffusion of initial dye concentration in a small estuary with a 2D depth averaged model. Would a radiation boundary condition for concentration of tracers alone be enough or do I need to define any additional conditions at the open boundary?
|
I had always assumed that the covariance matrix depends upon the amount and quality of your input data, but I am finding out that this is not the case. Is this true?
We want to fit $f(t) = \Sigma_{i=1}^{M} ( x_i t ) $ to the $N$ datapoints $(t_i,y_i)$ by using the matrix
$A_{i,j} = \phi_j(t_i)$ where $\phi_j$ are the ... |
I am trying to solve the time dependent heat equation with backward euler timestepping and second order space finite differences. This results in a Poisson system needing to be inverted. In serial this is trivial to solve, but I am not sure how one would go about doing this parallel with MPI. Does anyone know how to so... |
I am working on a fluid simulation using vortex methods. For this I must compute the vortex sheet on my boundaries given as:
$$
\gamma(\mathbf{x}) - \frac{1}{\pi}\int_S \frac{\partial}{\partial\mathbf{n}}(\text{log}|\mathbf{x} - \mathbf{x'}|)\gamma(\mathbf{x'})d\mathbf{x'} = -2\mathbf{u}\cdot \mathbf{s}
$$
I have two q... |
I want to calculate ${n \choose k}/2^n$ for moderate $n$ and $k$. In Matlab, use nchoosek(n,k) with $n=60$ and $k=30$ will give a warning: "Warning: Result may not be exact. Coefficient is greater than 9.007199e+15
and is only accurate to 15 digits ". I understand that $60\choose30$ is a huge number, but what I really ... |
I have here equations from a paper by E. Bradlow. They're for counting the events in a Weibull-distributed data set.
$$\begin{align}
\Pr(N(t)=n) &= \sum_{j=n}^\infty{\frac{(-1)^{j+n}(\lambda t^c)^j \alpha_j^n}{\Gamma(cj+1)}} \\
E(N(t)) &= \sum_{n=1}^\infty{\sum_{j=n}^\infty{\frac{n(-1)^{j+n}(\lambda t^c)^j \alpha_j^n}{... |
Can anybody recommend me a good introduction to Crouzeix-Raviart Finite Elements? Their motivation is not obvious and the body of literature is hard to overlook.
|
I am trying to understand an example from a book, but I seem to get different answers depending on which spectral decomposition function I use in NumPy.
I am trying to find a spectral decomposition $W V W^\top$ of a given symmetric matrix $G$ using NumPy functions eig and eigh, where the latter is for symmetric matric... |
I am trying to find the effect on turbulence characteristics when flow passes through a converging section. For this experiment I will use a PIV system to gather data about the flow.
However, I could not find any specific literature on flow through symmetric converging channel. (The converging channel I would be using... |
I used MKL Lapack SBGVX because it can solve for "selected" eigenvalues/modes (both positive and negative), thinking it would be efficient, but it is extremely slow when compared with Bathe's subspace iteration eigensolver, which unfortunately can solve only for positive eigenvalues. I need only the smallest positive e... |
For my problem I need to extract the lower convex hull of a set of 3D points (X,Y,Z). In Matlab, one can find the convex hull using the convhull function as follows: K = convhull(X,Y,Z).
Could anybody please suggest me a way to extract the lower hull from the convex hull? I found many references/code for 2D case but fo... |
I have tinkered around with the implementation of hybridizable Discontinuous Galerkin (HDG) methods in DUNE-PDELab and DUNE-FEM for my PhD but since then I have not had the time to work on these codes very much. Some things were possible back then, but others such as element-wise assemblies of the facet contributions o... |
I am reposting here a question previously asked in stackoverflow: as suggested in a reply to my question, scicomp could be a better place to obtain some useful comments/suggestions for my problem.
I am trying to make some tests with BLACS/Scalapack (C interface, Intel MKL version) making use multiple MPI communicators:... |
$\def\rmin{{\mathrm{in}}}$
$\def\l{\left}\def\r{\right}$
$\def\tagl#1{\tag{#1}\label{#1}}$
I am using the one-dimensional finite volume method to calculate the air flow in some tube.
For subsonic flow one can predefine two quantities at the inlet.
The inlet is a wide opening to the ambient.
The overall system deeply i... |
Typical finite element problems assume $L^2$ which is a Hilbert space, but I've heard that $L^1$ for Navier-Stokes results in less overshoots/undershoots, but $L^1$ is not Hilbert. The dual space for $L^1$ is $L^\infty$, so it seems that we might want some sort of Petrov-Galerkin formulation. But practically, do these ... |
I am trying to find specific eigenvalues and -vectors of a large complex symmetric tridiagonal matrix (at least 10000x10000, and ideally larger). I know roughly which eigenvalues I am looking for, so I've been using scipy.linalg.sparse.eigs (really ARPACK) to find them. Unfortunately, this has turned out to be slow for... |
I looked at the list of publications related to deal.II, but it seems that when it comes to Navier-Stokes equations, everyone speaks about Discontinuous Galerkin solver in their papers. I know there's also a Continuous Galerkin method implemented in deal.II. Has it been used for high-order accurate solution of Navier-S... |
I've got a little conjecture I need to prove for a theoretical result related to causal Bayes net search with latent variables under sparsity constraints. If you're interested in the application please feel free to email me at adambrod@andrew.cmu.edu.
Here's the problem:
Suppose we have a $p\times q$ real matrix $A$ s... |
I need to develop a FVM code in C (The multiscale FVM method for heterogeneous media). I know that:
Only uniform rectangular grids will be considered (2d now, later 3d)
Sparse systems will be large
Need to parallelize my code eventually (will be solving local
problems on fine grid and use them to solve PDE on coarse ... |
I have been writing some code in C for particle-in-cell simulation.
One of the steps of the PIC algorithm requires to solve (numerically) Poisson's equation
$$
\Delta \varphi = - 4 \pi \rho.
$$
Initially I want to limit the program to 2d case ( instead of 3d ) and use the finite difference method ( instead of finite el... |
I have a (very) large sparse matrix in CSC form and I'm supposed to factorize it. I've read that between Givens and Householder transformations, Givens is better for a sparse matrix. The problem is that I don't really know how I should do it (everything's fine for a full matrix, but now all I have are three vectors).
I... |
I am measuring the electric field in the closure box with aperture and using probe to achieve that. But I have a problem. When I use the probe for measurement, results are not accurate in transient solver. So, I changed the settings in the transient solver > Specials and I use the program with high number of pulses opt... |
I am taking a course on scientific computation, and we just went over least squares approximation. My question is specifically about approximating using polynomials. I understand that if you have n+1 data points, you can find a unique polynomial of degree n that describes all of these points. But I can also see why thi... |
I have a stochastic process (a Markov chain actually) that has two absorbing states. I am using a difference equation to calculate the first passage time to either of the absorbing states. There are several parameters in the equation.
For set of parameters, the empirical cumulative distribution function looks like the ... |
I am plotting a saturation field (as the solution of a finite element problem, using trisurf in MATLAB). Ideally, I would like to obtain the two-dimensional profile of this surface along $y=0$. See Figure 4 of this paper for an example. I am not really familiar with MATLAB's plotting routines but I noticed there's a fe... |
I searched for Gilbert-Peierls algorithm, but I haven't found anything useful (well, I found this, but it's not working as it should). I think the problem is the second part, and also that those lines:
U(1:k, k) = x(1:k);
L(k:N, k) = x(k:N)/U(k, k);
should actually be (according to this example):
U(1:N, k) = x(1:N);
L... |
I asked a similar question on physics.stackexchange, being ignorant about this website.
I am basically looking for an efficient way to implement gravitational fields.
I have a huge 2D space, with thousands of objects in it. I then need to simulate how these objects are effected by each other's gravity.
I thought it'... |
double trap(double func(double), double b, double a, double N) {
double j;
double s;
double h = (b-a)/(N-1.0); //Width of trapezia
double func1 = func(a);
double func2;
for (s=0,j=a;j<b;j+=h){
func2 = func(j+h);
s = s + 0.5*(func1+func2)*h;
func1 = func2;
}
return s;
}
The above is my C+... |
Suppose I have a box $D \subset \Bbb{R}^2$ (compact set). Denote $\mathcal{P}= \{ (\Omega_1,...,\Omega_n) : \bigcup_{i=1}^n \Omega_i = D,\ \Omega_i \cap \Omega_j =\emptyset\}$ the family of partitions of $D$ into open sets (the sets can overlap on their boundaries...)
Consider a functional $F$ defined on the subsets of... |
The number 1 response to this question was great.
Is algorithmic analysis by flop-counting obsolete?
Now, the only problem is that I don't really understand it. Here's my example of why it's not clear to me. Please let me know what I'm doing wrong.
Applying the above analysis to the FFT:
Say I want to compute the fft ... |
How can a sparse matrix - matrix product be calculated? I know the 'classic' / mathematical way of doing it, but it seems pretty inefficient.
I thought about storing the first matrix in CSR form and the second one in CSC form, so since the row and column vectors are sorted I won't have to search for a specific row / c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.