instruction stringlengths 43 28.1k |
|---|
I want to maximise the score of the following table, choosing one item from each column/row, so no two items are on the same row or column. Score to maximise is just adding all the choices together.
$$*\quad A\quad B\quad C\quad D\quad E$$
$$\alpha\quad 16\quad 16\quad 18\quad 18\quad 18$$
$$\beta\quad 20\quad 18\quad ... |
can any one recommend numerical solver (c/c++ library preferred) for stochastic optimal control problems? For deterministic optimal control I found something like that: http://abs-5.me.washington.edu/ocp/index.html Now looking for something similar for stochastic OCP.
|
Bathe's Finite Element Procedures shows the "nonlinear strain stiffness matrix" for a 2D truss element as
$$
\frac {^tP} {L_0 + \Delta L}
\left[ \begin{array}{ccc}
1 & 0 & -1 & 0 \\
0 & 1 & 0 & -1 \\
-1 & 0 & 1 & 0 \\
0 & -1 & 0 & 1 \\
\end{array} \right]
$$
But other sources, such as this http://people.duke.edu/~hpga... |
I have come across (state of the art) softwares on MAX-SAT PBO or WBO: examples are WBO, open-WBO, SAT4J, scip. They all seem to work in a way that only command line instruction is involved. I want to construct a C++ programme that involves solving some PBO system (equivalently MAX-SAT or WBO) then do a huge bunch of o... |
I'm new with FEniCS and Python and I'm stuck with this issue:
is there a way to write a 4th order tensor in an easy way to implement?
I have to compute the following stiffnes tensor:
$A_{ijkl}= \lambda \delta_{ij}\delta_{kl} + \mu (\delta_{ik}\delta_{jl} + \delta_{il}\delta_{jk})$
|
I am working with the simple example of an oscillator:
$$(1) \; \; \ddot{u} + u = 0, \; \; u(0) = u_0$$
I know that Forward Euler does not preserve an invariant of the above system: $$(2) \; \; \dot{u}^2 + u^2 = 1$$
I can get the eigenvalues of a matrix that approximately solves for the solution of $(1)$ using Forward ... |
I have been working on a multigrid solution to a non-homogeneous Dirichlet boundary value problem. However, the function goes to infinity on the boundary. This causes numerical overflow errors to be raised in calculating the discretized derivatives. Does anyone have a suggestion on how to overcome this problem? I a... |
I'm trying to find some finite temperature properties using ab-initio simulations; and for this, I'm looking for a tool to be used as an auxiliary to DFT simulations (in VASP) to implement Quasiharmonic approximation (QHA). I'm facing some problems using Phonopy, so, could anyone tell me what's a popular package for QH... |
Most methods for oscillatory integrals I know about deal with integrals of the form
$$ \int f(x)e^{i\omega x}\,dx $$
where $\omega$ is large.
If I have an integral of the form
$$ \int f(x)g_1(x)\cdots g_n(x)\,dx, $$
where $g_k$ are oscillatory functions whose roots are only known approximately, but some kind of asympto... |
What is the best MAX-SAT solver problems for Ising spin glass? I tried Scip-Max-sat and open-wbo. While open-wbo cannot solve the instance with only 27 variable Scip-max-Sat fail to solve the one with 200+ variables (while it can solve model with 100 variables in 30 secs).... I am not sure whether I have missed somethi... |
recently, I try to write a Matlab codes to implement a sparse approximation inverse factorization method proposed by M. Benzi in his paper http://www.mathcs.emory.edu/~benzi/Web_papers/ainv.pdf
this codes to generate the incomplete factorization as
$A^{-1} = ZD^{-1}W$ or $A^{-1} = \hat{Z}W$.
I had written the followin... |
I have a vector containing acceleration measurements and the corresponding vector of times in which measurements are taken.
To obtain velocity and displacement I used the cumtrapz() function already implemented in MATLAB. This should be fine, as I read here Numerical integration of non-uniform acceleration samples and ... |
I am studying fluid-structure interaction across integrated circuits packaging by using Ansys Fluent (I'm a beginner). Currently I had an issue about the time step size.
When I set time step size of 1 s it takes about more than 100 s for a complete fluid flow. While for time steps of 0.1 s and 0.01 s takes about 50 s a... |
I tried to plot a surface in MATLAB but, since it is the first time I had to do something like this, I need a confirmation on the process I followed because it is important for my project to plot the right surface.
I have 3 vectors obtained from measurement data: $x$ (displacement), $v$ (velocity) and $p$ (force). The ... |
today, I encountered a confused problem by accident, but I have no ideas to deal with it fully. The question can be described as follows: for example, when we need to use FDM/FEM to discrete the partial differential operator with variable coefficients,
$\mathcal{L} = d_1(x,y)\frac{\partial^2 u(x,y)}{\partial x^2} + d_... |
I have an equation:
$\ddot{x}+(\delta+\epsilon\cos{t})x=0$ known as the Mathieu equation.The $\delta-\epsilon$ parameter space of this equation looks something like
The red lines in this diagram indicate that if a point on the red lines is chosen, and the corresponding value of $(\delta,\epsilon)$ is plugged into th... |
The Fast Iterative Method is a way of solving the Eikonal Equation on a discrete grid, similar to the Fast Marching Method discussed in another question here.
The paper describes the overall algorithm, as well as providing a method for solving the quadratic, as follows:
SolveQuadratic(a, b, c, f)
Returns the value $u ... |
I'm writing a mod for a game that models orbital physics (Kerbal Space Program, or KSP). I'm attempting to model the effects of thrust on spacecraft in certain states where the game only models them as a Keplerian orbit (The ship is 'on rails'), and I'm having some difficulty with numerical stability - even if I don't ... |
Say we have $x_i, \ldots, x_n \in R ^ D$ with positive, real components and use Jaccard distance $d(x_i, x_j) = 1 - \frac{\sum_{d = 1}^D\min(x_i^d, x_j^d)}{\sum_{d = 1}^D\max(x_i^d, x_j^d)}$ to find $k$ nearest neighbors for every point. I wonder, is it possible to get exact solution (all $k$ neighbors are found) witho... |
I've been reading a lot of papers on ADMM lately, and also tried to solve several problems using it, in all of which it was very effective. In contrast to other optimization methods, I can't get a good intuition as to how and why this method is so effective (of course, I've seen convergence analysis for a few cases, bu... |
Are there any instances of scientific numerical problems where the choice of rounding mode matters?
There are usually a number of different rounding modes available: to $0$, away from $0$, to $\pm\infty$, nearest ties to even, nearest ties down. Apart from various currency-manipulation problems where rounding is mandat... |
I'm wondering if it's possible to create functional intensity plots in matlab. Examples of what I'm looking for are below found in this paper:
These figures were (guessing) probably made in R, but is this possible for matlab? I can't seem to find anything related to intensity besides an image intensity plot.
THanks
|
I want to write a code that generates a function I(t) that satisfies the following condition:
$\frac{\big<I(t)^2\big>}{\big<I(t)\big>^2} > 2$
In other words,
$\frac{\lim_{T \to \infty}\int_0^T I(t)^2dt}{(\lim_{T \to \infty}\int_0^T I(t)dt)^2} > 2$
Is it even possible to do that? If not, please tell me what am I mis... |
The simplest way to add 8 numbers would be something like this,
sum = one + two + three + four + five + six + seven + eight;
This (in C) would add one and two, and add the result to three and do the same till eight. Instructions for adding three,four and so on till eight will have wait the first instruction to complet... |
I have the following problem:
\begin{align}
\frac{\partial w}{\partial t} = \frac{1}{r^2} \frac{\partial}{\partial r}\left( r^2 D_1 \frac{\partial w}{\partial r} \right) \\
\\
\frac{dr_d}{dt} = C_1\frac{\left(C_2 + C_3 \left( \frac{r_d}{r_{d,0}}\right)^{0.5} \right) D_1}{2r_d}
\end{align}
Where
\begin{align}
D_1 &= A... |
I am concerned with numerical solution to the following problem on $[0,1]\times[0,1]$.
$\dfrac{\partial\theta}{\partial t}+u(x,t).\nabla \theta(x,t)=\kappa \nabla^2\theta(t,x)$
with Dirichlet boundary condition $\theta(t,x)=0$ on the boundary of rectangle.
My question in general situation, and in particular for the pro... |
I have a set of paths between two fixed points (marked in red below). Each of these paths consists of an ordered series of $\{x, y\}$ points (marked in blue).
I am trying to find the ordered set of points which comprise the boundary of these paths. This boundary is shown in gray. Note that this boundary would contain ... |
In Gram-Schmidt process,
is it better to do normalization after orthogonalization of all the vectors in a basis, or to normalize each new vector immediately after it is created, from computational point of view?
|
I've been looking at the book "Computational Fluid Dynamics - The Basics With Applications", by John D. Anderson, and his solution for the one-dimensional subsonic-supersonic nozzle flow using the MacCormack scheme. I was wondering if there are any book chapters or academic papers out there explaining, in the level of ... |
I have found that MATLAB solves 1D parabolic-elliptic system incorrectly by using pdepe function. Here is a system:
$$
u_t = u_{xx} + 2,
$$
$$
0 = v_{xx} + u.
$$
Boundary conditions:
$$
(-u_x+u)|_{x=0} = 2t, \;\; (u_x+u)|_{x=1} = 2t,
$$
$$
(-v_x+v)|_{x=0} = 0, \;\; (v_x+v)|_{x=1} = 0.
$$
Initial conditions:
$$
u|_{t=0}... |
Question: Consider the iterative improvement algorithm below.
Starting with $Az_i = r_i$ and $(A + E)\hat{z}_i = r_i$ derive a formula showing how the absolute error in the $(i + 1)^{st}$ iterate $\Vert\hat{x}_{i+1} - x\Vert$ is bound by a multiple of the absolute error in the $i$-th iterate $\Vert\hat{x}_{i} - x\Vert... |
The B-spline basis function is given by one recursive formula. However,I hope to obtain popular expression: a0x^n + a1x^(n-1) + ... + an.
From the answer How to build a recursive spline function in C++, it seems that Piegl's algorithm can do that. Can anyone give more information about the algorithm?
|
In Matlab Tensor Toolbox there is a tensor type called "Kruskal tensors", I found its form is similar to the CP decomposition.
Wikipedia mentioned:
"As such, many of the methods have been independently invented
several times, often with subtle variations, leading to a confusing
literature. Abstract and general mat... |
Imagine you are given 20 random numbers in a row. The original order must be maintained. From this set you can choose 2 groups of 3 numbers each. The position of these groups must be separated by at least 4 numbers.
The goal is to maximise the sum of values in both groups. How can you ensure that optimal groups are tak... |
I wish to study the 2D heat transfer of the soda can using Fluent. For my geometry I took a circle.
My problem while meshing the circle; Because i need to mesh it from inside.
I used the mapped faced meshing then I used the edge sizing for the edge of the circle with no bias and then I sized the line that I create.
[I... |
I am trying to derive the correct variational form for the Poisson equation with pure Neumann boundary conditions, and an additional contraint $\int_{\Omega} u \, {\rm d} x = 0$, as described in this link.
As I understand it, the problem can be defined as:
Find $(u, c) \in V \times \mathbb{R}$ such that
$F(u, c) = \fr... |
How do I plot a flow diagram (given certain initial conditions, the trajectory in y-x space) for a RG (renormalization group) flow given by the following recursion relations?
\begin{eqnarray}
x^{\prime}&=&\frac{x(1+y)^2}{(x+y)(1+xy)} \\
y^{\prime}&=&\frac{y(x+y)}{1+xy} \\
\end{eqnarray}
I have explored several option... |
I want to pass additional parameters to the ode45 function in MATLAB. There are many questions already on this, but I also have a 'flag' argument in my function.
function [xdot,isterminal,dircn]=spp(t,x,flag,f)
Usually, while calling ode45, something like this would work if spp did not have a flag argument.
options=od... |
I need to fit a curve, obtained from experimental data, with a piecewise linear model (4 knots and therefore 3 lines).
I tried using the MATLAB function
coeff = lsqnonlin(@fun,X0,[],[],[],x,y);
where $fun$ is a function defined as:
[f] = fun (X,x,y)
A = X(1);
.
.
.
F = X(6);
if x(i) <= kn1
f(i) = A+B*x(i)-y(i);... |
I was just implementing the upwind scheme for a linear transport equation $u_t + cu_x = 0$ where $c=0.5$ and I saw that the solution was indeed advected but over time it starts to diffuse. Can anyone provide some references to understand where does it comes from?
|
Consider Euler equation of gas dynamics in polar coordinates as
$$
\left( \begin{array}{ccc}
\rho \\
\rho u_{r} \\
\rho u_{\theta} \\
E \end{array} \right)_{t} +
\frac{1}{r} \left( \begin{array}{ccc}
r \rho u_{r} \\
r (\rho u_{r}u_{r} + p)\\
r \rho u_{r} u_{\theta}\\
r u_{r}(E + p)\end{array} \right)_{r} +
\frac{1}{... |
We know that principle component analysis (PCA) is a eigenvalue problem. Let $A$ be the covariance matrix of $X$, PCA aims to find the eigenvalue of $A$:
$\max v'Av$, subject to $v'v=1$
Multiple PCs can be found by deflation:
Let $\hat{X}=X-\sum_{i=1}^k v_iv_i'X$ (or equivalently $\hat{A}=(I-\sum_{i=1}^k v_iv_i')A(I-\... |
I want to minimize
$$W\, \text{tr}\left([A-Y_{pie}][A-Y_{pie}]^T\right) + \lambda\Vert A\Vert\, \enspace ,$$
however, I encounter the following problem:
Disciplined convex programming error: Only scalar quadratic forms can be specified in CVX.
Would you like to solve with this, please? Thank you!
Ypie=T*Y; % Y is k... |
I have a certain 2-D function. More properly, I have not the function itself, but the matrices $[X,Y,Z]$, where $X,Y$ are $1\times n$, and $Z$ is $n \times n$.
Now, I want to calculate a a new matrix, $\hat Z$, whose value at each point is the average of $Z$-values from a small region around that point. In other words,... |
Earlier it was considered that frozen coefficients method for Neumann stability analysis for finite difference scheme is more heuristic than rigorous. But I have read some information in a book by Gustafsson,Kreiss,Oliger that there are some conditions, which give us possibility to use frozen coefficients+Neumann analy... |
I have a tree data structure (rooted, unbalanced, with unbounded branching factor), where each individual node has an associated 'weight'. For every node $n$ in the tree, I'd like to compute the cumulative weights of all the nodes in the subtree rooted at node $n$.
For example, in the tree below I'd want to compute the... |
The PETSC function VecSwap after a few layers of abstraction calls the BLAS primitive swap, which essentially copies data around (unless I am missing something).
It seems to me that there should be a O(1) implementation that can be obtained just by exchanging pointers, at least if the vectors are identical in all thei... |
I'm a Mechanical Engineering student interested in the field of aerospace engineering where, I'm told, Fortran is still commonly used.
Which version of Fortran should I invest my time to learn?
|
I am trying to validate that the Schwartz-Christoffel mapping does indeed take the upper-half plane $\mathbb{H} = \{ z: \mathrm{Re}(z) > 0\}$ to a polygon.
This involves integrals of functions of the type and computing at every point.
$$ f(z) = \int_0^z \frac{dx}{\sqrt{(x-a)(x-b)}}$$
where $a < b \in \mathbb{R}$.
I... |
I was reading through this document about FVM. I understood all up to the point where we have on page 15 the following
$$(\bar u^{n+1}_i - \bar u^n_i) \Delta x + \int^{t^{n+1}}_{t^n} f(u(x_{i+1/2},t))-f(u(x_{i-1/2},t)) dt = 0$$
How am I suppose to compute the integral from $t_n$ to $t_{n+1}$ of the flux?
|
I am new to numerical methods and I cannot think of a way to start solving the following problem. I know the mantissa, base and the boundaries are related when defining a number but I cannot really put it in together. The question is as follows and I need to know how these terms are related and how to approach a questi... |
I am trying to write a simple finite volume method code but there are some concepts I'm still not really getting right (perhaps I'm overcomplicating things)
Given a uniform grid, the idea is to approximate the solution by computing cell averages as
$$\bar u(x_j,t^n) = \bar u_j^n = \frac{1}{h}\int^{x_{j+1/2}}_{x_{j-1/2}... |
I'm analyzing experimental data, and I've produced graphs that look similar to the attached sketch. When I look at the graph, I see structure in the connections (connections tend to be local, there is one central collection of nodes and three branches).
I'm wondering if anyone can point me toward areas of graph theory ... |
I originally asked this question at StackOverflow, and was suggested to bring it here.
I've seen this question about the representation of molecules in memory, and it makes sense to me (tl;dr represent it as a graph with atoms as nodes and bonds as edges). But now my question is this: how do we check and see if two mol... |
I want to use it in Matlab or Java. Will these two languages be much slower for computing the algorithm compared to C, C++, in case efficiency is an important factor?
I'm aware of that there's a PROPACK and SVDPACK, etc. Seems quite old. What are some popular choices? Are there any paralleled versions existing? If ther... |
I want to compute a few tens of the smallest eigenvalues of a linear system which is a discretization of a linear elasticity. In the presence of additional constraints like Dirichlet boundary conditions, does it help to use the rigid body displacements to deflate the linear system? In that case they might only be appro... |
I am trying to apply the "restoring force surface" method to a dynamic linear system.
The idea behind this method is that, knowing acceleration, displacement, velocity and input force it is possible to establish if the system under study is linear or not by plotting a surface in the phase-space.
To verify my code I ap... |
The set-up is the following:
We have $K$ finite sets of real numbers,
i.e. sets $G_i, i=1 \dotsc, K$ and $|G_i| = n_i < \infty$.
Furthermore, assume that we have a function
$$
h: \mathbb R^K \to \mathbb R
$$
which is monotonically increasing in each component.
Similarly, there is another function $$g: \mathbb R^K \to ... |
I need to sample from the generalized beta of the second kind (GB2) distribution (McDonald, 1984, Econometrica). Its PDF has the form
$$ f_{a,b,p,q}(x) = \frac{|a|x^{ap-1}}{b^{ap}B(p,q)(1+(x/b)^a)^{p+q}}. $$
Its CDF does not have a closed form, so I cannot use an inverse transform method. Does anyone know how to sample... |
In a recent SIAM News article, there is a long article describing a systematic organization of the finite elements, aptly dubbed the Periodic Table of Finite Elements. Its really quite fascinating to see how classification can be accomplished via finite element exterior calculus. As the authors indicate:
Just as th... |
I was checking the unity condition on a smoothing kernel for SPH, however I don't understand why the integral is not giving 1.
The kernel function is $\displaystyle W(||\vec r||,h) = \frac{315}{64\pi h^8}(h^2-r^2)^3$ if $0 \leq ||\vec r|| \leq h$
I tried to approximate the integral with the following matlab code
W = @(... |
I recently stumbled upon interesting site that has interactive 3D representation of radial electron distribution (atomic orbital).
here is the url: http://winter.group.shef.ac.uk/orbitron/AOs/1s/e-density-dots.html (java is needed)
clicking on the "equations" or this link http://winter.group.shef.ac.uk/orbitron/AOs/1s/... |
I am investigating a physical process where I believe the 1-D advection-diffusion equation:
\begin{equation}
\frac{\partial u}{\partial t} = -\frac{\partial}{\partial x}[\mu(x,t) u(x,t)] + \frac{\partial}{\partial x}[D(x,t)\frac{\partial}{\partial x}u(x,t)]
\end{equation}
may be applicable. I have a set of experimental... |
I am trying to solve the Duffing's equation in MATLAB.
$ m\ddot{y}+c\dot{y}+ky+k_{3}y^{3} = f(t) $
where $ f(t) = A \sin{\omega t}$
To do that I wrote a function to be given to the ode45.
function [F] = ode_fun(t,y)
F = zeros(size(y));
F(1) = y(2);
F(2) = -k*y(1)-c*y(2)-k3*y(1)^3+A*sin(omega*t);
end
And then I call... |
Is there any solver for convex optimization in C++ (or some dedicated scheme while no solver is yet available) that could solve a convex optimization problem with objective function value given by an oracle? Thank you.
My specific problem is this:
\[\mathop {\max }\limits_\lambda \mathop {\min }\limits_{\sigma \in {... |
In going from double precision to quad (or higher) precision,
roughly how much of a performance hit is taken on various architectures and frameworks. Do floating point operations take twice as much time? Ten times as much time? One hundred times as much time?
What frameworks are currently available that support quad ... |
I have a sparse matrix such as
A =
(1,1) 1
(3,1) 1
(1,2) 1
(2,2) 1
(1,3) 1
(3,3) 1
(4,3) 1
(4,4) 1
The full matrix of A can see look like as following:
full(A) =
1 1 1 0
0 1 0 0
1 0 1 0
... |
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.