0
votes
0answers
5 views

Treatment of Neumann (Traction) boundary conditions using projection methods

I am looking to solve the incompressible Navier-Stokes equations in 3D, using an inflow boundary condition specifying a velocity: $\mathbf{u} = \mathbf{g}_0 \,\, \forall \,\, \mathbf{x} \in \Gamma_u$ ...
0
votes
0answers
5 views

Testing 1D root-finding procedures for robustness

How can I test whether a given 1D root-finding procedure is robust? I know that there are data sets and resources online for different kinds of optimization, but I have yet to find anything with ...
0
votes
0answers
11 views

How to use the Freefem++ (or Fencis) for solving 3D Helmholtz equations or Maxwell equations

I recently want to solve the three-dimensional Helmholtz equations with ABCs via the edge element method. But I am familiar with the program of C++/Python (-type) language, so I want to obtain some ...
0
votes
0answers
7 views

Nonsmooth dynamic systems simultion using Siconos sofware with Rhenoumous Rheonomous relations [on hold]

I have been working on a nonsmooth dynamic system recently with Siconos software. However, I think I have encountered some problems and I can not find any solutions. My system can be formulated as ...
1
vote
1answer
29 views

3D Poisson equation, Fourier and Chebyshev

I am currently trying to solve the 3D Poisson equation with a Chebyshev discretisation in the $z$ direction (from -1 to 1) and Fourier in the $x$ and $y$ (from $-\pi$ to $\pi$) I have taken the code ...
0
votes
2answers
38 views

How to determine the number of c points in algebraic multi grid

