instruction stringlengths 43 28.1k |
|---|
I have been performing convection-diffusion transport studies on microfluidic channels like the following
The inlet concentration is specific and I obtain the time-dependent concentration profiles of the
solute at the discretization nodes in the domain. Using this data, I would like to know how to compute the time sca... |
Suppose I have a correlation matrix, $A$, and I already have the eigenvalues and eigenvectors of this matrix.
For a given vector, $\mathbf{\mathit{v}}$, I want to calculate the eigenvalues and eigenvectors of the following new matrices:
$$A+\mathbf{\mathit{v}}\mathbf{\mathit{v}}^T\textrm{ and }A-\mathbf{\mathit{v}}\mat... |
My problem is a little more complex, but here is a simplified similar model.
Let us consider a fire source inside a box and the hot gases (burnt or unburnt) from the combustion are going out of the exhaust (white surface) at a certain velocity. We have the velocity field of the entire domain and can be visualized usin... |
I'm trying to add a colour to the LogicalVolume which has been renamed to TrackerLogical in Geant4. I get the error that fVisAttributes and visAttributes are undefined although I have defined them in the #include section as .hh files.
The primary framework I have used is that of exampleB1 and I am trying to add color u... |
When using no flux Neumann boundary conditions (i.e. zero derivative to the normal on the boundary) in a non-stationary PDE, I don't seem to recognize the difference to using Dirichlet boundary conditions directly...
Since the initial values prescribe the values that the boundary has to take at $T = 0$ and we impose th... |
I am trying to figure out how to implement a solver for a system of nonlinear equations of the form
\begin{align*}
u_1 &= y_n + h\left(a_{1,1}f(t_n + c_1 h, u_1) + a_{1,2}f(t_n + c_2 h, u_2)\right) \\
u_2 &= y_n + h\left(a_{2,1}f(t_n + c_1 h, u_1) + a_{2,2}f(t_n + c_2 h, u_2)\right)
\end{align*}
where $f: \math... |
I need a check on the following exercise about weak formulations and finite elements.
Consider the advection diffusion system
$$
\begin{cases}
-(\mu u')' + \beta u' + \gamma u = f \\
u(a)=0 \\
u(b) = g_b
\end{cases}$$
where $\mu,\beta \beta', \gamma \in C^{0}([a,b])$ and $f \in L^2(a,b)$
Write the weak formulation, sp... |
Suppose that we have coordinates $u=u(x,y)$ and $v=v(x,y)$ in $\mathbb{R}^2$ so that $v$ is not differentiable when $u(x,y)=u_0$ where $u_0$ is a constant. Can we solve a differential equation, such as the Schrödinger equation, using these coordinates? Can we compute integrals involving the Jacobian determinant in thes... |
Edit: So I was able to get the same value of r that's given, when coding up the sum of squares of function values directly in the script file, rather than on the Command Window. So, maybe there's a round-off error from doing it manually. Thanks.
I'm learning multivariable root finding, starting with some simple sets ... |
I'm writing a code for solving PDEs through the finite element method. In particular, I'm facing with 3D problems, in which I don't know how to calculate shape functions derivatives on the boundaries (3D triangular elements).
In the 2D triangle, the conversion from local to global shape functions derivatives is done th... |
I'm struggling with the following problem:
What is the maximum degree of exactness that we can obtain with the following quadrature >formula
$$\int_0^1 f(x)\frac{1}{\sqrt{x}}dx \approx w_0 f(x_0) + w_1 f(x_1)$$
Compute weights and nodes
I should use some theorem, but I can't understand which one! Also, I think that t... |
I'm interested in a type of problem on this form
$$\min_{x} x^{T}Ax+x^{T}b \quad \text{s.t} \quad x^{T}x=1 $$
where $A$ is positive definite. As you can see, if it weren't for the $x^{T}b$ term in the objective, this would be equivalent to finding the eigenvector with the smallest eigenvalue of $A$
This problem becomes... |
I have the element stiffness matrix for a thin "kirchhoff" plate. The plate is 3 [m] x 5 [m] and is simply supported on all edges. It's thickness is 0,2 [m]. On the plate there acts a constant load p = 5 [kN/m²]. For mu = 0,2 and E = 30000 [MPa] the displacement in the midpoint equals 0,168 [mm].
What's the most effici... |
Looking for advice on discretization (preferably finite difference) schemes for pdes on curves in general, but in this case it is an ellipse (so given by $(a\cos(r), b\sin(r)$). The problem is the advection equation
$$\frac{ \partial u_s}{\partial t}+ \frac{ \partial u_s}{\partial s}=0,$$
with $s$ corresponding to arc ... |
I need to compute the Singular Value Decomposition (SVD) of many $4 \times 4$ matrices. I'm looking for SVD algorithms specialized for small matrices. I've read that the std::vector sorting algorithm in the C++ STL is often hardcoded for short vectors for optimal performance. I want to hard code the SVD for the case $4... |
I have a system of ODEs for functions $f_i(t)$. At each time $t$, $f_i(t)$ is the position of particle $i$. The functions $f_i$ have a monotonicity property: at all times $0 < f_1(t) < f_2(t) < \dots < f_n(t)$. This property is preserved by the true dynamics, since there is a divergent repulsive term in the ODEs when a... |
Generally, we know that if we have this relation between Fourier transforms of three functions in frequency domain as:
$$\mathfrak{F}\{\mathsf{P}(t)\} = \mathfrak{F}\{\mathsf{Z}(t)\}\mathfrak{F}\{\mathsf{Q}(t)\}$$
We should have this relationship in the time domain as:
$$\mathsf{P}(t) = \int \mathsf{Z}(\tau) \mathsf{Q}... |
I am new in the GPUs world, I used them in Matlab ambient so I didn't need to appreciate the subtleties of these devices.
I know that a GPU can be divided into multiprocessors (also called Streaming Multiprocessors) whose single processors share a cache memory. I don't understand if the host is required for the communi... |
I have a doubt regarding the signal of the dissipative term in a finite difference solution for an equation of the form
$$
\frac{\partial u}{\partial x}+f(x)=0, u(0)=0
$$
In which $f$ is an odd function and the solution (judging by the modelled phoenomena) should be an even function in a symmetric domain (say, $D=[-1; ... |
For exploratory work related to special function implementations, I need to compute $\log \frac{\sin y}{\sin x} $, where $0 \le x \le y \le 2x < \frac{\pi}{2}$. Cases with $x \approx y$ in particular are critical to overall accuracy.
Given that the ratio of the sines is often close to unity, I want to use the log1p fun... |
I have been reading on different techniques used to reorder sparse matrices to achieve better performance, the most popular being the Cuthill-McKee or Reverse Cuthill-McKee algorithm. Most of those techniques focus on reducing the bandwidth of the matrix, which is defined as the furthest distance of a non-zero entry fr... |
Assume that you have two linear maps $A$ and $V$. For a given $x$ (of appropriate dimension) you can compute $Ax$ numerically, and for any $y$ (of appropriate dimension) you can calculate $V^Ty$ numerically. But you do not have access to both $A^Ty$ and $Vx$ on your computer. Hence, you can compute things like $$\langl... |
I have been unable to find the equivalent of the 5-point stencil finite differences for the Laplacian operator.
In 2 dimensions for me it is clear that, using the finite difference method: $$
\nabla_{2D}^2u = \frac{1}{h^2} \left( u_{1,0} + u_{-1,0} + u_{0,1} + u_{0,-1} -4 u_{0,0} \right)
$$
(h being the size grid/step... |
New to Computational Science, I hope I'm on the right exchange network for this question.
I have a time series data set that contains the sum of a source data set representing an exponential decay curve at discrete points in time. In other words, the time series data set is the integral over discrete time bins. An exam... |
In the Computational Materials Science: An Introduction by June Lee, he discusses molecular dynamics and density functional theory with examples from LAMMPS and QuantumEspresso, and explains LAMMPS and QuantumEspresso in detail.
I was wondering if there is a similar text in Computational Biology for molecular dynamics ... |
I always see Finite Element codes solving PDE with Dirichlet or Neumann boundary conditions. But, I have a problem now consisting of a straight cylinder with a circular base (a simple 3D tube), with inflow and outflow given by a pressure variation (for example, $p_\textrm{inflow}=20$ at the left circular "cap" and $p_\... |
I'm trying to learn COMSOL for a graduate research project and am struggling through a flow and transport in 3D tutorial. As such I'm walking through my boundary conditions and trying to figure out if I can find something that is wrong in my model.
I noticed that a cylinder, which I've assigned to be a well is treated ... |
I need transfinite mesh a small section of the bolt hole to insert a crack. However, The transfinite mesh and regular full quad mesh seem being incompatible and throwing errors. How can I combine transfinite quad and regular full quad meshes in the following geo file?
I used the following meshing options:
Packing of p... |
I'm studying periodic motions in a dynamical system and, as a newbie, I narrowly think of an object's periodicity in its spatial x-y coordinates, but what might be a good reason why the existence of periodicity in its velocities xdot and ydot is important too? I tend to think that so long as the object's spatial x and ... |
I have a real-valued linear system $Hx = b$ where $H$ is symmetric matrix** (not necessarily positive/negative definite) with a very particular structure:
$$
H = \begin{bmatrix} D && B \\ B^T && A\end{bmatrix}
$$
Where:
$A$ is dense with a small fixed dimension (e.g. 3x3)
$D$ is diagonal with a (relatively) large dime... |
[Relatively new to Petsc] I am writing an object oriented project and my idea is to have parallel objects when the user constructs the object with MPI arguments. So have member data Mat and fill/assembly it in the constructor. Though I am struggling doing this correctly so that's my first question (see below the code. ... |
The function JacobiSVD and BDCSVD can calcuate condtion number of a dense matrix via singular values.
However I need to know condition number of a sparese matrix due to slow computation speed using iterative linear solver. I can't find such function. If the sparse matrix is converted to one dense one in advance, the me... |
I want to solve with linear finite elements the equation $$\partial_t u = \partial_{x}(a(u)\partial_xu)$$
in the domain $t \in [0,1]$ and $x \in [-L,L]$. Here $a(u)$ is just a function of $u$.
Applying the weak formulation with $u(t,x)=\sum_{j} u_j(t) \varphi_j(x)$, I obtain $$\partial_t u_j(t) \int_{-L}^{L}\varphi_i(x... |
I am working on a numerical model to simulate the acoustic and elastic wave propagation in frequency domain via the Finite Element Method. Basically, the problem is to solve the Helmholtz equation in the fluid domain, the Navier-Cauchy equation in the solid domain and a couple of interface conditions.
More precisely, t... |
Recently, I've been reading up on various root-finding / optimization algorithms such as the Levenberg-Marquardt method, Gauss-Newton, Conjugate Gradient, trust-region and trust-region-dogleg.
I've then been practicing using Matlab's fsolve function for some easy problems such as solving g (g(1), g(2)) = (0,0), where g... |
Suppose that I have a linear system $Ax=b$ such that $A$ is ill-conditioned. Can I say that it is dangerous to find a solution with Gaussian Elimination for this system, or does there exist some class of pivoting that allows me to find a good solution?
Does the Vandermonde Matrix have something special to do with this ... |
I'm looking to solve numerically the following equation for $(d,d)$ variable $X$, in Einstein summation notation
$$M_{ijkl}X_{kl}=N_{ij}$$
Where $M$ is a $(d,d,d,d)$ 4th-moment tensor of random variable $(a,b)$ and admits representation in terms of 2nd and 1st moment tensors based on the Isserlis theorem
$$M_{ijkl}=E[a... |
I'm looking at Murray's book: Mathematical biology: an introduction , first volume, pag. 404
In particular, I'm interested to solve the following PDE:
$$\partial_t u = \partial_x (\text{sign}(x) u) + \partial_x (u^2\partial_x u)$$
and I chose as initial condition $u_0(x)=e^{-x^2}$ and boundary conditions $u(-L,t)=u(L,t... |
I am trying to solve :
$$-u''(x) + u(x) = \sin(2\pi x)\, ,\quad 0<x<1\, ,$$
$t>0$,
with $u(0) = u(1) = 0$. That has as exact solution
$$u(x) = \frac{\sin(2\pi x)}{1 + 4\pi^2}\, .$$
But the Forward Euler approximation solution does not match the exact solution.
Any help?
import numpy as np
import matplotlib.pyplot as pl... |
I'm currently doing some practice problems on root-finding and am writing up some notes / comments on my code. In my solver code, if my function value is below the tolerance that I've set, should I write,
"the function converged to a root, since the function evaluation is below the function tolerance"
or
"the function... |
My FEM scheme uses a 4-node quadrilateral element with bilinear shape functions. The simple problem I'm solving is. $\nabla ^2 f = 5$ But as I increase the number of nodes, the plot of the solution becomes flatter. I'm stumped as to why this might happen.Two plots below show how when I change the size of the mesh from ... |
I have a 3D diffusion equation that I want to solve using a time splitting (2D+1D). Assume that $A$ is the 2D discrete diffusion operator and $B$ is the 1D discrete diffusion operator.
I want to use a STRANG splitting to ensure a global 2nd order of precision :
\begin{equation}
\frac{\partial f}{\partial t}=\frac{1}{2}... |
I have the following formula that I need to rewrite in order to avoid catastrophic cancellation.
$$y =\sqrt{\frac{1}{2}\left(1-\sqrt{1-x^{2}}\right)}$$
As $x$ becomes smaller, $\sqrt{1-x^{2}}$ approaches $1$, so you will get $1 - 1.000000000......1$ which will result in a catastrophic cancellation. I tried to rewrite t... |
I need to solve with linear finite elements the equation $$\frac{\partial }{\partial x}\Bigl(\text{sgn}(x) u \Big) +\frac{\partial}{\partial x} \Bigl[ \sqrt{u} \frac{\partial u}{\partial x} \Bigr] =0$$
with boundary conditions $u(-L)=u(L)=0$ where $L=6$
(It's the steady state version of the equation described here: No... |
I'm trying to code up in Matlab a multivariable Newton's method, for a mapping from R^2 to R, but the Jacobian would be a 2x1 matrix, not square, so it wouldn't be invertible.
Does this mean that Newton's method can't be used for root-finding, when mappings are from R^2 to R?
Would I then need to implement a derivative... |
(Crossposted on cstheory.SE)
When is it easy to invert a sparse matrix? Specifically, I'm wondering about the cases in which matrix inversion has similar cost to sparse matrix multiplication, hence much lower cost than full matrix inversion.
If the pattern of non-zeros corresponds to a bounded tree-width graph, exact i... |
What would happen if I wrote a finite-difference code evaluated at a point where the function isn't differentiable analytically?
I'm trying to think analytically vs numerically.
Thanks,
|
For example I have an equation that goes something like
$
\partial_t \rho = -\nabla\cdot (\rho u) + \nabla \cdot(D(\rho, T) \nabla \rho) + \rho_s
$
($\rho, \rho_s, u, T$ are coupled with a few other PDEs)
Could I use Forward Euler to approximate the future $\rho$ and $T$ to estimate the future coefficients and then pl... |
I'm coding up a simple model for gradient-descent, and using it to minimize some simple, deterministic functions.
What step size could I choose that's simple enough for me to get started with?
Should I choose a constant step size of .1? .001? 1? 1.5?
On Wikipedia, it gives a model for this step size, called the Barz... |
I'm new in this community. I moved this question from Math community. I'm reading the following article
Article Here
and my target is to replicate the results for a project.
SEIRU Model: I obtained very nice results though I not used article data but my data. Here is the evolution image I obtained playing around with ... |
I'm implementing the Finite Different 2nd and 3rd derivatives in my research and naturally I'm looking for the most efficient approach.
From https://en.wikipedia.org/wiki/Finite_difference#cite_ref-WilmottHowison1995_1-0 I found a more efficient formula that takes 2 function evaluations out of the picture. But I'm not ... |
Suppose I want to solve a linear inverse problem. In this example we take a convolution with the kernel:
$$\frac{1}{(y^2+z^2)^{3/2}}$$
We only take a fixed $z$ for the computation and convolve with respect to $y$. The associated matrix $A$ is dependent on $z$, denoted as $A_z$.
The output vector $b$ is (spatially) loca... |
The price of a commodity can be described by the Schwartz mean reverting SDE
$$dS = \alpha(\mu-\log S)Sdt + \sigma S dW, \qquad \begin{array}.W = \text{ Standard Brownian motion} \\ \alpha = \text{ strength of mean reversion}\end{array}$$
From it is possible to derive the PDE for the price of the forward contract havin... |
(cross-posted on crossvalidated)
For random variable $(x,y)$ in $\mathbb{R}^{d}\times \mathbb{R}^{d}$ and vector $v \in \mathbb{R}^d$, I need to perform the following matrix vector multiplication.
$$T(v)=E[xy']v$$
The issue is that the expected matrix $E[xy']$ is too large to represent in memory ($d\approx $1 million),... |
I'm trying to solve the non-linear Poisson equation as a first step to solve the drift-diffusion equations for semiconductors. For reference, I'm using a preprint from the Weierstrass Institut (which I will refer to as [W]) that can be found here. All the model parameters and equations can be found there. I'll make ref... |
Most computational methods for solving PDEs are grid-based. What makes a computational grid "good", other than being sufficiently fine to resolve features of numerical solutions? Are grids with more or less equal size cells better than those with strongly varying grid cell size? Are grids with more "rounded" cells bett... |
I have a doubt on the project I'm working now.
Actually I want only customer voice from the recordings which contains customer-agent conversation.But I have no idea to filter customer voice from customer - agent voice recording.
Could someone please share your ideas on this ?
|
I need to apply a 1D type-II DCT (Discrete Cosine Transform) to each column of a matrix while normalizing the result in C++. Effectively, I want to multiply my matrix with an orthogonal type-II DCT-matrix (while avoiding the performance cost of matrix multiplication, of course).
Since this seems like an important compu... |
I have implemented the Remez algorithm in Python where all calculations were done with the Python mpmath library. I have noticed that sometimes the $|E_{max}|$ and $|E_{min}|$ do not monotonically increase anymore but recurrently iterate over the same values. Mainly, my stopping condition $|E_{max}| - |E_{min}| < u$ wh... |
In some algorithms to refine tetrahedron, we need to calculate the longest edge.
background
If exist a tetrahedron with node ABCD, it has edges AB,AC,AD,BC,BD,CD.
Suppose AB is the longest edge, and E is the middle point of edge AB, the tetrahedron can be split into two tetrahedrons, that is, BCDE and ACDE.
My problem ... |
I'm using Jacobi iterative method for finding eigenvalue and eigenvector for hermitian or symmetric matrix. Eigenvectors corresponding to eigenvalues are not exact. The third eigenvector is totally off. That I've implemented and read about Jacobi. What are the possible reasons for that?
This is my function file in scil... |
I want to solve the model of a tube with an elastic obstacle, something like a simple model of an vessel with a valve. The fluid is given by an evolutionary incompressible Navier--Stokes equations, and the obstacle for elasticity equation.
In the step 46 of dealii appears a simple way to manage this kind of problems
If... |
(I hope this question is fitting for this SE, I couldn't find very relevant tags)
I am looking for an online platform in the style of Google Colab with the following requirements:
possibility to run notebooks like in JupyterLab
necessity of at least python and julia
and following wishes:
privacy-focused (even if I a... |
I am struggling with this:
In a render view in Paraview, is it possible to draw a square or rectangle around the region of interest and have this as a close up render view in another window then being displayed?
Hope the question makes sense otherwise please comment and I provide a sketch of desired behaviour.
|
After composing my Paraview scene, I realised that I need to represent the units in a "Plot Selection Over Time" filter instead of seconds in milliseconds. How can one accomplish this?
|
Is there any algorithm (or tricks) for rootfinding to take advantages of automatic differentiation (AD)?
Rootfinding algorithms typically solve
$$
\mathbf{f}(\mathbf{y}) = \mathbf{0}
$$
where $\mathbf{f}:\mathbb{R}^n\rightarrow\mathbb{R}^n$ and $\mathbf{y}:\mathbb{R}^n$.
Newton's method is not applicable in my case bec... |
I adjusted plotting fonts in a Paraview scene, saved as .pvsm file, and loaded it in a different Paraview version. The fonts changed. Can this be avoided? Also ticks (I set it to maximum of 3 ticks) settings are gone. Is .pvsm not the correct way to save a complex scene?
|
I'm trying to compute the Lyapunov exponent for a smooth continuous time dynamical system(say, $\dot{\bar{x}} = f(\bar x)$). I using the QR decomposition method. Here are the steps that I follow.
Choose some initial condition in the basin of the attractor. Call this $\bar v_0$. And have a blob (hypersphere, $U$) of un... |
I am trying to build a triangle mesh of the surface of a sphere which also includes a subdomain defined by a 'polygon'. Here is a successful example (subdomain defined by the red dots):
Note that the triangles crossing lon = 180 are not shown.
The method I used to do this fails for finer meshes, because it only 'knows... |
I am trying to solve a generalized eigenvalue problem using Arpack, right now the code is using LAPACK but that's too slow, we only need a few eigenvalues and the matrices are sparse so using Arpack should be the way to go.
Before I start working with the original code I decided to test a simple case using scipy wrappe... |
I have quite a lot of experience solving unsteady Euler equations, including multi-component ones, with in house-coded finite-difference and finite-volume methods, including MacCormack and MUSCLE schemes and WENO flux reconstruction. Now I'm considering "upgrading" to laminar NS equations for compressible gases (i.e. w... |
I am trying to solve the boundary value problem for heat equation:
$$
u_{xx} + u_{yy} = f(x,y)
$$
where the solution $u(x,y) \in [0,1] \times [0,1]$ and the Dirichlet boundary condition $u(x,y) = u_0$.
So I discretized the problem with $N$ interior points with step size $h = 1/(N+1)$
$$
w_{i,j-1} + w_{i+1, j} + w_{i... |
I'm trying to numerically estimate the Jacobian from a time-series. Following the paper, https://journals.aps.org/pra/abstract/10.1103/PhysRevA.43.2787.
Consider that I have a scalar time series $x = (x(1), x(2), \dots, x(N - 1), x(N))$. In total there are $N$ data-points. So the steps that I'm following are as follows... |
I've a matrix equation $\bar z^{(r)}(k + 1) = \bar{DF} ~ \bar z^{(r)}(k)$. Now the $\bar z$'s and $\bar{DF}$ are $d \times d$ matrices. Now $\bar{DF} = \begin{pmatrix}
0 & 1 & 0 & 0 & \cdots & 0 \\
0 & 0 & 1 & 0 & \cdots & 0 \\
\vdots & & & & \\
0 & 0 & 0 & 0 & \cdots & 1 \\
DF_{d1} & DF_{d2} & DF_{d3} & DF_{d4} & \cdo... |
Is the refinement equation for the orthonormal Daubechies scaling function
$$\phi(x) = \sqrt{2} \sum_n h_n \phi(2x-n) \;?$$
The filter coefficients for Daubechies wavelets have been given e.g. in
this page. Consider case D20. Do the indices $n$ for $h_n$ run from 0 to 19? Or do we set $h_{-n} = h_n$?
Suppose we have an... |
In the rational case, we are interested to find polynomials $P(x)$ and $Q(x)$ s.t.
$f(x_k)-P(x_k)/Q(x_k)=(-1)^kE$ for $k=1,2,\ldots, N$ where $N=deg(P)+deg(Q)+2$
This can be rewritten as
$$
(1)~~~~~~(f(x_k)-(-1)^kE)Q(x_k)-P(x_k)=0
$$
The equation (1) is non-linear.
The notes in this document
suggest using the following... |
Using the Remez algorithm, implemented using multi-precision library, in certain functions that I want to approximate, the error curve does not oscillate in between reference points, and so no roots can be found (subsequently no extrema).
For example, this happens when I try to approximate $ln$ (natural logarithm) over... |
In the following code, if I compile using ifort runs ok, but if I run it with gfortran appears the error: "Program received signal SIGSEGV: Segmentation fault - invalid memory reference."
Can someone told me what I'm doing bad? Or maybe is an issue of gfortran.
PROGRAM testing
IMPLICIT NONE
REAL :: coordN(3,2),aux(... |
So imagine I have a $m$ vectors each of dimension $d$. Lets call them, $\vec x_{i}$, with $i = 1, 2, 3, 4, 5, \dots, m$. Now the idea is to find the neighbours of $\vec x_{i}$ (calling them $\vec x_{j}$), within a ball of radius $r$. So, $$ || \vec x_{i} - \vec x_{j} || \le r$$.
Note: $|| \cdots ||$ is the Euclidean no... |
I am currently using Task Spooler, which is a job scheduler I have installed on my iMac. I have encountered a problem in which I cannot execute a job properly.
Using a bash script, this is how I run can use Task Spooler effectively:
K="opt" # Jobname
ts -S 1 # Number of jobs to run (1 or 2)
for a in *inp
do
ts -m... |
I have inherited of a flight dynamics simulation in C++ which represents a small drone with it's autopilot, actuator dynamics and a solid state IMU.
Hence, it is composed of a few models, some continuous (flight dynamics & actuators), integrated with a runge kutta 4 scheme, some discrete (the autopilot and IMU). I have... |
In my application, I have two general real matrices $A$,$B$ defined as follows,
$$
A=\begin{bmatrix}
-s I_3 & A_0 & 0 & 0 \\
A_0^T & -s I_3 & 0 & 0 \\
0 & A_1 & -s I_3 & A_0 \\
A_1^T & 0 & A_0^T & -s I_3
\end{bmatrix},
B=\begin{bmatrix}
0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 \\
I_3 & 0 & 0 &... |
I am writting a Fem code in c++ for a 2d plane stress model. My question is regarding the assembly stiffness matrix.I noticed that some elements of the matrix are not exactly zero but insted a number close to zero for example -1.7677e-15. Can floating point arithmetic erros result to an ill-conditioned stiffness matri... |
I receive the following error when I run the code.
ODEintWarning: Excess work done on this call (perhaps wrong Dfun
type). Run with full_output = 1 to get quantitative information. warnings.warn(warning_msg,
ODEintWarning)
I got this from messing around with an example received from my professor and can't seem to und... |
I need to solve $Ax=b$ in about 1 million dimensions. Furthermore, A is only accessible through matrix vector products, and these are noisy/inexact.
Is there any solver with Python interface I can try on this problem?
Basically I want to check if there's anything in the linalg community that might work to train a neura... |
Assume the time-dependent linear elasticity equation. Using a finite element discretization we obtain
$$M\ddot{u}=Ku+F_\text{ext}$$
where $M$ is the mass matrix,$K$ is the stiffness matrix, and $F_\text{ext}$ is the external load vector. Further using a time discretization scheme(e.g. Forward Euler), we obtain
$$
M\dot... |
I am trying to approximate a symmetric tensor of which the values are in the range of [1e-7,1e-4], by a symmetric tensor decomposition of lower rank. For this I am using the L-BFGS-B method in SciPy's optimization package.
The relative errors (based on the Frobenius norm) I am obtaining are quite big (greater than 1). ... |
I have the following problem:
$$\min_{x\in \mathbb{R}^n}\|Ax-b\|_1$$
where the matrix $A$ is large and sparse. I am looking for methods/code that can minimize this efficiently. References are very welcome.
|
I actually have this data locality as a possible problem for why my fortran program runs somewhat slow. In one part of this program, I have nested loops and throughout these loops, a given section of a big array is referenced multiple times. The pseudocode goes like this
subroutine foo()
use mymodule, only : big_arra... |
I am trying to get the numerical integration of a function using scipy's integrate.quad as follows.
$$
\begin{equation}
G (\alpha) = \frac{4\alpha}{\pi}\int_0^{\infty} x e^{-\alpha x^2} {(\pi/2}+\mathrm{tan}^{-1}[Y_0(x)/J_0 (x)]) \mathrm{d}x
\end{equation}
$$
import numpy as np
from scipy import integrate
from scipy.s... |
When one equality-constrained optimization is formulated, the method of Lagrange multiplier will be the choice for me. In Chapter 17 from the book Numerical Optimization, quadratic penalty method can be used for such case. However, it doesn't mention when one should select quadratic penalty method over method of Lagran... |
I have two data vectors $y1$ and $y2$, and I want to plot both of them as functions of the vector $x$. I want the result to be two overlapping curves. Here is the set of commands I am using.
y2=[0.003,0.003,0.011,0.011,0.015,0.020,0.023,0.024,0.024,0.024,0.024,0.024,0.024,0.025,0.024,0.024,0.024,0.024,0.024,0.024,0.023... |
From Computer Systems: a Programmer's Perspective:
With single-precision floating point
the expression (3.14+1e10)-1e10 evaluates to 0.0: the value 3.14 is lost due to rounding.
the expression (1e20*1e20)*1e-20 evaluates to +∞ , while 1e20*(1e20*1e-20) evaluates to 1e20.
How can I detect lost of precision due to ... |
In Computer Systems: a Programmer's Perspective:
Writing TMin in C
In Figure 2.19 and in Problem 2.21, we carefully wrote the value of TMin32 as -2,147,483,647-1. Why
not simply write it as either -2,147,483,648 or 0x80000000? Looking at the C header file limits.h,
we see that they use a similar method as we have to wr... |
Consider a nonlinear hyperbolic conservation equation:
$$
\partial_{t}u = -\partial_{x}f(u)
$$
The spatial derivative of $f(u)$ may approximated after a spatial discretization by $x_{j}=j\Delta x$
$$
\partial_{x}f(u_{j}) \approx \frac{1}{\Delta x}\left(F_{j+\frac{1}{2}}-F_{j-\frac{1}{2}}\right)
$$
where $F$ represents ... |
One of the most challenges in distributed consensus mechanisms is both time complexity and message complexity.
For example, PBFT message complexity is O(n^2) that means that it is only scalable to tens of nodes. Thus, classical BFT (Byzantine Fault Tolerant) consensus mechanisms are not scalable to the large networks.
... |
I have an interesting little problem that I believe can be formulated in terms of optimization or constraint programming. I have a few dozen variables $a$, $b$, $c$ ... and a set of constraints that establish relations between them, such as $a < b$. Some of these constraints are "turned on" by binary indicator variable... |
I am trying to solve a linear elasticity model using finite element discretization in a rectangle domain [0,1]x[0,1]. For the solution of the the linear system $Ku=F$ I am using the CG algorithm. However, I have noticed some weird behaviour of the algorithm. For small grids (e.g 2x2 or 3x3 or 2x1 ...) the algorithm fai... |
Most of the time, when I see someone reporting the average timing of a certain algorithm on a computer in a computational mathematics paper, they do something like this:
Run the operation $n$ times (e.g., $n=100$ times);
Discard the lowest and highest $m$ times (e.g., $m=10$ outliers);
Compute the average of the remai... |
Let $A$ be a matrix with real entries, and let $A_+$ be $A$ augmented by a single column.
From linear algebra we know
\begin{equation}
\operatorname{rank}(A_+) = \operatorname{rank}(A) \hspace{10pt} or \hspace{10pt} \operatorname{rank}(A_+) = \operatorname{rank}(A)+1
\end{equation}
But what if $A$ has double-precisio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.