instruction stringlengths 43 28.1k |
|---|
Consider
$$F(\theta)=\sin \theta \int_{-L}^{+L}h(z)e^{-ikz\cos \theta} \,dz$$
$$|z|\le L$$
$$0 \le \theta \le \pi$$
By having knowledge of $F(\theta)$, how can one approximate $h(z)$? In addition, I know that $F$ is differentiable with respect to $\theta$.
How can I model and solve such problem with unknown function $... |
I am running 2 simulations on a cantilever plate in Nastran: one is a transient analysis (time domain) and the other one is a frequency response analysis.
The transient analysis computes the response to time-varying excitations explicitly defined in the time domain. The equation it has to solve is
$M \ddot{u}(t) + C \d... |
I am currently developing a project that uses finite elements for multi-dimensional PDEs and I'm still wondering if I will use P elements (triangles in 2D and tetra in 3D) or Q elements (squares in 2D and cubes in 3D).
From what I have read on the web, the crucial point seems to be meshing which is supposed to be easie... |
In the Nelder-Mead algorithm, the simplex looks for the minimum of the function. If I multiply all the function values times -1, would I trick the simplex into searching for the maximum?
|
I am into computational fluid dynamics and so far I've found that the most common approaches to solve for the governing equations are Eulerian and Lagrangian. The former samples the domain at fixed locations while the latter samples the domain using the particles moving freely across the domain.
Reading through some pd... |
This is a continuation of a problem I asked over at physics exchange and math exchange. Basically I have two ODEs that I am solving in order to calculate the radial and tangential velocity of liquid dispensed on the center of a disk rotating at rate of $\omega$. $u_m$ is the average flow velocity in the $r$-direction,... |
Is there some company providing HPC cluster online? So that I can connect to their cluster by Internet and run my program?
|
I'm trying to reconstruct an image given its Laplacian, which results in a Poisson equation and I'm using Neumann boundary conditions (derivative at boundary = 0).
What I have is the laplacian (f, left-hand side), and the image borders (boundaries).
How can I solve this in Matlab or Octave? I found the poisolv() and a... |
Consider the following system defined on the open interval (-1, 1):
$y_1' = c y_3 \\
y_2' = c y_4 \\
y_3' = -f(y_1, y_2)y_2 \\
y_4' = f(y_1, y_2)y_1 $
given $ y_3(-1) = 0 = y_3(1) \\
y_4(-1) = 1, y_4(1) = -1 $
Note that the system cannot be reduced to the standard form of two point BVP in $y_3,... |
Consider the situation where you want to solve a linear system using a preconditioned Krylov method, but applying the preconditioner itself involves solving an auxiliary system, which is done with another preconditioned Krylov method.
On one extreme, you could run the inner solve to convergence within each step of the... |
I am studying DG for conservation laws from this book.
Local inner product is defined like
$$(u,v)_{D^k} = \int_{D^k} uv dx$$
and the $L^2(D^k)$-norm as
\begin{equation}
(u,u)_{D^k} = ||u||^2_{D^k}
\end{equation}
Now, consider the following problem where the flux $f(u) = au$
$$\frac{\partial u}{\partial t} + \frac{\... |
One very efficient way to solve Stokes equation with periodic boundary conditions
\begin{equation}
-\eta \nabla^{2} \bf{v} + \nabla p = f \\
\nabla \cdot \bf{v} = 0
\end{equation}
is using the transverse projection operator (in Fourier space)
\begin{equation}
\tilde{\bf{v}} = \frac{1}{\eta \bf{k}^2} \left (\bf{I} - \f... |
I need to import in Matlab the results (like time histories of diplacement or frequency response at a specific point) obtained from a FEM analysis in Nastran.
At the moment I ask Nastran to save the results on a file .dat and then I upload this file into Matlab. The fact is that Nastran organizes the data in a way that... |
I want to verify a finite-volume solver (SIMPLE-Algorithm) for the incompressible Navier-Stokes equations by using a manufactured solution. I use Dirichlet boundary conditions for the velocity at all boundaries. The manufactured solution for the velocities I use, is constructed as the curl of a vector field and thereby... |
I've been trying to figure out how to prove that the following equation is conservative
$$\int_{D^k} \partial_t(u^k) v_j^k + \partial_x(f) v_j^k dx = [(f -f^*) v^k_j]_{x^k}^{x^{k+1}}$$
where $v_j^k$ is a test function for element $k$, $f$ is the flux and $f^*$ is the numerical flux.
Can anyone point me out to some refe... |
I am working on a resource allocation problem, which is convex and has several constraints, and I want to compare the computational complexity of the following algorithms.
1) The algorithm that uses iterative subgradient method through dual decomposition: It starts with initial values for dual variables and then, in ea... |
I am trying to do Monte Carlo simulation for a large problem which requires eigensolution of a matrix for each sample. The matrix itself is quite large so much so that I want the eigensolution itself to be parallel as well.
This will probably require dividing the processors in subgroups and then within each group this ... |
$f(x)= \frac{1}{1+x^2}$
and when I computed the interpolating polynomial of 5 equally spaced points in [-5,5] I got
$ p(x)= 0.0053x^4 -0.1711x^2 +1$
Now I need to estimate the error in the interpolant using the error formula.
$|f(x)-p(x)|=\left|\frac{f^{(5)}(\xi)}{(5)!}\prod_{i=0}^4(x-x_i)\right|$
I'm trying to self ... |
I could find the common Moore-Penrose algorithm, but I couldn't find the Drazin or the Bott-Duffin generalised inverse, except for some very specific cases, useless for my studying purposes.
Is there a Matlab or C code for at least one of the two algorithms?
|
We have the Schrodinger eqn
\begin{equation}(−\Delta+V(r))R(r)=E R(r)\end{equation}
where we can take $V(r)=-k/r$ for the beginning and we impose on the reduced radial function $u(r)=r R(r)$ the boundary conditions $u(0)=u(\infty)=0$.
The problem is to:
Solve numerically inwards and outwards the radial equation, and d... |
I have a variational problem where the unknown function is a periodic path $\gamma:[0,1)\to\mathbb{R}^2$, and the functional is
$$ \int_0^1\left( \tfrac12\|\dot\gamma(s)\|^2 + \mathcal{F}[\gamma]\right)\,ds. $$
Here $\mathcal F$ depends on values of $\gamma$ at different values of $s$, so it's not just a function of $\... |
I am trying to solve the Eigenvalue problem
$$
x^2 y''+ x y' + x^2 y = \lambda^2 y\,,\quad x\in(0,1)\,,\quad
y(0)=0\,,\quad
y'(1)=y(1)
$$
The differential equation is the Bessel equation. The solution is given by the Bessel function of the 1st kind $y(x)=J_\lambda(x)$. Bessel functions of the 2nd kind is omitted becaus... |
What method of numerical solving ODEs is better? BDF2 or TR-BDF2?
Namely, what advantages has TR-BDF2 over BDF2?
The BDF2 method requires the values of $y_{n-1}$ and $y_n$ for computing $y_{n+1}$ but we can use, for example, the trapezoidal method for $n = 0$ and BDF2 on next steps.
The TR-BDF2 method computes an auxil... |
I am implementing a finite element solver in MATLAB and I have the following problem. Let's say I have a mesh $\mathcal{T}_1$ with triangular elements on a rectangular domain $\Omega\subset\mathbb{R}^2$. I know the positions of all the nodes on the mesh, and I have an approximate solution $\hat{u}_1(x,y)$ to my PDE on ... |
Is there a reference on the effect of subdomain topology on performance of the overlapping additive Schwarz method for (high order) finite elements? For example, taking subdomains to be vertex patches (elements directly connected through a vertex) differs from taking a subdomain to be an element + all its neighbors co... |
Suppose $f'(x_1),\ f'(x_2),\ f'(x_3)$ are given, how to give a polynomial interpolation $p(x)$ such that $p'(x_1)= f'(x_1),\ p'(x_2)=f'(x_2),\ p'(x_3)=f'(x_3)$? And how to give an error analysis?
|
I'm programming a beam finite element model by following a book (Nonlinear Finite Element Analysis of Solids and Structures Volume 2, in case you're wondering!).
I've come across the following statement, which I've paraphrased slightly (unless mentioned matrices, denoted by $[A]$, are of dimension $3 \times 3$ and vect... |
I tried to go to the primary sources in order to understand how to use Butcher tables to simplify the algebra I need to do when using Taylor series to find the order of accuracy of a scheme, for instance.
However, maybe because of a lack of relevant background, I found it particularly tough to understand how to utilize... |
I don't understand the concept with local and global vec's in petsc when it come to DMDAVecGetArray and VecGetValues. I'm creating some DMDA Vec in parallel which works well. Now I want to access certain non local values of my Vec without receiving the whole global array (will not fit into my main memory) on each proce... |
Let consider the following Hermitian matrix
T =[ 1.0000 -0.1000 - 0.0600i 0.3000 - 0.0300i
-0.1000 + 0.0600i 1.0000 -0.0400 + 0.0800i
0.3000 + 0.0300i -0.0400 - 0.0800i 1.5000 ]
The SVD decomposition using matlab is
[U,S,V] = svd(T)
U =
-0.4311 + 0.0000i 0.3... |
I got confused when trying to implement a scheme using Lax-Friedrichs numerical flux for a system of equations in 1D.
According to my notes Lax-Friedrichs numerical flux is
$$f_{LF}(u_l,u_r) = \frac{1}{2}[f(u_l)+f(u_r)] - \frac{\alpha}{2}(u_r-u_l)$$
where $\alpha$ is chosen as the fastest speed in the system. The formu... |
I have an irregular grid of points describing this surface (a large subduction fault in South America). The color is depth. Anyway I have 3D coordinates (lon,lat,depth) at irregular intervals. I'm trying to generate a triangular mesh using gmsh but I'm struggling with how. I can make every irregular grid point be a "Po... |
I am trying to solve this problem using advection-diffusion model and finite element method for the solution, due to the complex geometry.
Basically the problem i'm trying to solve using OpenFOAM is see how heat is distributed when fan is placed on a heated power source, and how much speed or how many fans should be pl... |
Could you help me with a Conjugate Gradient question? In using CG to solve Ax=b, why is the search direction $p_{k+1}$ in CG chosen as a linear combination of the residual $r_k$ and previous direction $p_k$? I know the set of search directions are supposed to be conjugate with respect to A. One way to generate such set... |
Good Day
I am new to heat transfer technique please give me some suggestion on solving energy balance equation
$$a \frac{\partial T_p}{\partial t}=\frac{\partial}{\partial x}\left(b\frac{\partial T_p}{\partial x}\right)+\frac{\partial}{\partial z}\left(c\frac{\partial T_p}{\partial z}\right)+b$$
which is discretized a... |
I am using octave and observed a problem with the eigs-routine for non symmetric matrices. Using GNU octave version 3.8.1 the code below gives significant difference of eigenvalues although same commands are executed. The difference of eigenvalues is computed by subracting the eig- and eigs-eigenvalues.
% solves the Ei... |
I have this problem:
\begin{align}
\min_{\mathbf{w}} & \sum_{i=1}^N c_i P_i(w_i)\\
s.t & \notag\\
& \sum_{i =1 }^N w_i = w \\
& 0 \leq w_i \leq w_{max},~~\forall i \in 1, ..., N
\end{align}
where $P_i(w)$ is a piecewise linear convex function. Is there a closed formula to solve this? If not, what is the most relevan... |
Doing research project in material involving (mixed integer nonlinear programming) MINLP problem, we want to implement MINLP based on C++, because the majority of our project is based on C++. What would be our option?
We noted that GAMS is a good modeling system, but it requires (is it true?) us to abandon a major part... |
I tried to compute analitically the stiffness of a cantilever thin plate (shown in picture). The plate is also homogeneous and isotropic. The aim is to compare the result I obtain with the result I get when running the FEM analysis.
$a = 0.127; b = 0.0508; h = 0.0012; E = 7*10^{10}; \nu = 0.3$
This is my theoretical ... |
I have the quadratic programming problem in $x$
$$\text{Minimize}\;\; x^T\Sigma x$$
$$\hspace{15mm}\text{Subject to}\;\; p^Tx = \frac{1}{n}p^T\boldsymbol{1}$$
$$\hspace{25mm}\boldsymbol{1}^Tx=1$$
where $\Sigma$ is positive semidefinite. I can convert this to an epigraph problem
$$\text{Minimize}\;\; t$$
$$\hspace{16mm}... |
I'm looking for a way to compute the coordinates of the intersection of two lines.
Each lines are defined with a point and a normal vector.
We can assume than the normal vectors are not zero and that the lines are not parallel (this has been easily checked by computing the scaral product of u and v), so this intersect... |
I have a set of left and right eigenvectors from an nonsymmetric eigenproblem, and I'd like to biorthogonalize them.
I tried Gram-Schmidt, but this fails for most cases.
I then read that the SVD is the best way to get an orthonormal basis for a matrix, where U would be my basis.
How can I extend the SVD to the case of... |
I have a system of non-linear DAE and I noticed that the system does not converge if some of the equations are not differentiated. For example, if the control volume equation is represented as this:
$V_{total} = V_1 + V_2$
The solver won't convege.
However if I differentiate the equation like this:
$ 0 = m_1(\partial ... |
I am trying to implement a FEM solver for the following initial value problem
\begin{align}
\frac{\partial u}{\partial t} - \nabla^2 u &= f\quad \text{ in } \Omega\times (0,T)\\
u &= g\quad \text{ on }\partial\Omega\times(0,T)\\
u(x,y,0) &= u_0(x,y)
\end{align}
where $\Omega\subset\mathbb{R}^2$ is just a rectangular do... |
I want to solve a family of MILP problems (indexed by $k \geq 0$) of the following type:
$$
\begin{align}
\max \; c^Tx \;\; s.t. \\
Ax \leq b \\
d^Tx \leq k
\end{align}
$$
In other words, the problems are the same with the exception of the additional constraint $d^Tx \leq k$. In particular, I want to solve this problem... |
I have a set of independent meshes whose results I would like to project onto another non-hierachally related mesh. Until now, I've been accomplishing this by finding the nearest-distance node in the input meshes (by minimizing the $L_2$ error) and assigning its values to the target mesh. This seems to be the most ofte... |
I need to solve this integral:
$M = \rho h \int_0^a \int_0^b N^2 \ dx dy$
where $N$ is defined as:
$N = sin\left(\dfrac{\pi}{4}\eta +\dfrac{3\pi}{4}\right)sin\left(\dfrac{\pi}{4}\eta +\dfrac{3\pi}{4}\right)sin\left(\dfrac{\pi}{4}\psi +\dfrac{3\pi}{4}\right)sin\left(\dfrac{\pi}{4}\psi +\dfrac{3\pi}{4}\right)$
where $\et... |
From the order condition $$\sigma(w)=\frac{\rho(w)}{\ln w}+O(|w-1|^p)$$
I get
$$\sigma(w)=1+\frac{3}{2}(w-1)+\frac{5}{12}(w-1)^2=-\frac{1}{12}+\frac{2}{3}w+\frac{5}{12}w^2$$
Those coefficients are for Adams-Moulton method
$$y_{n+2}=y_{n+1}+h(\frac{5}{12}f(t_{n+2},y_{n+2})+\frac{2}{3}f(t_{n+1},y_{n+1})-\frac{1}{12}f(t_... |
According to Beatson and Greengard's short course on FMM:
( Eq. 5.15 & 5.16 setting k=1, q=1 )
We can approximate a potential $\phi = 1/(r-R)$ using:
$$ {1\over |\vec{r}-\vec{R}|} = \sum_{n=0}^{\infty}{r^n\over R^{n+1}} {4\pi\over(2n+1)}
\sum_{m=-n}^{n} Y_n^{-m}(\theta, \phi) Y_l^m(\theta', \phi') $$
I tried this... |
Any hints on how to simplify the following double sum to be able to find the sum at least numerically?
$$\sum_{n=2}^{\infty}\frac1{n(n^2-1)} \sum_{k=1}^\infty \frac{(k-1/n)^{2n-2}}{(k+1/n)^{2n+2}}$$
Series comes from quantum mechanics (2nd order perturbation theory).
|
I am trying to simulate the phase separation of a binary mixture. If the free energy F is known as a function of the concentration $c$, the dynamical equation is:
$
\frac{\partial c(x,t)}{\partial t}=\frac{d^2}{dx^2} \frac{\delta F[c]}{\delta c}
$
For the Flory-Huggins free energy we have:
$
\frac{\delta F[c]}{\delta c... |
I am a little confused about where does the mass and stiff matrix come from. In Discontinuous Galerkin we divide the domain in elements, $\Omega = \cup^K_{k=1} D^k$. Then assume the solution $u$ can be locally approximated by a polynomial as
$$u_h=\sum_{i=1}^{Np}\hat u_i^k \Phi_i$$
We then introduce the approximated so... |
Is there any algorithm to determine the minimum number of multiplication(division) of a specific expression? and the optimal expression form for implementation?
For example, given values of $\cos\alpha, \sin\alpha$, $\cos\beta, \sin\beta$ and $\cos\theta,\sin\theta$, what is the minimum number of multiplication in orde... |
I am trying to solve for the eigenfunctions of a (1D) differential operator using finite differences:
$$A \, f(x) = \lambda f(x)$$
Here is an example in Python where $A = \partial_x^4$:
import numpy as np
import matplotlib.pyplot as plt
from scipy.sparse import spdiags
from scipy import linalg
def derivative_matrix(n... |
In a program I'm writing, I have a sub-routine that does some vectorized linear operations (specifically differentiation). Say for convenience I have defined the following inline function, which approximates a partial derivative from a 3D array:
$$
F = @(X)(X(3:\text{end},:,:)-X(1:\text{end}-2,:,:))/(2h)
$$
This is a... |
What is the best way to get a visual appealing plot of a singular vector field (if you want to visualize also the field strength). As an example I am playing with the electric fields of two point charges as in the following example:
from pylab import *
from scipy.integrate import odeint
from matplotlib import animatio... |
I know how to compute the discrete Laplacian of a graph and of a mesh (the Laplace-Beltrami operator). Is there an analogous definition for the computation of the Laplacian of a parametric curve ?
For instance the Laplacian matrix of a graph is defined as $L=D−A$ where $D$ is the diagonal degree matrix and $A$ is the a... |
I need to calculate a determinant consisting of vectors, using the Kronecker product as product. As an example I would need to be able to calculate:
$\left| \begin{array}{cc}
\left(\begin{array}{c}1\\0\end{array}\right) & 0 \\
0 & \left(\begin{array}{c}0\\1\end{array}\right) \end{array} \right|=\left(\begin{array}{c}0\... |
As you know, the multi-objective optimization methods are developing so fast, i.e.,epsilon constraints. I have a problem that I want to apply the most recent MOOP method for it.
Please tell me the recent methods for solving multi-objective optimisation(MOOP).
Thanks you.
|
As of 2015, what shared memory parallel computing solutions are available?
What are the advantages and disadvantages of each for various use cases arising in high performance scientific computing?
I am primarily interested in things that work with C or C++, similar to OpenMP or Threading Building Blocks; or perhaps oth... |
I am looking at a heat initial value problem
\begin{align}
\frac{\partial u}{\partial t}-\nabla^2u = f\quad&\text{in}\quad \Omega\times(0,T)\\
u = g \quad&\text{on}\quad \partial\Omega\times(0,T)\\
u = u_0\quad&\text{in}\quad \Omega\times\{0\}
\end{align}
which I have succesfully solved with the finite element method a... |
In the following problem, $A$ is a given $\mathbb{R}^{m\times n}$ matrix:
\begin{align}
\mbox{minimize}\quad & x^TAy \\
\mbox{subject to}\quad & 1^Tx=1^Ty=1, \\
& x\ge 0,y\ge 0.
\end{align}
Despite the simple formulation, it is not easy at all for me. Hope that somebody can help. Many thanks!
|
I already successfully verified my solver (SIMPLE-type FVM-method) with the following manufactured solution (3d Taylor-Green vortex) on the solution domain $[-1,1]^3$ with Dirichlet boundary conditions:
$$
\begin{align*}
u &= \frac{1}{2}\sin\left(\pi x\right)\cos\left(\pi y\right)\cos\left(\pi z\right) \\[0.5em]
v &= \... |
I am trying to implement SPH using the directions shown in this paper.
The density needs to be updated using the formula
$$
\rho(\mathbf{x}_i)=\sum_j m_jW_\text{default}(\mathbf{x}_i-\mathbf{x}_j,h)
$$
The smoothing kernel is
$$
W_\text{default}(\mathbf{r},h)=\frac{315}{64\pi h^9}\cases{(h^2-||\mathbf{r}||^2)^3,\quad 0... |
The other day I had a discussion with a friend about the GAMS solvers and we were wondering what are the mathematical differences between the solvers. Which one to use for which kind of problem? How to know which solvers to use and what happens if the "wrong" solver is selected?
|
I have a curve in the complex plane given by
$$ f(t) = \sum_k r_k\exp(2\pi\mathrm{i}(t+\varphi_k)p_k). $$
Some of the parameters are specially chosen: $r_k>0$, $\sum_k r_k=1$, $p_k\in\mathbb{Z}$, $\mathrm{gcd}(p\ldots)=1$, $\varphi_k\in\mathbb{R}$. These restrictions are probably not very important for this question.
W... |
I have to solve an ill-conditioned sparse matrix. Once I read that iterative solvers are the better tool for such problems. Is that true? If yes, why?
|
I would greatly appreciate some help/references on solving the following problem:
You are in charge of searching through a n-dimensional hyper-cube $[0,1]^n$ to make sure that it does not contain any defects. (To be precise, suppose we are given a black-box, Boolean function $D:[0,1]^n \to \{ 0,1\}$. A point $p \in [... |
I have a medical physics problem - I want to maximise the dose absorbed by a brain tumour whilst minimising the dose in the rest of the brain, especially certain organs, such as the pituitary gland, optic nerves and cochlea (organs at risk, OAR).
The dose is delivered by syringes which have 3 different entry points, p... |
Given the generalized linear-fractional program:
$$\text{Minimize}\;\; \max_{i}\Big|\frac{c_i^Tx+d_i}{e_i^Tx+f_i}\Big|$$
$$\hspace{-5mm}\text{Subject to}\;\; e_i^Tx+f_i>0$$
I convert this into the form:
$$\text{Minimize}\;\; t$$
$$\hspace{26mm}\text{Subject to}\;\; 0\leq c_i^Ty_i+d_iz_i\leq t$$
$$\hspace{37mm}e_i^Ty+f_... |
I have a homework problem that asks me to show that 1st order unwinding or central differencing can give a strongly conservative, consistent scheme for the 1-D Burger's Equation using a finite volume approach. I think I understand unwinding schemes and central differencing, but I'm not sure what "strongly conservative ... |
I would like to simulate a 2D classical spin system, whose interactions are only nearest neighbor, using Monte Carlo. I would like to use Metropolis for updating. I have seen that when updating one can choose a lattice site at random, or update sequentially. I was wondering if it is possible to update part of the la... |
I need to find roots for the following function:
$$f(\theta) \equiv E[R(\theta;\eta)]=0$$
for some unknown $\theta$ which is deterministic, while the expectation is taken over a normally distributed random variable $\eta$.
Consider for example that $R(\theta;\eta) = (x+\theta(k+\eta))^{-\gamma} (k+\eta)$, where $x,k$... |
I want to calculate the geometric series of a matrix $A$:
$$S=I+A+A^2+\dots+A^n$$
and then apply to a vector $v$, $Sv$.
I've done it in Matlab with a loop and I think it's quite efficient applying the matrix $A$ to $v$ at each step instead of calculating $S$ first.
Anyway, I tried to compute the series using $S=(I-A^n)... |
I want to find the argument of a function for which it is minimal. The function is expected to be convex but I cannot evaluate it exactly so I have to deal with the fact that there's noise on top. The noise is purely statistical and I roughly know its magnitude. Essentially, I run a Monte Carlo simulation for each eval... |
I need to install Python to do some undergraduate level computational physics (course, not research). What library do I need? Scipy only?
|
Although I already did some work in the intersection of theory and simulation I'm still very new to this field and I need some guidance. If anybody can give some recommendations for introductory literature about computational science and how to plan scientific software I appreciate it. Below are some more concrete ques... |
I have a fitting routine set up. It works, but pretty slow. I was wondering if there is a better method to use. I checked my (forward) code against some literature data and at least I do have no bugs and mistakes in my problem.
I fit the steric mass action model to some some isotherms like the ones shown below.
Addit... |
I'm trying to write a Python code that is a numerical solver for 1-d heat conduction (using FVM) with a temperature dependent thermal conductivity.
The solver has three functions I need to iterate until convergence. This is basically the algorithm from Patankar's Numerical Heat Transfer and Fluid Flow book.
Conductiv... |
I am trying to create an animation of a 3d vector field in ParaView.
All my data is in three matrices (201 x 201 x 201) corresponding to vectors components in x,y,z directions. And it's calculated in MATLAB.
If I do:
B = cat(4,Bx,By,Bz);
B = permute(B,[4 1 2 3]);
fid = fopen('Bvec.raw','w'); fwrite(fid,B,'float'); fcl... |
The following image represents the phase of a wavefunction (in radians) on a square lattice, where $m$ and $n$ label the lattice sites. Computationally speaking, it is the density plot of a 41x41 real matrix.
My question is, how can I numerically compute the total change in phase as one goes around a closed loop cente... |
I'm looking for advice, or references, for a change of basis to my dependent variables that leads to a less computationally expensive scheme when solving a system of coupled polynomial equations. Below is an explanation of the problem, which will be somewhat involved.
The general idea is this. I have a system of equat... |
What is the difference (in terms of e.g robustness and speed) between proving a gradient obtained by an AD package (like PyAutoDiff) and let the solver (e.g BSGS) calculate the gradient ? It seems so tempting to do something like:
from autodiff import gradient
def my_costfun(x):
return f(x)
@gradient
def g(x)... |
My apologies if the question is simple. I need to write a code for straightening algorithm. Which includes defining bracket algebra. I tried to write it in CoCoA-5, but it wasn't possible because CoCoA-5 does not accept brackets like [1,4,6,8] as ring's indeterminates. I did some Googleing and got more confused.
Can an... |
When I use PETSc to solve my linear systems, I always use the subroutine
PetscErrorCode KSPSetOperators(KSP ksp,Mat Amat,Mat Pmat)
where Amat refers to the matrix that defines my linear system and Pmat is the Matrix used in constructing the preconditioner.
I am not sure in which scenarios it would be advisable to use... |
I am trying to integrate a 2nd order ODE with a singularity at close to the initial condition.
Why do I get large residuals when I plug-in the result of my integration back into the ODE?
The equation is Newcomb's Euler-Lagrange equation from the field of plasma physics.
$$\frac{d}{dr}(f \frac{d\xi}{dr}) - g \xi = 0$$
o... |
It's a fairly well known trick to avoid division in calculating square-roots to apply Newton's method to finding $1/\sqrt{x}$, and probably better known, using Newton's method to find reciprocals without division.
In rescuing a StackOverflow thread Seeding the Newton iteration for cube root efficiently from link rot, t... |
So I have a symmetric matrix $A$ and I would like to solve the optimization problem,
$$\hspace{2.5mm}\text{Minimize}\;\; \|A-S\|_2$$
$$\hspace{-5mm}\text{Subject to}\;\; S\geq0.$$
$A$ is given and $S$ is the variable.
I can put this straight into my solver (SCSSolver in Convex.jl) but it's too slow for my matrix size (... |
Are there finite element method setups that provide error estimates in the $W^{1,\infty}$ norm (i.e., bounds on $\|u'_h - u'\|_\infty$)? Which families of elements can be used for implementing them?
(Crossposted from MathOverflow, where it encountered little interest, but probably here I can find more people with a FEM... |
Basically, I failed to trying to implement individual global MINLP solvers (alphaBB, ANTIGONE, BARON, Couenne, LindoAPI, and SCIP) in C++/Xcode/Mac system. On the other hand, I realize that GAMS already integrate a lot of solvers. So I am thinking of using C++/Xcode/Mac system to construct models and let GAMS solve tha... |
How can we determine the numerical dispersion relation of a Spectral Element Method which leads to coupled systems of algebraic equations?
What approaches to do analysis of dispersion relations is available?
|
I am using Arpack to compute the eigenvalues of the problem $\lambda Mx = Ax$ with reverse shift method with complex shift. $A$ and $M$ are real, $M$ is symmetric. Then, I use znaupd e zneupd. I use superLU to solve the system. Everything seems to be ok. I wrote a function that takes the eigenvalues and the eigenvector... |
The results found are as under
how do we find the exact solution ref The finite element method using matlab by Kwon and Bang.Page no 280-281 Example no 8.10.1.
|
Density has units of $kg/m^3$. In simulations often scaling is done to deal with non-dimensional values, so the physical density is converted to the non-dimensional density so that it can be used in simulations. How is this done in 2D simulations? One may need to assign a value of mass to certain area.
|
TASK:
Make a simple animation of an object shot from a catapult. Object is moving through a medium. The problem must be solved in MAPLE.
NARROWING OF THE PROBLEM:
2D problem
consider atmospheric density to be constant
for calculations use Newton's term of the aerodynamics resistance
animation: simple point following... |
I have to solve numerically the following initial value problem, which physical origin is discussed in this article by G.I. Taylor (1941). Here $\eta$ is the independent variable and ranges beetween $0$ and $1$, $\gamma$ is fixed and $=1.4$ in my simulation:
$$f'=\dfrac{f[-3\eta + (3+\gamma/2)\phi - 2\gamma \dfrac{\ph... |
As you know, a generic Multiobjective optimization problem can be stated as follows:
$min{\space}F(\bf{X})=[f_1(x),...,f_n(x)]$
$h_k(x)=0{\space\space\space} k=1,...,n_e$
$g_i(x)\leq0{\space\space\space} i=1,...,n$
where $\bf{X}=[x_1, x_2, ... ,x_j]$
definitions :
Objective Space is a vector space including objectiv... |
I have a little computational geometry project I'm struggling with for a non-commercial "art" installation. It is driving me crazy and I'd happily pay for an implementable algorithm/solution (apologies if Stack Exchange doesn't allow this - I looked but didn't find any restriction on offering a cash bounty).
Given a s... |
I have created a large positive definite (thus symmetric) matrix in Matlab. For sake of simplicity, let's assume that the matrix has the following form:
$K= \left[ \begin{array}{ccc} k_{11} & \cdots & k_{1n} \\ \vdots & \ddots & \vdots \\
k_{n1} & \cdots & k_{nn}\end{array} \right]$.
Now I want to raise it to a power ... |
I am trying to minimize the edge lengths of a polygon while keeping the angles the same. I can achieve this geometrically (iteratively), however, I am looking for some related papers that can solve the problem algebraically.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.