All Questions

1
vote
0answers
30 views

How to the determine the initial conditions of the following coupled non-linear ODEs

I am trying to determine the roots (initial conditions) of $θ'$ and $f''$ in the set of ODEs below so I can solve as an initial value problem using the Runge-Kutta method. I tried using Newton-Raphson ...
3
votes
2answers
35 views

GPGPU language for AMD?

Nvidia seems to be dominating the HPC / GPGPU computing landscape with CUDA. If I want to write a scientific application using and AMD GPU, what is the preferred language these days? I believe it used ...
0
votes
0answers
15 views

maximum eigenvalue across subsamples

I have an $N$-dimensional vector of data, say $X_{t}$, with $1 \leq t \leq T$. Of this vector $X_{t}$, I want to consider vectors, say $X_{t}^{b}$, which are $m$-dimensional combinations of elements ...
0
votes
0answers
35 views

Library for Discontinuous Galerkin method: FEniCS vs deal.ii

I am aware that both FEniCS and deal.ii are capable of solving problems with Discontinuous Galerkin (DG) method. I would like to specifically know if any of these two softwares can cater these ...
-1
votes
0answers
6 views
0
votes
1answer
20 views

Find shift in high resolution noisy signal if only local argmax data are available

Let's say I have a signal which consists several pulses of approximately equal height, and I have to correlate it with the expected positions of the peaks to find the shift of this signal w.r.t. a ...
0
votes
0answers
15 views

how to estimate the number of people on a street within an hour?

I tried to use opencv to analyze a video filmed on the street. But the problem is the performance is not enough. I think the number of people must follow the poisson distribution. So I want to ...
0
votes
0answers
27 views

Algebraic multigrid for coupled equations

As far as I understand is algebraic multigrid(AMG) a method that was intentionally developed to solve linear systems where every grid point or node has a single DOF. When AMG should now be used for ...
16
votes
5answers
755 views

How to address numerical non-associativity for parallel reduction?

A parallel reduction assumes that the corresponding operation is associative. This assumption is violated for addition of floating point numbers. You might ask why I care about this. Well, it makes ...
0
votes
0answers
24 views

Techniques to optimise the integral of a function of known analytical form

I need to compute repeatedly a function that depends on an integral. The integral is not solvable analytically, but it depends on the argument of the function parametrically, like this: $$ f(x) = \...
6
votes
2answers
7k views

The easiest way to find intersection of two intervals

Right now I stuck with a problem. It seems to be really trivial one, but still it is hard for me to find an appropriate solution. The problem is: One has two intervals and are to find the intersection ...
0
votes
0answers
31 views

FEniCS: problem evaluating the error

I am new to FEniCS and I have solved a variational problem using finite elements and a time-discretisation. Some of the code is below: ...
0
votes
0answers
362 views

Inputting a time dependent function into ODE45 [closed]

I am currently trying to model random waves on a buoy system. I am running into the issue of implementing a random wave function. ...
1
vote
1answer
85 views

Multiscale Simulation of random walker

I want to simulate a system of random walkers (called A) with diffusion coefficient equal to D and other systems of random walkers (called type B) with diffusion coefficient equal to 1000 D. Second ...
2
votes
1answer
113 views

Computing expectations

I want to compute the following conditional expectation $E_{t}[\phi(A_{t+1}, \eta_{t+1})| A_t]$ where $\log A_{t}=\rho \log A_{t-1} + e_{t}$ and $e_{t}$ is IID $N~(0,\sigma_e)$ and $\eta_{t}$ is ...
1
vote
0answers
48 views

Solving a nonlinear equation with a Markov process and RVs

