0
votes
0answers
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 ...
0
votes
1answer
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 &= ...
0
votes
1answer
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. ...
0
votes
1answer
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 ...
0
votes
0answers
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 ...
2
votes
0answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
1
vote
0answers
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 ...
1
vote
1answer
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 ...
1
vote
0answers
18 views

Integro-differential eigenvalue problem, COMSOL

In my research I encounter an eigenvalue integro-differential equation of the form: $$f_n(x,y)=\lambda_n\iint_D\frac{\nabla'\cdot\big\lbrace ...
3
votes
2answers
83 views

Solution to the optimization problem in “Blessing of Dimensionality High … the face verification”

I am reading the work "Blessing of Dimensionality High dimensional feature and its efficient compression for the face verification" CVPR 2013. One of the key contributes is the authors propose a new ...
2
votes
0answers
35 views

Selecting a Finite Element discretization for subsurface flows

Are there guidelines to follow in selecting the right FE discretization. Specifically, for subsurface flow models like Darcy's equation (both single and multi-phase), Richard's equation, etc. I know ...
1
vote
1answer
18 views

Approach to determining most likely integer factors of a noisy measurement?

I have a quantity which is estimated from a number of noisy measurements. I know that the real underlying value must be some integer multiple of two quantities, e.g. $M = I_1C_1 + I_2C_2$ where $C_1$ ...
8
votes
2answers
65 views

How can I numerically solve an ODE to $N$ provably correct digits?

Suppose we have an initial value problem of the form $$ \frac{\mathrm{d} \mathbf{x}}{\mathrm{d} t} = f(\mathbf{x}) \qquad \mathbf{x}(0) = \mathbf{x}_0 $$ where $\mathbf{x}_0 \in \mathbb{R}^n$ is known ...
0
votes
0answers
14 views

Work and Manipulate structures grid files in Paraview [on hold]

I want to work with files having data distributed columnwise, e.g. xdata ydata zdata function I usually load this data into Paraview as *.particles file, which enables plotting and working. However ...
-5
votes
0answers
26 views

would you please write 'optimal strong stability preserving 4 stage 3 order explicit scheme for fortran'?

We want to write an explicit scheme to solve ODE at Fortran by optimal SSPRK 4 stage 3 order. Would you please write the algorithm to solve this problem.
1
vote
2answers
57 views

Using computational libraries on a machine without root access

If you want to use a computational library on a high-performance computing center where you have no root access to install new software you can use header-only template libraries such as MTL4, Eigen3, ...
1
vote
2answers
49 views

How to use the basic Sparse matrix operations (multiplication, .etc) in PyCUDA

I try to use sparse matrix operations in GPU in Python and now try to use PyCUDA with theano. But I can't find how to do sparse matrix and vector multiplication. I only got an example showing how to ...
0
votes
0answers
22 views

Transformation non-orthogonal elastic modulus tensor

I have a non-orthogonal coordinate system of defined by the vectors $e_1=(0.000, 0.707, 0.707)$, $e_2=(0.707, 0.000, 0.707)$, $e_3=(0.707, 0.707, 0.000)$. I have calculated a stiffness tensor ...
4
votes
1answer
70 views

How to formulate lumped mass matrix in FEM

When solving time dependent PDE's using the finite element method, for example say the heat equation, if we use explicit time stepping then we have to solve a linear system because of the mass matrix. ...
-1
votes
0answers
23 views

Need help fixing a NumberFormatException error [on hold]

I am trying to implement the program given here When I try to run the program with the given files without the pre-calculated BLAST results, the following occurs: ...
0
votes
1answer
37 views

Equivalence of linear elasticity and biharmonic equations: variational formulation

Wikipedia tells me that the equations for linear elasticity and biharmonic equations have the same solution for Dirichlet boundary condition. How do you show the equivalence in the variational ...
0
votes
1answer
28 views

Heat equation with harmonic source and Neumann boundary

Is there an analytic solution or series approach to the 2D time-dependent heat equation in a square with a harmonic source and Neumann boundary conditions $\nabla u.n=0$?
1
vote
1answer
21 views

How to nest 2 simple CVX problems? Is it possible at all?

I have the underdetermined outer optimization problem $$\text{min}_{x\geq 0}\quad \|Ax-b_1\|_2^2+\|AT(x)-b_2\|_2^2$$ with $A\in\mathbb{R}^{m\times n}$ and $m<<n=64^2$ or in corresponding CVX ...
2
votes
1answer
36 views

Is my Restricted (Natural) Cubic Spline equation wrong?

I am trying to fit a restricted cubic spline (natural cubic spline) with 4 knots to toy data, attempting to follow Hastie, Tibshirani, Friedman 2nd ed. 5.2.1 p.144-146, Eqs 5.4 and 5.5. Data: Is ...
1
vote
2answers
72 views

How to deal with nonlinear term in Navier Stokes equations (finite element code)

I am trying to solve the Navier Stokes equations using the finite element method. I plan on using the pressure correction method to deal with the pressure and an implicit time stepping scheme for ...
1
vote
0answers
27 views

scipy.integrate.ode ignores boundary conditions

I am trying to solve the 1-dimensional diffusion problem numerically using method of lines: $$ \frac{\partial c}{\partial t} =D \frac{\partial^2 c}{\partial z^2},$$ where the right hand side is ...
3
votes
0answers
39 views

How to sample points in hyperbolic space?

Hyperbolic space in the Poincaré upper half space model looks like ordinary $\Bbb R^n$ but with the notion of angle and distance distorted in a relatively simple way. In Euclidean space I can sample a ...
1
vote
0answers
12 views

Enumerating set combinations in an order that maximises the number of previously unseen subsets

Consider a set $S=\{a,b,c,d,e,f,g,h,i,j,k\}$, $\left|S\right|=11$. There are ${11 \choose 5} = 462$ combinations of $S$'s members of size $5$. There are $462! \approx 1.419 × 10^{1032}$ possible ...
0
votes
1answer
81 views

Adaptive mesh refinement basic conceptual problem

I am a beginner in adaptive mesh refinement (AMR). After I am done with the first two papers by Dr. Marsha Berger, I was trying to write my own code for a problem which has a parabolic partial ...
0
votes
1answer
45 views

Representation of polynomial order in CFD codes

I am currently working on a CFD code over a cubic grid. Now, the number of elements used in the simulation is decomposed among the number of processors. Each of those processors (a section of the ...
2
votes
1answer
83 views

Computational methods for finding the energy eigenvalues of the time-independent Schrodinger equation with arbitrary potential

I have seen in some papers that the energy levels in some arbitrary potential are specified. How can one find the energy levels in such arbitrary potentials. For example, $V(x)=\sin^2(x/2)$ with ...
0
votes
1answer
25 views

How to generate movie of the simulation done in LAMMPS? [closed]

I simulated nanowire deformation using LAMMPS and visualized it using VMD in Centos 6.5. But I'm not able to generate .jpg image file or the simulation movie. How can I proceed??
1
vote
1answer
35 views

Satisfying Periodic Boundary Conditions while plotting spherical particles inside a cube

I am trying to plot spherical particles in a cube of fixed dimension in matlab. I face a problem here where the center of the sphere is too close to the edge of the cube in this case the rest of the ...
0
votes
0answers
25 views

How to use C++ Classes [closed]

Friends, I have made a c++ class matrix program and i want to use it in my other C++ programs. I don't want to write the program ever and ever again in each program. I know there is a way to use ...
0
votes
0answers
16 views

I have a problem to make my own Makefile to compile my codes using PETSc [closed]

I am new to PETSc and I want to use it for a project. I try to compile my codes with make command but I get different errors. I explain what I did and put my files here. I am trying to understand how ...
1
vote
3answers
62 views

Should a randomly-seeded genetic algorithm give deterministic optimized solutions on each run?

I am going to rewrite an algorithm using genetic methods for mutating my solutions, and I am wondering what I should expect and only consider my algorithm "optimized" or "finished" if various runs of ...
3
votes
1answer
131 views

Numerically stable approach for calculating x in Ax=b

I have an equation $Ax=b$ for which I need to solve for numerous $x$ matrices given $b$. Both $x$ and $b$ are nx1 matrices. Unfortunately, $A$ is a 32x32 matrix and inversion gives highly unstable ...
0
votes
1answer
32 views

How to write Goemans-Williamson MAX-CUT relaxation as SDP

Let W be a graph Laplacian (symmetric diagonally dominant, and thus PSD), and X the matrix variable. Let $<A,B>=Tr(A^TB)$. $$\text{Maximize}\;\; \displaystyle\sum_{i,j} w_{ij}(x^{(i)}\cdot ...
0
votes
1answer
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 ...
0
votes
1answer
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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} ...
0
votes
0answers
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: ...
10
votes
1answer
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 ...
0
votes
0answers
16 views

Discrete Spherical Harmonic Transform from Cartesian grid

I have a grid of data on a 3D Cartesian grid and I would like to find a routine that will allow me to input this data and output a spherical harmonic transform for specific values of radial distances. ...
2
votes
0answers
49 views

Numerical integration when solving PDE: Simpsons rule and high frequency noise

I am solving a PDE, and one of the intermediate steps is to numerically integrate a function over a compact interval. The function is represented on a linearly spaced grid. I am using Simpsons rule ...

15 30 50 per page