I am trying to write an algebraic multi-grid solver (in c++). At a given level I determine which nodes are c-points and which nodes are f-points (where the total number of c and f points equals the ...
0
votes
2answers
41 views

How to generate a rotated (by 90 degrees) logistic sigmoid function in Python

I created this Python function to generate a sigmoid function where I can modify position and width: ...
4
votes
0answers
39 views

Policies Relating to Publication and Open Source Development of Code in Academia

Introduction Let me first state some conflicting assertions of the matter to illustrate what are the issues. Personally I would like to have my code open at every stage of development, since ...
0
votes
0answers
52 views

How to use Freefem++ to implement the approximation under the unfitted FE, based on Nitsche's method, for elliptic interface problem? [on hold]

I want to know how to use Freefem++ to implement the approximation under the idea shown in Hansbo's paper. I write down here the main idea, please see more on the paper if you want to see more ...
2
votes
2answers
45 views

Should I pass command line arguments to MPI_Init or not?

When writing MPI 3.0 code, should I pass argc and argv to the MPI_Init call or not, and why? ...
0
votes
0answers
21 views

ice (sleet, glaze ice) [on hold]

Tell me how you can well predict the ice (sleet, glaze ice)? I have a database for a long period of time with different parameters to weather conditions. The first thing that comes to mind - Least ...
2
votes
1answer
54 views

Is there a relatively simple way to extract the Jacobian from a Runge-Kutta 4/5 integrator?

I have a RKF45 numerical integrator that simulates polymerization of proteins using CUDA. It does so by tracking the populations of discrete length polymers, e.g. monomers, dimers, trimers, etc. all ...
0
votes
0answers
31 views

I can't store my data [on hold]

I use the cluster in my laboratory to simulate something with matlab.And I open many programs at same time.It usually needs about 2 to 3 days to finish the simulation.However,the data of some programs ...
1
vote
0answers
49 views

Does it matter if I use principal component analysis on the transpose instead of the original matrix?

My data set is a 60x10 matrix. I performed principal component analysis of this matrix with matlab using the princomp(AdjustedData) after I adjusting my original data set by subtracting the mean of ...
3
votes
1answer
42 views

Boundary conditions Chebyshev differentiation

I was wondering if anyone has any experience dealing with boundaries when implementing chebyshev differentiation. I am currently trying to implement a no slip boundary condition to solve the ...
5
votes
2answers
355 views

Is the shooting method the only general numerical method for solving nonlinear boundary value ODEs?

During my wandering in Mathematica.se, I gradually noticed that a certain kind of differential equation solving problem is "troubling" us all the time, that is, the boundary value problem (BVP) of ...
3
votes
2answers
121 views

Implementation of nonlinear term in FEM

Although there are similar questions, I am also struggling with the implementation of the following term in "my own code" by Finite Element Method, namely, $\nabla \phi \cdot \nabla \phi$. $\phi$ is ...
-1
votes
2answers
70 views

General question about Computational Science

I'm student of computer science (BS) and considering computational science as the field to major in for MS program. I have two questions which might look silly but I'm really confused: 1- Are ...
0
votes
0answers
38 views

What is the smallest positive integer that is not exactly representable as a floating point number in this system?

I have difficulties answering Exercise 3.10 from the book Overton M. Numerical computing with IEEE floating point arithmetic, 2nd edition. What is the smallest positive integer that is not exactly ...
1
vote
1answer
87 views

Confusion in modeling and computing [on hold]

I come from a computer graphics background without any professional in computational science. But I find my job(game engine development) being related to this field. May I ask some general questions ...
1
vote
1answer
42 views

optimising changing the range of integers from random number generation

I'm looking to find the most efficient way to change integers from a random number generator to a different inclusive number range. I know of 2 ways so far: Change the number into a decimal in the ...
3
votes
1answer
53 views

Numerically solve a PDE in Python with a term calculated by coarse-graining

I'm trying to solve a PDE in Python of the form, $\dfrac{\partial c(\mathbf{x}, t)}{\partial t} = \mathrm{D} \nabla^2 c(\mathbf{x}, t) -\gamma \rho(\mathbf{x}, t) c(\mathbf{x}, t)$ where $c$ ...
3
votes
2answers
55 views

Schur(QZ) Decomposition Differences

I am having issues understanding why different languages are producing different answers for the Schur(QZ) decomposition. I am working on writing some old stuff from Matlab into Julia and Python and ...
1
vote
2answers
85 views

Solving a system of polynomial equations with multiple variables

I have a system of equations of the form: $$ l_i^T l_j \cdot m_i^T m_j - m_i^T R l_j \cdot l_i R^T m_j = 0$$ where $R \in \mathbb{R}^{3\times3}$ is an unknown rotation matrix. $l_i, l_j, m_i, m_j \in ...
4
votes
1answer
48 views

Finding self-similar solutions

Is there a general approach to finding self-similar solutions; i.e. collapsing several functions onto a single function by some transformation? I have data from some experiments, and the functions ...
0
votes
0answers
12 views

Java vs C# algorithm execution [migrated]

I have N-queen problem written in Java and C#. You can find out more about 8-queen problem here. Here is Java code: ...
1
vote
0answers
18 views

linear solution of curve fitting on multiple linear functions differing by a multiplier

I am facing the following problem. I know nonlinear least squares can provide a solution but I am wondering if a linear way to solve this data fitting problem may exists. This is my input dataset: ...
1
vote
0answers
36 views

Algorithms for deformable image registration [migrated]

I need to perform a deformable image registration (DIR) for delineation of the different brain parts on the brain MRI 3D image. I faced with a problem that there are a lot of different approaches for ...
6
votes
2answers
87 views

Evaluating 6D Gaussian Integral in Matlab

I have to compute the accuracy of a new Gaussian mixture fitting algorithm. One of the tests include computing the probabilities in certain intervals in a 6D hyperspace. Also, the integral of the ...
3
votes
1answer
78 views

Partial differential equations with octave [on hold]

I need to find a numerical solution for $-\Delta U = f$, on the $\Omega = [0,1]^2$, with $ U|_{\partial \Omega} = 0$. I found a method: POISSONFD in ...
0
votes
1answer
70 views

Fastest linear solver for sparse positive semidefinite, striclty diagonally dominant matrix

What is the state of the art for fastest linear solver for sparse, positive semi definite and strictly diagonally dominant matrix with N varies from ~700 to ~3000, and about a 1/16 of the matrix is ...
1
vote
0answers
81 views

Solve a fourth order differential equation

I want to solve $$ \frac{\partial^2}{\partial t^2}u(z,t) + a\frac{\partial^2}{\partial z^2}u(z,t) + k\frac{\partial^4}{\partial z^4}u(z,t) = 0 $$ with $u(z,0) = 1+0.1e^{-\frac{z^2}{2}}$. I'd like to ...
1
vote
1answer
82 views

What is the algorithm that matlab used in its built-in function 'pca'?

Do anyone know what is the algorithm that MATLAB used in its built-in function "pca"? I have the following data set: 148.9820 55.8438 210.2150 149.3030 56.8891 208.4280 151.4400 ...
1
vote
2answers
75 views

When are two vectors considered “close”?

I want to check numerically if a certain vector relation like $$ \alpha_1v_1+...+\alpha_kv_k=c \ (1)$$ holds (where $v_i,c$ are vectors of $100$ or more components). For this, I use least squares ...
1
vote
1answer
76 views

Calculate the machine epsilon in Matlab

How can I calculate the machine epsilon for two numbers then calculate the theoretical limit for machine epsilon in Matlab ?
2
votes
2answers
73 views

Lax-Richtmyer stability analysis

I would like to get to know more in details about Lax-Richtmyer stability analysis (esp in examples), but I didn't manage to find anything except a definition. Could you advice any sources for this ...
1
vote
2answers
107 views

Reference for approximation errors in 2D and 3D by using FEM

I'm currently searching for an elaborate referece that covers most of the approximation errors for elliptic second order problems (like, for the laplacian dirichlet problem) by using finite element ...
3
votes
2answers
95 views

Analog of perfectly matched layers for finite element methods

Is there an analog of perfectly matched layers for finite element methods? References or small examples are much appreciated.
1
vote
3answers
76 views

Test set for linear solvers

Lets assume I have a iterative linear system solver, e. g. this one. Whats the typical approach on verifying and testing this kind of solvers? Is there a standard test set of linear systems one ...
0
votes
2answers
45 views

Azimuthal average in Fortran? Find indexes in Fortran?

I am working on an eigenvalue problem in fortran. I have used Lapack to solve the problem and get the eigenvalues and eigenvectors. This is done for $201\times101$ wavenumbers, only half the wavespace ...
4
votes
0answers
38 views

How can one produce a proper streamline plot?

I recently had trouble producing a proper streamline plot in Mathematica, and apparently the problem is a good bit harder than I appreciated. I would like to know if there exist general algorithms to ...
0
votes
0answers
21 views

LaPlacian 3D example 34.c - how do you invoke multiGrid

I am having trouble running this code while exercising the ksp_type GMRES pc_Type mg -da_refine 1. Error Reports arguments are incompatible I read somewhere the pc_type MG works with all of the ...
0
votes
1answer
29 views

VTK File: How do I save data on a cell face?

I am writing a program that creates a vtk file with a Rectilinear Grid. I am able to save data to each one of the cells using CELL_DATA, but now, I need to save data to each one of the cell faces ...
2
votes
1answer
149 views

Solve a differential equation with finite difference method

I want to solve this equation $$ -\frac{1}{2}f''(x)+2a\ f(x)^3 = f(x)\mu $$ One exact solution (there are a lot of different kinds) of this equation is $f(x) = f_\infty \tanh(\sqrt{2a}f_\infty x) $ ...
2
votes
1answer
177 views

Non-conservative implementation implicit Euler

In Matlab R2013a I have implemented the Implicit Euler (time) integration scheme. To find the $x^{n+1}$ value I use fixed point iterations: $x^{n+1} = \Delta t f(x^{n+1}) + x^n$ To test this, I use ...
0
votes
1answer
78 views

How can I use Scipy to fit data generated from a C++ model?

I currently have a functioning and blazing fast model written in C++ and CUDA. However, I'd like to use Scipy.minimize to fit the model to some experimental data. I was hoping it would be easy, but ...
1
vote
1answer
88 views

Patankar's algorithms for Numerical Heat Transfer and Fluid Flow

I am looking for the algorithm of Patankar (for example, SIMPLE, SIMPLER, SIMPLEC and PISO) written in Fortran for the simulation of heat transfer and fluid flow.
1
vote
1answer
44 views

How can DFT of a two dimensional array be found using program for one dimensional DFT in C?

I have the program four1.c from Numerical Recipes in C to calculate the Discrete Fourier Transform (DFT) of a one dimensional array. I want to calculate the DFT of ...
0
votes
1answer
55 views

jump conditions for Poisson/Darcy equation in primal form versus mixed form

Consider the Darcy equation, $$\mathbf{v} + \dfrac{k}{\mu_0}\nabla p = \mathbf{f} \\ \mathrm{div}\; \mathbf{v} = 0$$ If the coefficient $k$ is piecewise constant across an interface $\Gamma$ in the ...
0
votes
0answers
19 views

Partitioning of a set w.r.t. injectivity

I have two disjoint sets A and B which are merged into a set C=A+B which is then partitioned. The number of such partitions is the nth Bell number. I want to filter out the partitions to be injective, ...

15 30 50 per page