Assume that we have the following equation and the following assumption. The scope is to solve for some particular variables expressed later. Update $$E_{t}\left[ b(A_{t+1})^{1-\gamma} *R_{t+1}^{-\...
1
vote
1answer
70 views

Creating dense random configuration in for molecular dynamics

I am creating a random configuration of particles for a molecular dynamics simulation, where I would like to guarantee a certain density. The strategy is as follows: choose randomly the positions of ...
2
votes
1answer
49 views

Using physical parameter as a Gaussian Random Variable in a simple Poisson Problem

I want to vary the input parameter of a physical dynamic mechanics problem, as a Gaussian Random variable and view the resulting Probability Density Function. I used the Finite Element Method to ...
4
votes
1answer
348 views

Fast algorithm for computing matrix square root using randomized linear algebra?

Is there a fast algorithm for computing the matrix square root of a real symmetric matrix using random matrices or randomized algorithms?
3
votes
1answer
179 views

Solving a nonlinear equation with random variable

I would like to solve an equation that looks like this UPDATE $E[(R^{1-\gamma})(r_k+\theta-r_z)]=0$ , where $R=\phi r_z+(1-\phi)(r_k+\theta)$ and $\phi\in[0,1]$, $\theta$, is a random variable ...
5
votes
1answer
100 views

Random access random permutations

I have a large number of parallel processes and a large integer $n$, and want to randomly partition the integers $[0,n)$ among the processes with only $O(1)$ communication. One nice way to do this ...
7
votes
3answers
1k views

Constructing random divergence-free velocity fields

I am trying to simulate decaying homogeneous isotropic turbulence. As initial condition I want a divergence-free vector-field, i.e, $\mathrm{div} U = 0$. How do I initialize random velocity field in ...
11
votes
4answers
320 views

How to create a random 3D domain representing a plant's root structure?

I would like to model laminar flow of water from roots to the stem of a plant. At the very end of the roots, the tubes vary from millimeter to centimeter scale in diameter and length. As we get closer ...
5
votes
4answers
2k views

Simulated Annealing proof of convergence

I implemented downhill simplex simulated annealing algorithm. Algorithm is very hard to tune, w.r.t. parameters including cooling schedule, starting temperature... My first question is about ...
5
votes
2answers
642 views

What is the most appropriate derivative free optimization algorithm

We can use random optimization/ derivative free/ direct search to find the minimum of some black box function $f$. If I have some 2D black box function, $f(x,y)$ - which I know to be convex - what ...
5
votes
2answers
834 views

Hashing algorithms/implementations for Monte Carlo simulation

To summarise this question in advance, I'm looking for a good hash function that is suitable for generating pseudo-random numbers in Monte Carlo simulations. This means it should be reasonably fast (...
4
votes
1answer
884 views

Sampling from posterior predictive distribution

First post. I'm working on this problem using Bayesian methods. In desperation I'm considering using p-values (shock horror), specifically posterior predictive p-values. So I need to simulate from the ...
3
votes
1answer
292 views

Random placement of euclidean points with constrained inter-point distances in a fixed area

I'd like to place as many random points as possible in a 2D square $S=[0,1]x[0,1]$ such that the euclidean distance $d$ between any two points $d$ is greater than a given value $b$ (b is small). I'm ...
3
votes
1answer
149 views

solving for unknown inside an expectation

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 ...
2
votes
1answer
127 views

What is the name of the optimization algorithm that uses random sampling?

I am generating random weight as per e.g. below. The I generate a set of 3 values say 100, 250, 300 and I multiple them with the weights below Initial population. ...
2
votes
0answers
30 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 ...
1
vote
2answers
289 views

Uniform dots distribution in a sphere

I'm trying to implement Barnes-Hut algorithm, with a binary tree. My initial conditions are a uniform mass distribution in a sphere with radius $R$. How can I create uniform dots distribution in a ...
2
votes
0answers
34 views

Is this a form of stochastic gradient descent?

I want to minimize the following with respect to parameters $B$. $$\sum_{k = 1}^{K} f(A_{k}, B)$$ where $A_k$ are $K$ different data-sets and $B$ is a matrix of parameters. Can I do this by a ...
1
vote
0answers
124 views

Monte Carlo simulation [on hold]

I am wondering if I am thinking correctly about the following problem : Define the box of the dimensions $(a,a,H)$ in the $X$,$Y$, and $Z$ directions, respectively. Insert $n$ particles into the box ...
1
vote
1answer
75 views

Pseudo random numbers

I am learning how to use pseudo random number generators but the instructor just told us how they work without explaining why they work. For example, can one prove that the numbers generated by LCG ...
0
votes
1answer
388 views

Drunken Man in Matlab

I wrote a script that plots the results of the "drunken lamppost" problem in MATLAB. Now I need to create a road-width from -3 to +3, length from 0 to infinity but the drunk can walk just ahead. It ...
0
votes
0answers
39 views

Monte-Carlo method for action (Solved) [closed]

What I want to do is during Monte Carlo iteration, minimize the action ( or cost function ) which is defined as the sum of 'sum' and print the corresponding zeta and theta array elements which shows ...
19
votes
4answers
3k views

Is Fortuna or Mersenne Twister preferable as an algorithmic RNG?

A recent answer mentioned the use of Fortuna or Mersenne Twister Random Number Generators (RNGs) to seed a Monte Carlo simulation. I hadn't heard of Fortuna before so I looked it up - looks like it is ...
14
votes
5answers
1k views

Why does the numerical solution of an ODE move away from an unstable equilibrium?

I wish to simulate the behaviour of a double-pendulum-like system. The system is a 2-degrees-of-freedom robot manipulator that is not actuated and will, therefore, behave mostly like a double-pendulum ...
0
votes
1answer
98 views

ill-conditioning

I am struggling with the following exercise from the book of Nocedal, Numerical optimization, chapter 2, exercise 2.12: Suppose that a function $f$ of two variables is poorly scaled at the solution $...
1
vote
1answer
157 views

How can i define algebraic equation in differential function in MATLAB?

I want to solve 7 pde's that are functions of time, radius(j) and length(i). I used the method of lines and converted them to a system of odes in time and it becomes something like this: $$dy/dt=((y(i,...
1
vote
2answers
136 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 ...
5
votes
3answers
215 views

Fast evaluation functions given by straight-line programs

I have a simple but long function that takes a vector x[10], and outputs a vector y[100]. It is an automatically generated eval function for a multivariate polynomial, ie, there is only (complex) ...
0
votes
1answer
223 views

How to create node to node lumping

I have been doing finite element analysis using Matlab. I look for many examples and tutorials producing only the stiffness matrix letting elements being weightless. However, in my case, I need to do ...
0
votes
1answer
2k views

How is the mass matrix formed in finite element methods? [closed]

I am doing a project on the finite element method. I want to know how to form the mass matrix. Can you please point me out to the resources on the finite element method, where the procedure of ...
1
vote
2answers
228 views

Assemble P2 finite elements - Matlab or references

I would like to implement P2 (or even P3...) finite elements in Matlab. I need to be able to control the construction of the rigidity and mass matrices ($ \int \nabla \varphi_i\cdot \nabla \varphi_j$ ...
2
votes
1answer
582 views

Basic Finite Element Method (FEM) question: assembly and re-assembly

I'm reading up on the Finite Element Method (Zienkiewicz's Book), so I understand better what I'm doing in FEniCS and COMSOL. Currently, I'm wondering about this: Using FEM to solve fluid flow ...
2
votes
0answers
391 views

assembly matrices in finite element method [closed]

I'm trying to construct the right–hand side of my 2D Poisson's equation in Matlab. I used the vertex rule in order to approximate the integral: ...
3
votes
0answers
291 views

Efficient assembly of finite element matrix(coupled equations case)

I noticed this post, where spalloc and sparse are recommended for efficient assembly in Matlab. I personally use sparse ...
6
votes
2answers
256 views

How to calculate/derive analytic FEM Newton Jacobian

I trying to wrap my head of derivation of the analytic FEM Jacobian for the Newton method. Say we have a nonlinear Poisson problem of the (weak) form $$ \int a(u)\nabla\ u\cdot \nabla v = \int f v $$ ...

15 30 50 per page