instruction
stringlengths
43
28.1k
In order to simulate the following equation using FDM $$u_t(t,x)-u_{xx}(t,x)=0, \quad (t,x) \in (0,1)\times (0,1)$$ $$(u_t(t,x)-u_{x}(t,x))\rvert_{x=0}=0, \quad t \in (0,1)$$ $$(u_t(t,x)+u_{x}(t,x))\rvert_{x=1}=0, \quad t \in (0,1)$$ $$u(0,x)=u_0, \quad x \in (0,1)$$ $$u(0,0) =\mu_0, \quad u(0,1)=\mu_1,$$ where $f,g,u_...
So I have a set of linear homogeneous equations $A\vec{x}=0$. I would like to solve this for non-negative solutions. I can solve the system in general and I get the two vectors that span the solution space, but one of the vectors has negative entries. I would like to restrict the solution space to $\mathbb{R}_{\geq0}^...
I am working on an Android app which lets a group of children draw whatever they want in a specific area. I need to check if the lines and figure that they draw are symmetric. The problem is that since the app is designed to let them draw freehand, I don't know how to compare the lines by considering certain flexibilit...
I’m looking for software that can simulate “hot” plasmas of multiple ion species...so some sort of simulation software that could calculate ion temperature and density distributions taking into account ion-ion, ion-electron, neutral-ion collisions. Preferably open-source, though a reasonably priced off-the-shelf packag...
I'm trying to use the Kutta-Merson to get the same results as in the book Solitons, Nonlinear Evolution Equations and Inverse Scattering - M. J. Ablowitz - pg 140 The author propose using the Kutta-Merson in the following scheme: $$ i\frac{du_j}{dt} + (u_{j-1} - 2u_j + u_{j+1})/h^2 + |u_j|^2(u_{j-1} + u_{j+1}) = 0 $$ g...
I have read that if, for example, I have a double for loop that runs over the indexes of a matrix, then putting the column running index in the outer loop is more efficient. For example: a=zeros(1000); for j=1:1000 for i=1:1000 a(i,j)=1; end end What is the most efficient way to code it if I have three or more for...
I've been trying to learn how to solve simple acceleration-limited trajectory planning problems. I'm working in C++ and I've been using the Eigen library to do linear systems solving. I'm doing the nonlinear-programming part myself because that's part of what I want to learn. Here's a blog post with some animated GIFs ...
Note: This question has also been asked on stackoverflow - see https://stackoverflow.com/questions/57197910/how-to-implement-this-even-odd-matrix-decomposition-efficiently?noredirect=1#comment100975572_57197910 In connection with solving a partial differential equation numerically, I have come across the following que...
I'm currently writing a lid drive cavity CFD code on python. Currently, my code has some issues (values jumping bear b.c). I was wondering what are some good habits in debugging numerical codes. Hopefully, I would be able to learn some which I may apply to my future projects.
When simulating a friction dynamic system, I have come to a problem when approaching steady-state. In the example below, a box moves along a surface with a certain friction coefficient: #!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot as plt G = 9.8 MU = 0.3 TIME_STEP = [0.1,...
Question As a test, I transform a uniform distribution over the unit square. But when I check the transformed distribution with Monte Carlo, it is wrong. What went wrong? Thanks. Problem Random variables $\vec{X} = (X_1, X_2)$ follows the uniform distribution over the unit square. In other words, $X_{1} \sim U[0, 1]$...
For the solution of many PDE, implicit high-order time integration schemes are required. I am specifically interested in schemes that do not require a constant time step. I am well acquainted with BDF time integration schemes and I am aware of their (sometimes harsh) limitations in terms of stability but also in terms...
I've just (to my embarrassment) encountered a BLAS-like extension of a matrix-matrix product subroutine gemm in Intel MKL: gemm3m. This subroutine (particular versions: cgemm3m and zgemm3m) allows performing matrix-matrix multiplication for complex-valued matrices using fewer arithmetic operations. The gemm3m documenta...
I need to minimize a single polynomial $P(x_1,x_2,...,x_n)$ with the constraint that for each $i$, $0\leq x_i \leq 1$. The number of variables in my practical problem is at most $50$. The degree is at most $10$. The number of monomials is about 2 million. Are there any tools that can handle such minimization problems? ...
In multicore architecture, are Instructions Per Second (IPS) and Instructions Per Cycle (IPC) parameters of a single core or the whole CPU? Where to look out for this value? And does it change as the number of cores increases? For example, in case of Intel's Sandy Bridge and Cascade Lake, what is IPC value? Which Intel...
I know (from https://scicomp.stackexchange.com/a/31339/20545, among others) that I need a certain mesh density in FEM, else I might get non-physical oscillations in my solution. How do multigrid approaches deal with such problems? They reduce the problem to a coarser mesh, solve it there, and use the result (by smoothe...
I have been writing an adaptive mesh refinement (amr) code. As a prototype for the code, I have been looking at an adaptive mesh refinement code written by my adviser (written in c). I find looking at their code to be useful, but the code also does things like make heavy use of global variables, and I am wondering if t...
I have implemented in OpenGL alpha blending for a triangle mesh. I render this mesh using a vector of indices that indicate which vertex from a vertices vector should be drawn. The problem is to correctly apply the translucency triangles should be sorted from back to front (based on the distance from the camera). Sorti...
This looked true to me, I worked through the algebra for 1D and confirmed it. But no one seems to mention it, so maybe I'm missing something... I'm using Bridson's SIGGRAPH 2007 course notes. [5MB pdf], p. 21 (page 33 in the pdf). Semi-Lagrangian: back-trapolate the velocity field, to find the "particle" that would end...
We deal with a large-scale linear optimization problem (~50000 variables and ~4000000 constraints). We use AMPL Studio modeling environment for problem modeling and then calling linear solver (CPLEX, Gurobi, etc.). However, before calling a solver, the preparation process (generation of LP or MPS file I guess?) of such...
I am trying to solve a large system of non-linear equations (about a few hundred equations and variable but with less variable than equations). Given that the system is really sparse and large I am using the optimize.least_square solver of SciPy with the Trust Regions method. But for some examples, it takes quite long...
One of the paper titled "Rules of Thumb in Data Engineering" (Jim Gray et. el.) mentions some calculations based on Amdahl's balanced system law. Link to paper: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/ms_tr_99_100_rules_of_thumb_in_data_engineering.pdf Initially, the paper provides some rul...
Hi. I have a question at Mathematics and they suggested post here, once it's not common. I transcript as following. Many thanks I need to solve with basic methods this simple Shallow Water Model: $$\begin{bmatrix}h\\ hv\end{bmatrix}_t+\begin{bmatrix}hv\\ hv^2+\frac{1}{2}gh^2\end{bmatrix}_x=\begin{bmatrix}0\\ 0\end{bma...
I want to compare some properties of traveling waves through two randomly diffusive media. The traveling waves follow the fisher equation: $$\frac{du}{dt} = \nabla(\mathbf{D}_{\gamma} \nabla u) + u(1-u)$$. I am creating a random field of diagonal matrices in the following form: $$\mathbf{D}_{\gamma}(\mathbf{x}) = \math...
I have $x$ and $y$ data, both of which have their own covariance matrices. scipy.optimize.curve_fit will accept a covariance matrix for the $y$ data, called sigma, but not for $x$ data. I would like to pass a covariance matrix for my $x$ data also since it is also correlated. I found scipy.odr, however, the 2d-array ...
Let's say we have a Matrix M and a column vector v like below multiply equals Assume we can only perform multiplication, addition and substraction operation. With normal approach we need 3 multipliction and 3 addition to calculate row1 row1 = v_1 + 2v_2 + 2v_3 + 4v_4. However we can do it smartly by t1 = v_1 + 2*v...
I am reading a paper on implementing convolution neural network for a 3D point cloud. In this paper, they are dividing the point cloud into voxels. Is there any easy way to do it using point cloud library?
Say I have an array s with elements of 0 and 1. From my understanding, a Hoshen–Kopelman algorithm for s will be (in 3 dimensions d=3): label=labelmatrix(bwconncomp(s,2*d)); If I want to do the same thing but now s will have periodic boundary conditions (specifically in 3 dimensions if it matters), how do I do that? E...
I'm computing the Groebner basis of an ideal defined over the QQ ring. Once I have this Groebner basis, I would like to obtain a set of values that satisfy the equations in the Groebner basis. I know that the full set is going to be the variety of the ideal, but since this object is huge, I might not be interested in f...
When making a plot in Matlab using errorbar(...) the color of the error bars is the same as the plot. How do I set them to be in a different color? I tried looking for a way to do it in here: https://www.mathworks.com/help/matlab/ref/matlab.graphics.chart.primitive.errorbar-properties.html https://www.mathworks.com/hel...
I was wondering if anyone could help me with a simulation in Python (there is a small part of the code where I have a question) about the Ising model. First, I wanted to get the magnetization $M$ which is defined as: $$ M = \sum_i \sigma ^ z_i $$ And the part of the code to obtain $M$ was successful and was the followi...
Does the condition number change when a matrix is reordered by e.g. Cuthill Mckee or some other method?
It feels like this problem should be commonplace, but I don't know what it's called: Minimize $$ \sum_{i=1}^{n}a^{(i)}_{k_i} + \sum_{i=1}^n\sum_{j=i+1}^n b^{(ij)}_{k_i k_j} $$ with respect to integers $k_i \in [1 .. m]$ where $\forall i,j \in [1..n]$ $a^{(i)} \in \mathbf{R}^m$ and $b^{(ij)} \in \mathbf{R}^{m \times m...
I am looking for a software package to compute incomplete LU factorisations in parallel. Further considerations are: The package must allow for arbitrary level-of-fill or threshold-based truncation. ILU(0) is not good enough. The package must be "direct", i.e. based on the same recursion formulae as the exact factori...
I'm making a NVT Monte Carlo (MC) simulation code with only short range interaction. I found many MC tutorial codes (usually Lennard-Jones system) in online. However, most of them are doing energy calculation without using neighbor list. I want to see how and when neighbor list is built and updated during MC simulation...
I am wondering if there is an stabilized equi-order scheme in pressure correction scheme in solving Navier-Stokes equation? Usually P2-P1 element combination is used to solve NS equation, and a PSPG stabilizing term could be added if NS equation is solved by P1-P1 element in a coupled way. My question is, is there a co...
I have come across a Rayleigh-Bernard simulation code which doesn't have the laplacian term but an integrating factor (in the exponential form) containing viscosity and diffusivity. I found out that it is an exponential trick. I couldn't find any literature on it except that. I would like to know more. Can someone poin...
If Matplotlib could volume render, I would not ask this question. But it can't. Can I however instead use Matplotlib to plot the surface of a 3D body? I.e. is there a way to (i) triangulate the outside or 'skin' of this body, and (ii) can that surface be plotted? Note that the body is regularly sampled in the 3 dimensi...
I found that a lot of my computational science programming has testing requirements that are not covered by standard test frameworks: Computation time testing To make sure that algorithms don't get slower. I could do something like assureSmallerEqual(RuntimeWrapper(algorithm),53) but I'd like the 53 seconds threshold...
I have developed a python code for a lid-drive cavity model. However, my results are not converging. The algorithm of my code looks like this: Euler Momentum Equation looks like this: $$\frac{u^{n+1}-u^{n}}{\Delta t}=-\frac{1}{\rho}\vec{P}^{n+1}-\vec{U}^{n}\cdot\nabla\vec{U}^{n}+\nu\nabla^{2}\vec{U}^{n}$$ 1) The first...
I was wondering whether any of you knew if FENICS has the capability to solve coupled 1D-3D problems that are linear non-iteratively? As an example, pipes embedded in a porous domain will provide pressure sources (at their terminal ends) to the Darcy equation. This can be solved with a linear solver if I can concatenat...
I have a Poisson equation with wildly varying material parameters (1 .. 1000), wildly varying element sizes (5 nm .. 100 um) and some quite anisotropic (tetrahedral) elements (100 nm x 100 um). I use (a C++ port of) Dan Spielman's approxChol as a preconditioner for a preconditioned CG method. It converges pretty fast (...
I want to factorize very huge numbers (e.g. 100-bits, 200-bits numbers) with Cython. Hi everyone, I implemented the Elliptic Curve Method for factorization into Python 3.6. Now, I want to speed up my code using Cython (version 29.13). I'm a beginner in Cython world but I know that Cython works better if I define type f...
I am doing specific tests on matrices, so forgive me if this question doesn't seem related to Petsc typical use. I have a SEQAIJ matrix on one process and I need to send it to another one. Is there a Petsc routine that enables this ?
Consider the minimization problem described this paper. Let $f_{\lambda}$ be the minimizer. As a part of extending my work, I am able to show the following facts $$\lim_\limits{\lambda \to 0}\|f_{\lambda}\|_{L^2} = 0$$ and $$\lim_\limits{\lambda \to \infty}\|f_{\lambda}\|_{L^2} = 0$$ My problem now is (as I would like ...
I am graduate student and recently tried to implement quad-tree based AMR. Well I have implemented simple Poisson Solver on node-based quadtree, but I am not sure that my data structure is right. To be honest, I am not sure about my coding skills. So I'll just post some of my structures. class node { double x,y; ce...
I'm trying to solve 1D Euler equations with gravity in spherical coordinates using a finite-difference TVD MacCormack method on a non-uniform grid of $N$ components, following the method provided in Appendix A in this paper. My aim is to evaluate stationary solutions. The discretization for the source term in the secon...
I wrote a Matlab code that involves doing a numeric calculation (relaxation), but it is quite slow. I learned of the possibility of using a mex file to run a C code and integrate it into Matlab, so I was thinking of doing the numerical calculation (which is relatively simple but involves loops and takes time) in C, and...
I am trying to perform a calculation in numpy that depends on several parameters, and involved the creation of many intermediate arrays. These intermediate steps involve integrals over more parameters. Because of this, part of the way through my calculation I attempt to create an array that I realize is around 30GB in ...
Given a positive objective function $f$ that acts on a real-valued matrix $A$, I am interested in the following problem $$\underset{A \in \mathbb{R}^{n \times n}}{\text{minimize}} \quad f(A) \quad \text{subject to} \quad b \leq \text{Re}(\lambda_j) \leq a, \quad j=1,2,...n \ ,$$ where $\lambda_j \in \mathbb{C}$ are the...
I want to implement a physics simulator for large floating base rigid body systems from scratch. The Rigid Body Dynamics Systems (RBD) should typically have the following characteristics: About ~50 degrees of freedom (DoF) plus the 6 DoF of the floating base (e.g., a legged robot, a humanoid robot, etc.). It will alwa...
Numpy's einsum only works with dense tensors. Is there an alternative that also works with sparse tensors and linear operators? For example, I might have a function f that computes matrix vector multiplications of the form $A^{-1}x$ for some matrix $A$. Numpy's einsum doesn't even allow np.einsum('ij,j',A,x) let alon...
$$ \nabla\cdot \mathbf{u} = 0 \\ \frac{\partial \mathbf{u}}{\partial t}+\left(\mathbf{u}\cdot \nabla\right)\mathbf{u} = -\nabla p+\nu\nabla^2\mathbf{u}+\alpha g\theta\mathbf{e}_z\\ \frac{\partial\theta}{\partial t}+ \left(\mathbf{u}\cdot \nabla\right)\theta = \kappa\nabla^2\theta+\mathbf{u}_z\frac{\Delta T}{H} $$ Can I...
I have minimization problem of the form $$ G(f) + \|\Delta f\|^2_{L^2(\Omega)} \to \min $$ over all $f\in C^2(\Omega)$, $\Omega$ being closed and bounded. Let us forgot about $G$; I'm interested in how to discretize the $L^2$-norm. In the context of finite volumes, one has $$ \begin{multline} \int_\Omega (\Delta f)^2 =...
I'm interested in evaluating \begin{equation} \int_0^x \frac{Si(t)}{t}\;dt \end{equation} Where \begin{equation} Si(x) = \int_0^x \frac{\sin t}{t}\;dt \end{equation} I've found a nice method for evaluating $Si(x)$ using Pade and Chebyshev-Pade approximations in https://arxiv.org/pdf/1407.7676.pdf but I'm unable to fi...
I have the correct plot for specific heat capacity when I am using the formula which is $C_V$ = differentiation of entropy with respect to temperature. However, When I try to calculate $C_V$, by using formula $$C_V = \frac{\langle E^2\rangle - \langle E\rangle ^2}{T^2}\, ,$$ I am getting a strange result. I am expe...
I want to solve a matrix system of the form $Ax=b$ where $A$ is ill-conditioned. The matrix system comes from a structural simulation problem which was discretized using finite elements. I do not have access to the finite element model. I know that proper boundary conditions improve the condition number of the matrix b...
I am looking for a good (canonical?) overview paper(s)/book(s) on the classification of multiobjective optimization algorithms. I am focused on obtaining a representative set of Pareto optimal solutions generally for real-world optimization problems in electromagnetics; however, the reference should not be field-restri...
I was reading a paper on arXiv where, in Section 2.4, the authors are discussing the error that arises in the solution of a linear system $$Ax = b,$$ or, to match up better with the paper, $$\Phi \alpha = u,$$ due to machine precision. The system is overdetermined so they solve it with least squares. To make a long sto...
I have set of N m-dimensional vectors $\{\phi_i\}$ which gradually loses mutual orthogonality in an algorithm. => I have to re-orthogonalize them every few iterations. But if I use the Gram–Schmidt algorithm for instance, the first vectors (pivot) are perfectly preserved while the the last vectors are strongly perturbe...
Is there an efficient way to form this block matrix with numpy or scipy? $$ \left[ \begin{array}{cccc} \mathbf{B} & \mathbf{0} & \cdots & \mathbf{0}\\ \mathbf{AB} & \mathbf{B} & \cdots & \mathbf{0}\\ \vdots & \vdots & \ddots & \vdots\\ \mathbf{A}^{N-1}\mathbf{B} & \mathbf{A}^{N-2}\mathbf{B} & \cdots & \mathbf{B}\\ \end...
My plan is to solve the heat equation in the right half portion of the domain, while having the left half completely isolated with constant temperature. To do so, I model the left half with a very low conductivity. I then apply a heat flux to the top side of the right half and a Dirichlet BC to the bottom side. For the...
Optimizing two models here, each model having its own set of parameters and an objective, but both models run on the same data which is difficult to compute, and which is computed based on both models' params. How can one optimize the models simultaneously both models relative to their respective objectives? Here's wha...
I am using the C++ library ODEint, which is part of Boost, to solve an extremely large system of coupled ODEs - in particular 1975 equations with large rational functions in the coefficients. In the provided examples by the authors the ODE system is always explicitly written in the source code. Unfortunately my source ...
I tried to use a midpoint method and numerically solve the Schrödinger equation for the original Landau-Zener (LZ) problem: a $2\times 2$ Hamiltonian $$\left(\begin{array}{c} \alpha t\\ \delta \end{array}\begin{array}{c} \delta \\-\alpha t \end{array}\right)$$ with initial condition $\psi=(1, 0)$ (the ground state) at...
In OpenFOAM by default, the FireFOAM is well supported for solid pyrolysis modeling. With that in mind, I managed to built my solver for a modified version of pyrolysis (for dry coal - without moisture) based on FireFOAM. Now in the case of wet coal pyrolysis, the pyrolysis model should be developed [absence of air - n...
I have a .csv file of thousands of (x,y,z) point particles that I would like to visualize in ParaView. I am able to plot a 3D scatterplot using the TableToPoints, and by decreasing point opacity I can see some substructure in the particles' arrangement. I'm looking for a better option to easily see different regions w...
I'm trying to define a MINLP optimization problem with GEKKO in Python, and I want to use some variables with fixed values. For my first variable, x1, I need to define the following values (as would be defined in a list): x1 = [19.05, 25.0, 29.3, 30.2] How can I define these type of variables in my model?
I am attempting to replicate results from this article. I'm not sure why but my results are completely different and wrong. For example, the exact solution with parameters ($x=0.1$, $T=0.01$, $Re=0.1$ and $\Delta t=0.0001$) is $0.11461$ but my approximated solution gives $-175.4007$. Is anyone able to spot my mistake?...
I want to simulate a diffusion environment given by the differential equation $$\frac{\partial u(x,y,t)}{\partial t}=D\left(\frac{\partial^2 u(x,y,t)}{\partial x^2}+\frac{\partial^2 u(x,y,t)}{\partial y^2}\right),$$ in a constrained environment with reflecting and absorbing boundaries and certain initial conditions. I...
I have the following convex optimization problem. I would like to ask is there any efficient way to solve it in Python? Can I use CVXOPT package? If so, any detailed instruction? Thanks a lot. $$ \min_{T\in[0, \infty]^{10}}\sum_{i=1}^{10}T_ia_i $$ subject to $$ x^{\top}_j(\sum_{i=1}^{10}T_i x_ix_i^{\top})^{-1}x_j\leq ...
I am numerically solving a nonlinear wave PDE using the Runge-Kutta method, and I know the solution I am looking for is constant in time, but I do not know the solution. What is a good way of verifying I converged into the right solution? Additional information: I know this solution is the only stable solution
Excuse my lack of vocabulary for I have no formal training in this field, which is also why I ask this question - it may be trivial or it may be impossible. I want to evaluate an expression in the following form down to a binary float with "correct" rounding and I'm worried that double-rounding will corrupt my result: ...
I need to estimate $$ \mathbb{E}_x[f_i(x)] = \int_{\mathbb{R}^n} f_i(x) p(x) dx $$ for many functions $f_i(x)$, where $p(x)$ is the density of a normal distribution. The evaluation of all the functions $f_i(x)$ is expensive. I was looking into Bayesian Quadrature but I cannot find an (approximately) optimal way of choo...
I'm struggling to find a good detailed reference explaining the Arc-length method or, more generally, Riks method and its derivations. I looked for the classical books in nonlinear mechanics (the ones by Crisfield, De Borst, Bathe, etc) but they're confusing for a beginner in nonlinear analysis. Thus, I'd like to reque...
I was curious if there was any software (preferably in C++, Java, and/or python) that could be used to simulate the following: Heat capacity of a fluid Heat transfer through a liquid and a solid specific heat molten salt flow as a liquid operating temperatures for salt around 600 C Effectively, this is simulating the c...
I am a graduate student majoring scientific computing. The numeric model I made caused a very ugly-looking saddle-point linear system. It is not symmetric at all and I will attach the sparsity pattern below. So far, I've only dealt with matrices with non-zero diagonal entries, so incomplete LU-type preconditioner with ...
My simulation, written in C++, generates a large amount (roughly ~500) of text files for each set of parameters I try to simulate, with four columns of ~5k double values in each file. Furthermore, to keep track of the used parameters, I print all the used parameters in the name of the files, followed by the current fil...
I'm trying to include a "great M" penalty in my objective function. I want use the entry x vector values as entry values in a function. A fixed maximum value is took initially for the returned value of this function, and I want to avoid the solutions which, with x values given, returns values higher than the fixed one...
I have essentially periodic data from a simulation (not exactly periodic but is qualitatively fairly periodic), and I'd like to take an average or noise filter of some sort that I can get a well converged average/smoothed value. Ideally I'd like something that converges to a steady value as the square of the number of ...
The usual story of Givens rotations vs Householder reflections is that Householder reflections are better if you want to map a long vector to $e_1$, while Givens is better if you want to map a 2-vector to $e_1$. However, I can't find a reference which explains why Givens is better in the 2-vector case. Can anyone expla...
I am studying how to speed-up the BFGS method using quantum computing techniques. I have used a method of speeding up the gradient of the function, but it sacrifices the precision value of the gradient. More specifically, the gradient is calculated using $O(\sqrt{n} / \epsilon)$ function calls, where $n$ is the dimens...
Suppose $f(x,y)$ is a complex function of two real arguments with roots* that are not discrete points but lie in curves. (Is there are term for this characteristic?) An example is shown below: the black curves show all the points in the $(x, y)$ plane where $f(x, y) = 0$. What is the best way to find these curves numer...
I am using the reduced chi-squared statistic to determine the goodness of fit. I run several simulations and determine that a parameter 'p' has a certain range of values that all give values between 0.9-1.1 for the reduced chi-squared. Visually all the fits are deemed acceptable. Is there are a way to estimate the erro...
I have the following convolution as part of a numerical simulation. $$T(r)=\int \mathrm{d}^3r_2\, p(r_2)f(r_2)\alpha(r-r_2)\, .$$ My problem is that the analytical expressions for $f$ and $p$ do exist but, I have the expression for $\alpha$ only in the Fourier domain in the form of $\alpha(k)$. I planned to evaluate in...
Say the model is $F(x_1)G(x_2)Z(x_3) = y \in \mathbb{R}^N$, with $F,G,Z$ explicitly known, we are given observation of $y$ as $y_b \in \mathbb{R}^N$ to find the value of $x_1$, $x_2$, $x_3$ for each sample. Clearly this is an underdetermined inverse problem. I have seen some iterative algorithm like this, start wit...
Suppose if we take $X_h(G)$ as finite element space then this space (space of piecewise constant basis function)is defined as $$X_h=\{v: v|_{T}=c_{T}, T \in \mathbb{T}\},$$ where $\mathbb{T}$ is a subdivision of domain $G$. Then my main question is "How to define (or fix value) of constant $c_T$"?
It is often said that modified Gram-Schmidt is more robust with respect to rounding errors than classical Gram-Schmidt, but it is very hard to find a good explanation / example of why this is so. Can anyone provide such an explanation / example.
A toy problem would probably be best to explain it this. Let's say we have 100 people, each with 4 unique types of items (to simplify things, let's say it's the same four types of items for each person). For each of these people, they have a different number of each item type they need. So for person one they have ite...
Can I use QZ decomposition on a single square matrix in Matlab? Like, [Aa,Q,Z]=qz(A);
When a set of model equations, e.g. some coupled differential equations, has solutions that behave in ways similar to real-life phenomena such as blood flow in the heart, a wave movement, or a plate in free fall in some fluid (air or water), why do we call the model equations "a model for blood flow in the heart ...", ...
As a computational scientist, are there limitations to studying dynamical systems — systems of odes in which each state variable evolves with time — compared to studying PDEs? For instance, it seems that modeling blood flow in the heart is done with PDEs, but in some research papers for fluid-structure interactions for...
I have a combinatorial problem regarding the optimal placement of sensors. I want to find the optimal placement of $N$ sensors, given $M$ possible locations, $N < M$. Right now I'm working with values of $N$ and $M$ around 15 and 30, respectively, but ideally, it could be scaled into the thousands. The cost that I want...
Let's say I'm interested in fluid dynamics, specifically in fluid-structure interactions -- and I want to get into modeling, simulations and experiments. I am a mathematics student by training, having taken yearlong courses in introductory analysis, linear algebra, complex variables, and a semester of probability theo...
When you have a mesh, there are many well-known methods to navigate it, as for example using a half-edge data structure, that allows easy circulation around faces and vertices. Are there similar structures/algorithms for kd-trees, that allow you to easily find adjacent and overlapping (half)faces? I am mostly intereste...
Before running a simulation for turbulence (e.g Rayleigh-Benard Convection), how do we check for well-posedness of Navier-Stokes with other equations for a given boundary condition?? Can someone point to any reference to read on this topic??
I am writing a finite element code for my final year project of BS Mechanical Engineering. The geometry is an integration of several parts composed of different materials. I don't have exact values of material properties. However, I do have ranges of them. For example, for Steel1020, Young's modulus varies from 205-215...
I'm trying to use my current GEKKO model with different solvers methodologies. I don't know if I can also use global optimisation solvers as GA, Simulated Annealing o Differential Evolution. I need that, because I cannot use constraints in my model because I cannot develop my constraints with GEKKO functions (log, sqrt...
I'm learning and improving my Python skills. I did a program in Python about Mandelung constant. But, I'm having kind of a problem. The Mangelung constant is calculated using this sum: $$ V_{total} = \sum_{\substack{i,j,k = -L\\ i, j, k \neq 0}}^L V(i,j,k)= \frac e{4\pi\epsilon_0} M $$ Or $$M =\sum_{\substack{i,j,k = -...
I have a sparse matrix stored in CSR format. For this matrix, I would like to get the incomplete LU decomposition. I tried to find algorithms which can utilize the CSR format but I could not find anything. All work, papers, software seem to access the matrix by giving row index and column index like for COO format (A[i...