instruction stringlengths 43 28.1k |
|---|
I have been using Fenics to model some simple electrostatic problems, but now I need to simulate more complicated geometries. Assuming
I have created a mesh of several objects, and know their positions in space
Each node in those objects carries properties of those objects (dielectric constant/etc)
which software and... |
For an equation of the kind $u_t=Au$, time step is usually defined by ensuring that the eigenvalues are within the stability region of the time-stepping scheme employed.
If the eigenvalues are on positive real axis, then does that mean that the system is unconditionally unstable for all time stepping methods?
Is it p... |
I wrote the code below to invert an upper triangular matrix, avoiding any possible multiplication/subtraction by zero. It just uses $\frac{1}{6}n^3+\ldots$ flops instead of $n^3+\ldots$ flops.
function B = InvTrMat(A,n,type)
% This code inverts an upper triangular matrix of order n
% without doing any multiplicatio... |
I would like to use Boost C++ odeint Runge-Kutta integrator on a system that looks like this :
$$\ddot x = - \frac A{||x||^3} * x $$
$ x $ is a vector in 3D space, so basicaly $ x(i, j, k) $
$ \ddot x $ is its second derivative
$ {||x||^3} $ is magnitude cubed of $ x $
$ A $ is a constant
I know the initial cond... |
This is a follow-up question to the previous questions I had on eigenvalues. Please let me know if I should edit the previous question itself for asking this.
If the eigenvalues of a matrix generated from a lower order coarse mesh discretization are negative, can we comment anything on the eigenvalues of the matrix th... |
I am working on a problem that involves taking fractional powers of particular matrices.
For the matrix A with 2 on the main diagonal and -1 on the sub and super diagonal (the finite difference matrix for the Dirichlet Laplacian in 1D), there was basically no difference between using MATLAB's sqrtm(A) function and diag... |
If we call LAPACK DGGEV or DGGEVX routines for two badly-conditioned matrices in a C++ code, will we get the same eigen-values & vectors as MATLAB's eig command with 'qz' algorithm like: eig(a,b,'qz')?
Is there any possibility that eigenvectors of MATLAB are different from LAPACK DGGEV or DGGEVX?
|
After a cursory glance at several references to discontinuous galerkin finite element methods for the elliptic poisson PDE, i notice that all of them emphasize using penalty methods where an additional term in the weak form (involving the average and jump operators of the test function and trial functions) is penalized... |
This question follows my earlier question How can I call the Boost C++ odeint Runge-Kutta integrator for a system of ODEs?
I'm still considering the system:
$$ \ddot x = - \frac{Ax}{||x||^3} $$
My intention was to use a classical Runge-Kutta 45 method to solve ODEs of my system. However, I have seen recommendations for... |
I'm looking for a current and comprehensive overview (like a review article) of global optimization methods and their application in computational chemistry. Mostly I'm interested in geometry optimization.
I am also grateful for single recommendations including
literature (articles, textbooks)
programs, capable to pe... |
For $i=1, \dotsc, K$, we have $n_i$ ordered real numbers:
$$ x_i(1) \leq x_i(2) \leq \dotsc \leq x_i(n_i) $$
I want to solve the following optimization problem:
\begin{align}
\mathrm{maximize} \; \sum_{i=1}^Kr_i \;\; s.t. \\
r_i \in \{1,\dotsc, n_i\}\\
\sum_{i=1}^Kr_i \leq c\sum_{i=1}^K x_i(r_i)
\end{align}
Now, I had ... |
I am trying to repeat an example I found in a paper.
I have to solve this ODE:
$25 \ddot{x} + 15 \dot{x} + 330000 x = p(t)$
where $p(t)$ is a white noise sequence band-limited into the 10-25 Hz range.
Then it says the system is simulated using a Runge-Kutta procedure. The sampling frequency is set to 1000 Hz and a Gau... |
everyone, I have a question about computational costs for a algorithm. That is:
I have two vectors $u_n,\ v_n\in \mathbb{C}^N$, a matrix $A\in \mathbb{C}^{N\times N}$ (can be both sparse and dense) and scalar coefficient $\alpha_n$, than I need to compute (run by Matlab):
(1) $y_n = u_n + \alpha_nv_n$ (its computationa... |
I am trying to simulate a system with bilinear stiffness described by the following equations:
$25\ddot{x}+15\dot{x}+330000x = p(t)$ if $x < 0.00072$
$25\ddot{x}+15\dot{x}+930000x = p(t)$ if $x >= 0.00072$
$p(t)$ is the white noise I already talked about in another question How to solve an ode with stochastic time-depe... |
I have been using MAX-SAT solver to obtain the exact ground state of ising spin glass model:
For 1D periodic model, for systems with 50 binary variables and interaction range of 15th nearest neighbor. The best MAX-sat solver requires 20 minutes to solve it. For 100 binary, it then becomes impossible...
However, it se... |
I have a large sparse matrix A and i want to pick the submatrix of it to do block jacobi iterations.
For the blocks, i have get a matrix Q that contains the index of nonzero entries in its Jth column define the nodes of Jth block.
my code is:
for i=1:J
lg=find(Q(level).agg(:,i));
D(i).matrix=inv((sparse(A(lg,lg))));
en... |
I am currently running a linear program with MATLAB to determine, by the exitflag of linprog, if two rotated and shifted hypercubes have nonempty intersection. I wondered if this is a waste of time, or if linprog does nothing more than checking feasibility before starting the optimization.
|
Currently I am working on my research report where I've done a lot of measurements. For now I have uploaded everything into Matlab and visualise each on chart. Each one consists of 4 lines drawn with different color. As you may see in the picture below they are quite similar to each other:
This is just a part of my me... |
I want to write a 2D FEA code for my course project and I need to import a mesh (2d, simple quad/tri) on a simple geometry such as a L shaped plate or with a square/circular hole in it, something like that.
As I want to write my own code, I need to read the mesh file in my code hence looking for a simple format which s... |
I am a physicist with limited numerical methods knowledge and I am trying to speed up the inversion of a very ill-conditioned problem ($rcond>10^{30}$). The same sparse square matrix is used repeatedly, so our current setup relies on a one time LU factorisation and a triangular solver.
I have at my disposal a very powe... |
I happened to know that there are advanced established techniques for non-smooth convex optimization in research. For example, these two papers:
Nesterov, "Smooth minimization of non-smooth functions" (2004)
Neumaier, "OSGA: A fast subgradient algorithm with optimal complexity" (2014)
But I want to know is there any ... |
Suppose I have a 1D advection equation in conservation (divergence) form
$\partial_t u(x,t) = -\partial_x [v(x)u(x,t)],$
where $u$ is a conserved quantity in space, and $v$ gives the velocity of the flow of mass in space. I want to know if it is possible to re-write this in a way that describes the rate of change of $u... |
The commonly used $3\times 3$ Laplacian convolution kernel
$\frac{1}{6}\begin{bmatrix}1 & 4 & 1\\4 & -20 & 4\\1 & 4 & 1\end{bmatrix}$
is only an approximation of rotational symmetry, as mentioned in the Wikipedia article on the Discrete Laplace operator.
Also, I found the first order Sobel operator to have an exactly r... |
I'm trying to make an animation of a travelling sine wave (amplitude vs. position) would anyon here happen to know how to do so?
|
What Is The Intersection Between CFD and Computer Science...
And..
How hard would it be to undertake a PHD in CFDs after an undergrad and masters in CompSci
Many Thanks....
|
When solving a system of nonlinear equations using iterative methods, the rate of convergence usually is defined by the following formula:
(1)
where x* is the exact solution. However usually we don't know x*, so actually we use the following formula to calculate the rate of convergence of the method:
(2)
My questio... |
I compared 2 methods for 1 dimensional Poisson equation solution.
One is finite-difference method, "Successive Overrelaxation" from http://www.cs.berkeley.edu/~demmel/cs267/lecture24/lecture24.html; Another method is spectral method by FFT which is much faster. The following is my matlab/octave code to generate the sol... |
I am simulating a damped harmonic oscillator using the RK4 method of numerical integration. I am comparing the simulated results with the analytical ones (for the free evolution case) and obtaining the error as a function of step-size, for different values of the quality factor Q.
$$\ddot{X} + \frac{1}{Q}\dot{X} + X =... |
I'm writing a solver for a differential equation with two neumann boundaries (u'(0)=u'(1)=0)
and I can't figure out how to determine how to solve the problem. What will my boundaries be and how do I figure this out?
The differential equation is
$$u''(x)+Ku(x)=0.$$
|
I am new to CVX and am trying to simulate this convex problem I found in a paper.
$$\min_{\gamma,\mathbf{mu},\mathbf{G},\mathbf{\Omega},t} \text{Tr}(\mathbf{G}\mathbf{C}\mathbf{G}^H)+t \\ s.t. -t-\frac{\gamma}{2}\sum\limits_{i=1}^n\log(1-\frac{2\mu_i}{\gamma})-\gamma \log(\delta)\leq0\\\mu_1\geq\mu_2\geq\ldots\geq\mu_n... |
Overlapping technique can make each subdomain contain more nodes, and the overlapped subdomains are nonlonger disjoint, is it taking the average value of the multiple nodes as the result.
After overlapping, we will solve larger sundomins, and it will cost more time and storage, how can the benefit from taking average v... |
While I was studying discontinuous finite element methods I found an integration of a Navier Stokes equation using tensorial notation. The equation is the following:
$\mathbf{\bar {u}}_{t} + (\mathbf{\bar {u}}.\triangledown )\mathbf{\bar {u}} = -\triangledown p +
\triangledown.\mathbf{\bar{\bar{\tau}}} + \mathbf{\bar... |
In George, Liu, and Ng's book Computer Solutions of Sparse Linear Systems, it has been shown that bandwidth of $A$ is equal to bandwidth of its factors in $LL^T$.(section 4.3) However, I guess this is proven only for $LL^T$ factorization for positive definite matrices. Is there a similar proof for indefinite matrices f... |
I have questions about the use of "derivative" annotation I wanted to ask you. Lets put a sample.
The equation is this:
z_level = LevelZ(time);
where LevelZ(time) is an external C function, and there are also LevelZ_der(time) and LevelZ_der2(time) that are the first and second derivative.
It the code is like this, ... |
I am looking for information on the time complexity for solving sparse system Ax=b with direct solver. This system results from a finite-element discretization of an elliptic problem. The matrix A considered is symmetric definite positive, has n equations, m non-zeros and a constant bandwidth b. How the time complexity... |
I was asked to prove that the time complexity of merge sort is $ O(log_2n)$ but I cannot find a way to continue my method. Any help?
$T(n)=2T(\frac{n}{2} )+n$
$T(n)= 2[2T(\frac{n}{4})+n] +n = 4T(\frac{n}{4})+3n$
$T(n)=8T(\frac{n}{8})+7n$
$...$
$...$
$...$
$...$
$T(n)= 2^kT(\frac{n}{2^k})+(2^k-1)n$
Finally $\frac{n}{2^k... |
I want to compute the following conditional expectation
$E_{t}[\phi(A_{t+1}, \eta_{t+1})| A_t]$
where $\log A_{t}=\rho \log A_{t-1} + e_{t}$ and $e_{t}$ is IID $N~(0,\sigma_e)$ and $\eta_{t}$ is another normally distributed variable with $(0,\sigma_{\eta})$. The function $\phi(.)$ is known.
I am unsure if someone wan... |
In LeVeque's Finite Volume Methods for Hyperbolic Problems, p. 320-321, one may find the derivation of the Roe matrix to the 1D Shallow Water Equations (SWEs). It is
$$
\hat{A}_{i-1/2}=\begin{pmatrix}0&1\\-\hat{u}^2+g\bar{h}&2\hat{u}\end{pmatrix}
$$
where $\bar{h}=(h_i+h_{i-1})/2$ and
$$
\hat{u}=\frac{\sqrt{h_{i-1}}u_{... |
I have a light ray moving through space-time, i.e. a curve in $\mathbb{R}^4$, parametrized by some variable λ. The exact trajectory, i.e. the coordinate functions $x^μ(λ)$ of the curve are given by some ODE $\frac{dx^μ}{dλ} = f(λ)$.
Now, I've got two requirements for my code to satisfy:
The results $x^μ(λ)$ must be gi... |
I want to debug a c++ code with Netbeans. I can use the debugger in sequential mode but I dont know how to debug it when I want to run it in parallel. I would be grateful if anyone help me on this problem.
|
I have a bunch of 3x3 linear systems of the form $Ax=b$. In general, would it be faster to solve each individual system, or to formulate it as a giant block diagonal system and solve that?
I expect to have a million or so systems to solve. I also was planning on using the Eigen C++ library, if that makes any difference... |
Using an established criterion involving capturing eddies down to the Kolmogorov length scale it can be reasoned that the order of grid points in the computational mesh needs to be $N^3 \ge Re^{9/4}$ where Re is the Reynolds number of the flow. If $Re \approx 50,000$ then I get about $N^3 \approx 3.7\times 10^{10}$. I... |
I have a question about Galerkin method. I don't understand why the Galerkin method weights the residual by the shape functions and sets it equal to zero. I want to know what is reason of this. Why we must set weights residual functions equal to zero?
|
I am interested in studying a problem of the form $\min F(\Omega)$ where $\Omega$ varies in the class of convex, open sets in the plane. An idea is to deform $\Omega$ at each step using a steepest descent algorithm, and if the deformed shape $\Omega_d$ is not convex, project it in some way on the space of convex sets.
... |
I was reading through Monaghan, SPH, 1992 paper and he states that any quantity $A$ at $r_b$ can be approximated by $A(r) = \sum_b m_b \frac{A_b}{\rho_b}W(r-r_b,h)$ and so the gradient of that quantity can be computed as $\nabla A(r) = \sum_b m_b \frac{A_b}{\rho_b} \nabla W(r-r_b,h)$.
So if we want to approximate the d... |
Let curve $C_1$ be defined parametrically
$$\begin{aligned}
&x(t)=0.5\cos(t)-0.3\cos(3t),\\
&y(t)=1.2+0.6\sin(t)-0.07\sin(3t)+0.2\sin(7t)
\end{aligned}$$
How do I find if an arbitrary point $P(x,y)$ is inside or outside of this curve?
Also, for another curve $C_2$
$$
\begin{aligned}
&x(t)=0.4+\big(0.19+0.07\sin(5t)\big... |
Suppose I have an unstructured polygonal mesh system like so:
Each node $x$ has Cartesian coordinates $(x_1,x_2)$, so for a given node can form matrices like this:
$$
J(x,y,z) = \left(\begin{array}{cc}
y_1-x_1 & z_1-x_1 \\
y_2-x_2 & z_2-x_2
\end{array}\right) = (y-x,z-x)
$$
If my mesh were structured, i.e. a mappe... |
In CVX, how do we return the value of the parameter over which the problem is minimized at the optimal value?
By this, I mean, how do we obtain
$$x^* = \arg\min_x f(x)$$ when solving the problem with CVX?
I have gone through the user's guide and did some google searching. The only thing I could find was cvx_optval whic... |
Suppose I want to solve the PDE:
$$-\nabla\cdot\left( a_\epsilon\left(x\right)\nabla u\right)=0 \text{ in } \Omega$$
$$u=g(x) \text{ on }\partial\Omega$$
Here, I assume that $a_\epsilon(x)=a(x,\frac{x}{\epsilon})$ for some $a(x,y)$ such that $a$ is 1-periodic in $y$.
I know that if I apply the standard finite differenc... |
I want to study the Density matrix renormalization Group(DMRG). Can some one provide me with the souce code which is writen by C++ for study purpose only? The code is not necessiary very professional, but works.
|
I am currently writing a code that solves a large tridiagonal matrix every iteration and runs for 1,000's of iterations. I am currently using a Thomas algorithm to solve the matrix serially. I found a parallel version of the Thomas algorithm in the book called "Parallel Scientific Computing in C++ and MPI" (which you c... |
For a silly screen saver I'm trying to develop, I'd like to randomly generate a divergence-free 2D array of 2D vectors, and then use it to generate a line integral convolution plot. I've heard$^1$ that one way to do this is to generate random noise, and then project out the solenoidal component of its Helmholtz-Hodge d... |
I have a 2D implementation of smoothed particle hydrodynamics up and running, however when I tried to move it to 3D, using the appropriate 3D kernels, particles always tend to go apart from each other. Since my 2D implementation works fine and the only thing I've changed are the kernels, the only parameter that affect ... |
Imagine you have a piece of wood and from that piece you want to get the largest cylinder possible.
How do you determine the position and orientation of the cylinders axis, to maximize its radius?
I've been looking at this problem for over a year now and I can't find an efficient (or rather any) algorithm that can han... |
Background
I'm trying to do an update to a "thin" QR decomposition ($A = QR$, where $Q$ is $\mathbf{R}^{m,n}$, the first few columns (up to the matrix rank) of an orthogonal matrix and $R$ is upper triangular and square and $\mathbf{R}^{n,n}$). The matrix itself is a full column rank "tall" matrix ($m \ge n$), and I'm... |
I have a (cyclic undirected) graph stored in a suitable structure (which depends on the language chosen). Nodes represent places in the real world and edges represent connection between them, so I have a sort of initial guess of the drawing.
I have to draw this graph with some constraints and requirements, and from wha... |
I'm trying to solve the following non-linear diffusion equation:
$$
\frac{\partial}{\partial t} u(x,t)= \frac{\partial^{2}}{\partial x^{2}}u(x,t)^{3}$$ $$ -1\leq x \leq1, t \geq 0
$$ with the boundary conditions: $$u(1,t)=-u(-1,t)=1$$ and the initial conditions: $$u(x,0)=x$$ I'm trying to implement a Crank-Nicolson sch... |
I have two sets of 300 VTK files and I want to get a graph comparing the average difference of the two sets. All files have a structured grid containing a scalar value named phi. At the end, I need a graph showing the average difference of each grid for every grid.
I have computed the difference at each cell using a Pr... |
Typically, the function that one wants to integrate numerically, $f$, is given, i.e. its values for various points $\{x_i\}$ are known precisely. The resulting error is due to the fact that we chose a finite number of points. Let's call this error $numerical$.
I have a different situation. I know the values of $f$, $\{... |
This question is a follow up of another one I have asked a while ago. I have successfully implemented my problem using odeint library and I get the results I expect.
However I would like to give an estimation of the error for the results, obtained by Runge-Kutta method of 4th order. In addition to results obtained by ... |
So far the closest I've found is ViennaCL, which has a Lanczos implementation for Eigenvalues.
It is not clear that EigenVectors are produced by this library.
Does anyone here know whether ViennaCL solves for EigenVectors? And how to get them?
Or of any other sparse matrix EigenVector solver for GPGPU?
ETA:From what I ... |
I'm using DGGEVX routine from LAPACKE with BALANC option as shown below, but to my surprise changing BALANC option from 'N' to 'P' or 'S' or 'B' has no effect on the output Eigen values & vectors. Does anybody know why?
info=LAPACKE_dggevx(LAPACK_COL_MAJOR,'B','V','V','N',n,a,n,b,n,alphar,alphai,beta,vl,n,vr,n,&ilo,&ih... |
I would like to solve numerically the diffusion equation, where the sink term depends linearly on the field, and there is field-independent sink:
$\frac{\partial^2 u(x)}{\partial x^2} =f(x)u(x) - \kappa(x)$
At the moment I am solving the above using a finite difference scheme, where I modify the standard laplacian mat... |
I want to learn a numerical method for PDEs other than finite difference method. After some research on internet i have found Rothe method and it looks interesting to me. Unfortunately, i couldn't find a good book/ notes for starting. Can you suggest me a book to study? What is prerequisites/corequisites for the Rothe ... |
I have seen videos like this before in the past of things like "3D Mandlebulbs" and similar fractal sets, but can anyone tell me what sorts of programs are actually used create these visualizations? How computationally expensive are these visualizations to make? Also, what sort of simulations are these? I mean, what so... |
For non-overlapping domain decomposition methods for elliptic problems there is an associated Steklov-Poincaré definite positive operator defined on the interface, allowing a direct computation of the interface solution from the boundary data. I have never heard about an equivalent kind of operator for overlapping meth... |
I'm playing with ARPACK. I looked into the examples they provide, zndrv4.f illustrating the usage of the routine znaupd, in the directory of ARPACK/EXAMPLES/COMPLEX/. I also came cross NAG Fortran Library. In NAG, there are some linear problem solvers F12***. The F12*** routines in NAG are equivalent to the znaupd in A... |
I wrote a simple script to generate random polynoimals $\displaystyle f(z)= \sum_{k=0}^N a_k \frac{z^k}{\sqrt{k!}} $ of high degree and find their roots. For more discussion on random polyomials see here.
N = 500
a = np.random.normal(0,1,N)
n = np.arange(N-1)+1
n = np.insert(n,0,1)
n = np.sqrt(n)
n = np.cumproduct(n... |
Lets say I have a function $f(X) = f(x_1,...,x_N)$ to be integrated. But unlike time discrete methods, my integrator uses quantisation to advance time, that is if $|x - q| > dQ$, with $q$ being the quantised version of $x$ and $dQ$ being the quantum.
To achieve this, the function needs to send $f(X)$, $f'(X)$, and $f''... |
For $A=LU$, or $A=LDL^T$ factorization, bandwidth is preserved when there is no pivoting. This is true even for indefinite A, see question. However, when there is pivoting band structure is destroyed, so fill-ins can occur outside the band. I am curious if there is any pivoting that can still preserve sparsity for the ... |
I am working on generating a (complex) solenoidal vector field $\mathbf{A}$ from a prescribed (complex) vector $\mathbf{a}$ and the gradient of a scalar, $b$, such that
$$\mathbf{A} = \mathbf{a} + \nabla b.$$
The condition that I require is then
$$\nabla\cdot\mathbf{A} = \nabla\cdot\mathbf{a} + \nabla^2 b = 0 \qquad \L... |
Before there was CUDA or OpenCL people were using GPUs for computation. I am trying to find out how they did that -- because I want to press my Rasberry Pi's GPU for computing and it does not seem to have OpenCL support.
I am looking for notes on how they did this.
I've done cursory Googling but have come up empty han... |
I have very large matrices that I would like to row reduce (I need to keep track of the steps and find a basis of the kernel/image, not just find the rank).
The good news is that I work mod 2 and the matrices are very sparse. The problem is their size, right now I have a beast that is roughly 3 millions x 1 million, bu... |
I am writing a molecular dynamics program to create an lattice and populate it with atoms/molecules. These then are given random velocities and the system is initialized. Then throughout time the molecules interact with each other and exert forces on each other.
I've tried to make my program as readable as possible.
M... |
I'm currently revising my optimization algorithm for a specific part of a problem. I have trouble in wrapping my head around a new approach and my mind is having this tunnel-vision of ideas. I could really use some fresh perspectives.
I'll try my best to simply the explanation.
(Please see attached file "Example-1.png"... |
I wrote a Monte Carlo simulation of the 2D Lotka-Volterra model on a discrete lattice (with periodic boundary conditions). A video that I produced (which images the system after some number of monte carlo steps) can be found here. I am wondering, what is the best way to track the spatial "speed" of the oscillations of ... |
Is there a mesh data format which is particularly well suited for Cartesian meshes with Dey-Mittra style cut-cells? Ideally, one which does not require converting the cut-cells into a more general polyhedron.
Non-proprietary formats with open-source implementations are also preferable.
|
I am solving a problem of the form:
$\dfrac{\partial u(x,y,t)}{\partial t} = \nabla^2 u(x,y,t) - f(x,y,t)u(x,y,t) - \kappa(x,y,t)$
At the moment, I am solving this at each time step by assuming a quasi-steady-state:
$\nabla^2 u(x,y,t) = f(x,y,t)u(x,y,t) + \kappa(x,y,t)$
To do this, I use finite differences, which means... |
I'm looking to solve the Richards' equation. This models water flow in porous media and is a nonlinear, possibly degenerative, parabolic differential equation that takes the form
$\partial_t \Theta(\psi) - \nabla \cdot (K(\Theta)\nabla(\psi+z))=0$
where $\psi$ is pressure head, $\Theta$ is the water content, $K$ is the... |
What are the problems that arise when fitting (2D or 3D) a set of scattered data? (non uniformly distributed)
I had some data I had to fit and I solved the problem using the triscatteredinterp() matlab function which implements different types of methods: natural neighbor interpolations, linear interpolation and neares... |
I am encountering a problem that my MATLAB code ran and an error occurs and shows that it is out of memory. My code is using finite element method to solve some complicated kind of integral equation and the number of elements can reach more than 100,000. I use the sparse to store the stiffness matrix and ran the code i... |
What is a reasonable manufactured solution to test the following equation against its finite difference approximation? I want it to look like a Cosine function about $0$, rotated about $Z$ axis (basically not varying about $\theta$) such that $f$ turns out to be a not so bad function in terms of $r,\theta$
$$u_{rr} \;... |
"We consider an unstructured planar
(undirected) graph and calculate the stationary probability distribution of the random
walk on the graph. The graph is generated by choosing n random points in the unit
square and triangulating them using Delaunay triangulation."
This sentence is from the description of a test proble... |
I am a computer science student and I came across the Verlet Cloth simulation. An implementation is here. I was interested in how such computation would lend itself to parallelization.
The problem looks like a variant of N-body computation where we could compute constraints on each point and them move the points based... |
It is necessary for me to find the unit outward normal vector for the curve:
$$\gamma=(x(t),y(t)) $$
where
$$x(t)=\cos(t)−0.5\cos(3t)$$
and
$$y(t)=\sin(t)+\sin(7t)+\sin(3t)$$
I know how to find unit outward normal vector for this: using
$$T=\frac{\gamma' (t)}{||\gamma(t)||} $$
so
$$N=\frac{T (t)}{||T(t)|| }$$
bu... |
I am trying to write a code to solve a nonlinear BVP using the Finite Difference Method. The BVP is:
$(T^2)\frac{\partial^2 T}{\partial x^2} + T \left( \frac{\partial T}{\partial x}\right)^2 + Q = 0$
The boundary conditions are Dirichlet at $x = 0$ and Robin at $x = L$. The parameter $Q$ is a constant.
My (probably nai... |
I recently implemented Successive Over Relaxation using Cuda as a part of my course project and was curious to know how I can make the code more efficient.
I'm using Red/Black SOR scheme which is popular version of parallel SOR. To update the value at a grid point, I need to access 4 adjacent values which are generall... |
I am performing analysis on chassis (Static Structural) and for optimization purpose i am asked to generate MESH-INDEPENDENCE REPORT,of which i have no idea. I have tried going through research papers but couldn't find anything important.
Need a basic idea about Mesh-independence, any example would be helpful.
|
This is a homework question, I would like to know if someone can shed some light on it.
Let $x_n = \frac{a_n + b_n}{2} , r=\lim_{n \to \infty}x_n$ and $e_n =r-x_n$.
Here $[a_n,b_n]$ with $n\geq0$ denotes that successive intervals that arise in the bisection method when it is applied to a continuous function $f$.
Show... |
In Golub and Van Loan's book, Matrix Computations, page 606, it is stated that:
With standard discretizations, 2-dimensional problems can be solved with $O(n^{3/2})$ work and $O(n \log{n})$ fill-in. For 3-dimensional problems, the typical costs are $O(n^2)$ work and $O(n^{4/3})$ fill-in.
Here, they refer to elliptic... |
I have a problem with implementing proper boundary conditions on sides of my simulation (in RF or WaveOptics module of Comsol). I want to obtain an infinite but not periodic space (beacuse then I will put something inside). For example, it can be a glass-vacuum interface with incident plain waves. For such a simulation... |
I have some vector $V$ which can be decomposed into the eigenspace of the hermitian sparse operator $M$:
$V = \sum_i v_i \hat{m}_i$
Is there a way to find the $\hat{m}_i$ (the eigenvector itself) that correspond to the largest $v_i$ (in magnitude)?
I essentially want the largest few terms of the sum, including the eige... |
Background
Please note that I am duplicating the question on scicomp. I have already asked this in math.
I am trying to come up with a scheme in Polar Co-ordinates for the following PDE:
PDE I am trying to solve
$$ u_t - (u_{rr} + \frac{1}{r} * u_r + \frac{1}{\theta} * u_{\theta\theta} + bu) = f(r,\theta, t)$$
I am ex... |
I am trying to implement a second order DG-method using a monomial basis and explicit Euler in time. I have written down some of the theory, which I present below:
Theory
Consider the linear advection function over $\Omega\subset\mathbb{R}$ and a class of testfunctions $v\in C_0^1(\Omega)$
$$
\int_\Omega\partial_tuvd ... |
I am interested in solving the problem $-A u = \lambda u$ on a finite differences grid on a square. In my case, the operator $A$ is of the type $-\Delta + \mu I$, where $\mu$ is there to impose some constraints. The method I used until now was to consider a finite differences grid and get
$$ 4u_{i,j} - u_{i,j+1}-u_{i,j... |
Can someone give some references to understand what's the differences between a component-wise and a characteristic-wise ENO scheme?
If I'm right, the characteristic variables come from the diagonalization of flux matrix but I don't see how it comes to play when doing ENO and what's the advantage of it.
|
I have asked a question in this regard earlier. I am trying to solve the following equation in Polar Co-ordinates:
$$ u_t - (u_{rr} + \frac{1}{r} * u_r + \frac{1}{\theta} * u_{\theta\theta} + bu) = f(r,\theta, t)$$
I am building a finite difference method to tackle the above pde. I have assumed the solution to be of t... |
I have implemented a FVM code and now I need to plot the accuracy of the method as the mesh gets refined. Having a very fine mesh, my idea is to compare what is the error between the coarser and fine mesh in the L1-norm. My problem is that having a finer mesh the solution vector has more entries than the solution with ... |
I want to solve a nonlinear optimization problem of the following form
\begin{equation}
\min\left(\sum_i d^{x_i}c_{i}\right)\\
0 \leq x_{i} \leq a\\
\sum_{i} x_{i} \leq b
\end{equation}
$a$, $b$, $0.95 < d < 1$ and $c_i > 1$ are constant. The problem has a very specific structure, and my question is whether using a ve... |
I'm trying to solve a Stokes flow problem with a pseudo-spectral method in periodic boundary conditions.
The equations of interest are
$-\nabla^2 \bf{v} + \nabla p = \bf{f} \\
\nabla \cdot \bf{v} = 0$
where $\bf{f}$ is a force vector coming from the gradient of a stress tensor, $\bf{f} = \nabla \cdot \sigma$.
To do so,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.