All Questions

1
vote
0answers
2 views

Randomized Submatrix of a Sparse Matrix

I have a sparse square matrix $A$ with size $n \times n$ and number of nonzero entries $nnz$. The goal is making a sub-matrix $B$ with $s$ nonzeros which are randomly chosen from $A$. Duplicates are ...
0
votes
0answers
9 views

Has there been a comparison bewteen SIMPLE/SIMPLER and JFNK for steady CFD?

I'm looking for a comparison between the Jacobian-Free Newton-Krylov (JFNK) method performance compared to the conventional CFD nonlinear solution methodologies like SIMPLE. Does anyone know if such ...
0
votes
0answers
9 views

Simple Scanner Mistake [on hold]

package com; import java.util.Scanner; class Good { public Good() { ...
0
votes
0answers
19 views

Cannot obtain numerical solution to integral in Matlab

I have been trying to get Matlab to solve the following integral for a while (just to be clear when I say "solve" I mean "spit out a number"): ...
1
vote
2answers
29 views

Access optimized data structure for representing integer lattice

Consider the integer lattice in $2d$, namely the set $\mathbb{Z}^2 = \{(x,y): x,y\in \mathbb{Z}\}$, and let $u:\mathbb{Z}^2 \to \mathbb{R} $ be a function defined on some bounded subset of $\mathbb{Z}^...
0
votes
0answers
17 views

Simple FEA truss example help

I'm trying to find the global stiffness matrix for the truss example in the picture given, but I'm a bit confused. I know the matrix should be 8x8, but I don't understand how. My understanding is ...
0
votes
0answers
23 views

How to compare two sets of exponential data

I have two sets of exponential data (temperature measurements) of the form T(t)=$-e^{-kt}$. k is a constant that determines the rate of temperature change. 1 temperature measurement was taken every 10 ...
4
votes
2answers
66 views

Fast and Numerically Stable Pairwise Distance Algorithms

I'm looking for resources on fast, numerically stable pairwise euclidean distance algorithms. In particular, suppose $A \in \mathbb{R}^{M \times D}$ and $B \in \mathbb{R}^{N \times D}$ are two sets of ...
2
votes
1answer
58 views

Inverting small matrices: canned factorization versus explicit formula

I am interested in solving a large number of small linear systems of equations, $Ax=b$, with $A$ either $2\times2$ or $3\times3$. Assuming none of these systems are actually singular, is there ...
0
votes
0answers
37 views

Staggered grids applied to the Hyperbolic PDE

Let the PDE be defined as \begin{align} & \begin{cases} u_t = v_x \\ v_t = u_x \end{cases}\; \; -1 \lt x \lt 1, t \ge 0 \\ & u(-1,t) = u(1,t) = 0 \end{align} Initial conditions for $u$ and $...
7
votes
2answers
92 views

Integer operations vs floating point operations

I have been working with an algorithm, which uses additions of floating point vectors, (sparse matrix of floats)x(dense vector of floats) dot products I recently found out that I can get the same ...
3
votes
0answers
59 views

$L^2$ norm error estimates of conforming FEM about Poisson’s equation with mixed boundary conditions

Consider Poisson’s equation $$- \Delta u = f{\rm\qquad{ in }}\;\Omega $$ with following mixed boundary cconditions $$u = g{\rm\qquad{ on }}\;\Gamma \subset \partial \Omega $$ $$\frac{{\...
0
votes
0answers
28 views

Fourier Curve Fitting [on hold]

I understand what the matrix looks like for the coefficients of A1 and B1. Can someone fill in the entries in the matrix for the additional coefficients (a2, b2) etc., if I want to include more terms ...
1
vote
1answer
117 views

Solving linear system with matrix multiplication

When solving a linear system $Ax=b$ where $A=B^TCB$ do I need to form $A$ explicitly by two matrix-matrix multiplications or is there another more simple way? $C$ is a NxN matrix and not always ...
4
votes
1answer
120 views

Do I really need to invert this matrix

I need to calculate a matrix $A$ (at least some elements of it, see below) as defined by the following equation $$ A=B(\mathbb{1}-B)^{-1} $$ where B is a square matrix of dimension $N$ and $\mathbb{...
3
votes
1answer
66 views

Derivatives of Approximate Matrix inverses

I am cross posting this question to the mathermatics stack exchange. please find it either at this link, https://math.stackexchange.com/q/2952989/430980, or below: I have a question concerning the ...
-2
votes
0answers
29 views

Constraint Propagation?

can someone explain to me what is meant by constraint propagation in simple words? I am studying the optimization theory on optimal power flow where I have encountered this terminology but I am unable ...
1
vote
0answers
30 views

MKL/FFTW performance of batch 1-D FFTs

MKL and FFTW offer 1-D FFTs that can operate on many inputs simultaneously - in other words, they can batch-transform the columns of some input matrix. Is the performance of these multi-transforms ...
0
votes
0answers
44 views

Order of a principal term

In Yurii Nesterov's Introductory Lectures on Convex Optimization, there is a bound for the total number of iterations for some process. See page 109: $$\left[\frac{1}{\ln(2(1-\kappa))} \ln\frac{t_0-t^...
0
votes
1answer
58 views

SciPy 3d plotting Integral of $\int x^y dx$ for $y$ in $[-4,4]$

Ideally, I would like to get the symbolic/algebraic integral of the function and plot the resulting surface in 3d. I am not sufficiently versed in SciPy to know if this is even really possible.
2
votes
0answers
56 views

Efects from the boundary in advection equation [duplicate]

I am implementing the advection equation $u_x+(1/c)u_t=0$ following a Crank-Nicholson finite difference scheme. The equation for this is \begin{eqnarray*} -\frac{\gamma}{4} w_{n-3 j+1} + w_{n-2 j+1} ...
1
vote
0answers
24 views

Logging vs outputs in iterative optimisation

I'm coding an iterative algorithm of constrained continuous optimisation. An augmented Lagrangian algorithm (outer) calls a bound-constrained L-BFGS-B algorithm (inner), which calls a line search ...
0
votes
0answers
12 views

DataSet merges with another DataSet in c# with MySql 5.7 [closed]

Howe to DataSet/DataTable merges with another DataSet/DataTable in c# with MySql 5.7.2.So other DataSet joins the ende of the first DataSet, not the top
3
votes
3answers
140 views

Derive the formula for eigenvalues

If $A$ has eigenvalue $\lambda_A$ $$B = I - c\frac{I-rA}{I-\bar{r}A}$$ How to derive the eigenvalue $\lambda_B$? $$\lambda_B=1-c\frac{1-r\lambda_A}{1-\bar{r}\lambda_A}$$ where $c, r, \bar{r}$ are ...
1
vote
0answers
72 views

How to solve an implicit ODE with forward Euler?

Consider the implicit ODE $$ M(y)\dot{y} = F(t,y) $$ If $M$ is non-singular for all $y$ How to use the forward-Euler method to numerically solve for $y$ without inverting $M(y)$? I only came out ...
0
votes
0answers
28 views

What is the difference between Abaqus and Calculix contact input?

I would like to say first that am new at using Calculix. I'm using Abaqus/CAE to create a cup deep drawing simulation and everything worked perfectly but my objective is to run the same exact ...
3
votes
0answers
46 views

Nonlinear functional optimization in radial coordinates

I am currently implementing classical density functional theory for a radially symmetric system. In mathematical terms, I am searching for a function $f(r)$ that minimizes a functional $\Omega[f]$. ...
0
votes
0answers
56 views

Vieta’s exact solution for the three roots of the general cubic polynomial [closed]

I need help writing a code in Matlab to solve cubic equations using Vieta's... Very new to programming, so this is what I have so far: By means of a translation and rescaling, the general cubic can ...
2
votes
1answer
52 views

PML boundary conditions

I set up two one-way wave equations for constant velocity $c$ in one-dimension. When I implement them I get a highly unstable (divergent) solution. I wonder if someone could give me a suggestion about ...
0
votes
0answers
16 views

rhoCentralFoam shockTube - is there any thorough documentation?

I am new with OpenFOAM, and I will have to modify ShockTube tutorial of OpenFOAM rhoCentralFoam solver. Where can I find the information about this tutorial? Searching in Google has only led me to ...
0
votes
1answer
63 views

Penalization parameter for DG with jump penalization

I adapted this FEniCS code for my problem and I'm wondering if there is any good resource about how to choose the penalty parameter $\alpha$? Best case would be, if I can define it through some ...
0
votes
0answers
26 views

How to load several arrays from .txt and plot points with specifications?

I need to load data from a .txt file (<3KB) in Matlab. The structure of the data is as follows: s_0.4 2.00869311294470 1.90140098201689 4.00117387799144 2.73028990891229 ... ...
0
votes
0answers
48 views

Solid mechanics codes mostly use Dirichlet and traction BCs - why?

In a lot of the computational solid mechanics papers that I've come across, boundary conditions are typically implemented as a traction boundary condition or a Dirichlet boundary condition. But in ...
0
votes
0answers
47 views

Wrapped BVP with an unknown boundary for fluid modeling

I have a model about a fluid being extruded on a moving bed as in the 3D printing process. The model is a boundary-value problem where the right boundary is the point where the fluid attaches to the ...
5
votes
0answers
129 views

Imbalance of variables in Mixing Newton's method and Linear solver for a Non-linear system

Problem Solving a non-linear system of equations. The number of variables is the same as the number of equations. When I fix a set of variables (say $\vec{y}$) and keep another set free (say $\vec{...
0
votes
1answer
26 views

Converting ROOT Tree to HDF5

I have a TTree in ROOT with 1000 events and 15 variables associated to each of them. I would like to convert this in its entirety to an hdf5 dataset. How do I organise my data in HDF5 Groups such that ...
2
votes
0answers
68 views

How to numerically optimize affine transformations?

I need to optimize affine transformations for of a set of triangles using energy function based on the connectivity. The energy of an edge $e_j$ between triangles $T_a, T_b$ is given by $$ E_j = \...
2
votes
1answer
67 views

Stability Analysis

The partial differential equation, \begin{align} \dfrac{\partial f}{\partial x} + a(x)\dfrac{\partial f}{\partial y} = 0 \qquad & f(0,y) = f(L_1,y) = c_0e^{-y} \\ & f(x,0) = c_0 \;,\; f(x,L_2) ...
1
vote
1answer
50 views

Pivoting in Block LU

What are common methods to choose pivot blocks in Block LU (for non-SPD/non-Diagonally Dominant Matrices)?
1
vote
1answer
65 views

Splittable and non-splittable flows in the network flow problem

I am working on a multi-commodity flow problem where for a graph $G=(V, E)$, some flows are permitted to be split and some flows should strictly follow one path. I have formulated this problem as ...
5
votes
3answers
95 views

Finite difference for 1D wave equation: why the spike initial data results in a noisy output?

I am using a second-order finite difference in space and time approximation for the 1D wave equation. No source but initial data: $I(x)=\mathrm{e}^{-400 (x-0.5)^2}$. Velocity $c=1$, $nx=501$, $nt=...
1
vote
1answer
50 views

Elliptic equation with finite volume and unstructured high order geometry

I have found that in unstructured mesh, discretizing the laplacian operator with finite volumes requires special care, as given in An Introduction to Computational Fluid Dynamics: The Finite Volume ...
0
votes
1answer
48 views

Purpose of compatibility equations in linear elasticity

I have a vague understanding of the compatibility equations for linear elasticity. They appear to be necessary in obtaining a unique displacement field. However, why is it that, in my papers I've come ...
2
votes
1answer
72 views

Term for the typical “linear in the larger dimension, quadratic in the smaller” cost for linear algebra

Many dense linear algebra decompositions (QR, SVD...) on an $m\times n$ matrix have cost $$ O(\max(m,n)\min(m,n)^2) $$ when implemented in practice on a computer. Is there a colloquial name or a more ...
5
votes
0answers
133 views

Solving a coupled eigen value problem

I have the following problem: $$\begin{bmatrix}A &B \\C& D\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix} = \begin{bmatrix}\lambda I_m & 0 \\ 0& \mu I_n\end{bmatrix}\begin{bmatrix}x \\y\...
0
votes
0answers
22 views

conditioning of complex objective function via change of coordinates

I want to minimize a function $f(z) = z^H A z + c_1^T \theta + c_2^T \log(r)$ where $z = r e^{i\theta}$, $z\in \mathbb{C}^n$, $A \in \mathbb{R}^{n\times n}$ is symmetric positive definite, and $c_1, ...
0
votes
2answers
69 views

Taylor-Hood finite hexahedral elements, pressure diverging

I am developing a FEM fluid solver using the Taylor-Hood algorithm, i.e. quadratic interpolation for velocity, and linear for pressure. I have developed the code for 2-D quadrilaterals and triangles, ...
2
votes
0answers
126 views

What algorithm does (did?) Excel use for Bessel functions that is discontinuous at x=8?

Writing this comment reminded me of something I noticed years ago about evaluating Bessel functions of the first kind $J_n(x)$ in Excel. (BESSELJ) I don't use Excel now but at the time I'd checked ...
2
votes
3answers
118 views

How well do explicit Runge-Kutta “tableau” methods compare to the state of the art ODE solvers and when do they fail?

How well do explicit Runge-Kutta "tableau" methods compare to the state of the art ODE solvers and when do they fail? I've been reading Butcher's ODE book and he does a good job at introducing ...
1
vote
0answers
58 views

finding null space to a complex matrix

I need to solve the following equation: $$ \begin{pmatrix} \frac{\omega^2}{c^2}\varepsilon_x-\mu_z^{-1}k_y^2-\mu_y^{-1}k_z^2 & \mu_z^{-1}k_xk_y & \mu_y^{-1}k_xk_z\\ \mu_z^{-1}k_xk_y &\...

15 30 50 per page