# All Questions

1 view

### Vector of Lagrangian of QP at solution

I am trying to understand the output of the quadprog R package for quadratic programming. The problem I have is the vector with the Lagragian at the solution (object "Lagrangian" of the output). My ...
31 views

### Correct way of computing norm $L_2$ for a finite difference scheme

I am computing the rate of convergence of my finite difference scheme in norm $L_2$. Which is the correct way to compute it? This: \begin{align} L_2 &= ...
18 views

### What are open source codes for interior point optimization to modify?

I am working on a modified interior point algori thm for semidefinite for my special problem. I don't have enough skills and knowledge about interior point for semidefinite to code it from scratch. ...
41 views

### Why a finite difference scheme would give second order of accuracy in norm L2 but 1.5 with L1 (while 1 with Linf)?

My finite difference scheme for the 2D Euler equations is second order accurate in theory, since all the terms are second order accurate, with the advective terms being third order. So I expect a rate ...
3 views

### CVX constraint set with varying dimensions

Link to Paper: https://mediatum.ub.tum.de/doc/1187583/1187583.pdf I am trying to solve convex optimization problem in CVX (MATLAB) in which the dimensions of constraints are not fixed. Let me try to ...
18 views

### Order of operations, numerical algorithms

I have read that (1) Ill conditioned operations should be performed before well conditioned ones. As an example, one should calculate $xz-yz$ as $(x-y)z$ since subtraction is ill conditioned ...
12 views

### oscillating flow inlet BC

I want to do LES of an oscillating flow i.e. a sinusoidal flow without a mean component in a channel. In order to have a fully developed flow at lower mesh count without using a long channel I want to ...
28 views

### GPU-enabled Lattice Boltzman solvers?

Is anybody aware of any GPU-enabled Lattice Boltzman solvers (preferably on OpenCL and open-source) that he/she would recommend? I have found Advanced Simulation Library, but it seems to be very ...
39 views

### How to keep velocities in check in molecular dynamics simulation?

I am trying to make a very simple molecular dynamics simulator with Reflective Boundary Conditions. I am assigning the initial positions in a cube randomly while making sure they are not too close to ...
6 views

### Plotting two different results in Tecplot together

I want to merge two results together and display them in Tecplot. For example: I have one DAT file which contains temperature of 64 points in each x and y direction and the other contains temperature ...
11 views

### Efficient calculation for L-Kurtosis?

I am doing some statistical signal analysis and was wondering if there are any C/Java packages that do L-moment calculations, specifically L-Kurtosis as I am wanting to do things such as ...
44 views

### How can I make velocity verlet algorithm more stable?

The answer to this question implies that reducing the time step would make it more stable. However I have tried reducing the time step but the system is still unstable(the total energy increases to a ...
18 views

23 views

### Why is MPI/PETSc only showing 1 processor even though it works for helloworld?

I am a beginner with Unix and MPI. For the serial program, I run the program by typing make in /directory/buildagain and then ...
69 views

### How do I correctly multiply vectors and matrices in Python and MATLAB?

I have been trying for 2-3 days now to get L2 regularized logistric regression to work in Matlab (CVX) and Python(CVXPY) but no success. I am fairly new to convex optimization so I am quite ...
47 views

### Mixed Dirichlet-Neumann problem in 2-D [closed]

A 2x2 2-D physical domain (see solid lines in figure below) having Dirichlet (D) boundaries on the left and bottom and Neumann(N) boundaries on the top and right is ...
66 views

### Integration in MATLAB: Complicated integrand

Can I solve the integral given below using Matlab? \frac{C(J)}{C_0} = \frac{2e^J}{\pi}\int\limits_{0}^{\infty} \frac{e^{\frac{\gamma}{2}\left[1 - \sqrt{\rho}\cos(\theta/2)\right]}}{a_1^2 + a_2^2} ...
18 views

### what is numpy way of arranging numpy 2D array based on 2D numpy array of index? [closed]

import numpy as np x = np.array([[1,2 ,3], [9,8,7]]) y = np.array([[2,1 ,0], [1,0,2]]) x[y] Expected output: ...
103 views

### Can an approximated Jacobian with finite differences cause instability in the Newton method?

I have implemented a backward-Euler solver in python 3 (using numpy). For my own convenience and as an exercise, I also wrote a small function that computes a finite difference approximation of the ...