All Questions

Filter by
Sorted by
Tagged with
3
votes
1answer
829 views

Where can I find coded examples of stochastic collocation applied to an elliptical PDE using smolyak sampling?

I'm having some troubles implementing a collocation method to solve a stochastic partial differential equation of the form: $\nabla (a(x,w)\nabla u(x,w))=f(x,w)$ in $D$, $u=g$ in $\partial D$ where $...
11
votes
2answers
1k views

How do you improve the accuracy of a finite difference method for finding the eigensystem of a singular linear ODE

I am attempting to solve an equation of the type: $ \left( -\tfrac{\partial^2}{\partial x^2} - f\left(x\right) \right) \psi(x) = \lambda \psi(x) $ Where $f(x)$ has a simple pole at $0$, for the ...
0
votes
2answers
159 views

Speed up DG FunctionSpace evalutation [closed]

today I tried some evaluation on a DG function space (Fenics 1.2.0). In my calculations I need to use meshes with a large number of cells (~10mio). At the moment it takes a very long time to create a ...
1
vote
2answers
918 views

How can I build a mesh with holes for use in FEniCS?

This is my first time using FEniCS. I am trying to solve an elliptic PDE, fairly similar to the Laplace equation, on a rectangle with two holes in it. The holes are level sets of an energy function, ...
6
votes
1answer
305 views

Boundary value method for equation $u_{tt} = u_{xxx}$

I have this funny equation $$ \frac{\partial^2 u}{\partial t^2} = \frac{\partial^3 u}{\partial x^3}, \qquad x \in [0,1], \qquad t \in (0,T] $$ with initial conditions $u(x,0) = \sin(2\pi x)$, $\frac{...
2
votes
4answers
2k views

Simple FEniCS problem shape mismatch

EDIT: THE ORIGINAL POST DID NOT MAKE MUCH SENSE, SO I ADJUSTED IT Ok, so I have thought about it, googled it and put some more thought into it. This presentation by the Imperial College in London has ...
1
vote
1answer
97 views

Solving an ODE without a boundary condition [closed]

I have an ODE without a boundary condition: $\small\left(\frac{d}{dr}C(r)\right)^4-2C(r)\left(\frac{d^2}{dr^2}C(r)\right)\left(\frac{d}{dr}C(r)\right)^2+2\left(\frac{d}{dr}C(r)\right)C(r)^2\left(\...
5
votes
1answer
794 views

Finite-difference discretization for a convective term

How does one discretize the classical convective term in a transport equation using finite differences? I know the finite volume schemes out ther i.e. upwind, central differencing etc. Are there ...
8
votes
3answers
482 views

What should be the criteria for accepting/rejecting singular values?

I am solving a system using singular value decomposition. The singular values (before scaling) are: ...
2
votes
4answers
402 views
3
votes
1answer
133 views

Molecular dynamics simulation: fluctuating dipole model implementation

I'm conducting a molecular dynamics simulation for silica. Some time ago I turned to the fluctuating dipole model, and after much effort I'm still having problems implementing it. In short, all ...
7
votes
1answer
622 views

Decreasing spectral radius

I have a $4\times 4$ matrix and I want to use Jacobi iteration on it. Right now the spectral radius is higher than $1$. I know that the method is guaranteed to converge if the matrix is diagonally ...
5
votes
2answers
289 views

Out-of-core matrix transpose of row compressed data

Summary: Are there good algorithms for out-of-core dense matrix transpose if each row of the matrix is separately compressed? Details: The matrix is about 1 TB uncompressed, and is roughly but not ...
7
votes
2answers
263 views

Representing charges in computer programming

I'm preparing for a thesis in computer science on calculations based on concepts from Neuroelectrodynamics. In short this theory states, that information transfer is not done by spike time coding, ...
7
votes
2answers
2k views

FEniCS: boundary conditions for electrostatic problems with dielectrics

I carefully read all circa 70 pages of FEniCS tutorial and I still do not understand how to solve electrostatic problems when I have materials with different dielectric constant. The self contained ...
6
votes
0answers
97 views

Benchmarks or generic configurations for optimal flow control

I am about to test my algorithms for solving optimal control problems of type: Find an input $u$, such that for a time interval $(0,T]$ the cost functional $$J(v,u) = \mathcal M(v(T)) + \int_0^T\...
-4
votes
1answer
65 views

How to evaluate 1st and 2nd order reactions, with rate constants and fluxes?

I want to implement differential equations in C# from Open Cell cellml file. The mathematical model is described in this article. I have parsed xml, and calculate operations, but can't correctly ...
3
votes
3answers
7k views

What is the Complexity of MATLAB operations

I'm trying to analyze the complexity of MATLAB code I wrote. I'm trying to figure out how much (in terms of $O$ or $\Theta$) to give functions like find, matrix <...
29
votes
2answers
11k views

Does a tiny determinant imply ill-conditioning of a matrix?

If I have a square invertible matrix and I take its determinant, and I find that $\det(A) \approx 0$, does this imply that the matrix is poorly conditioned? Is the converse also true? Does an ill-...
12
votes
3answers
12k views

Meshing 3D surface data in python

I have a dataset of 3-dimensional points for which I'd like to construct a mesh, using python. All the software I've seen requires that you provide the edges. Is there a program in python which takes ...
5
votes
1answer
116 views

How to assure that a number only contains a certain range of digits?

Say I would like to generate a pseudo-random number, which only contains the digits 1, 4, 7 (this is arbitrary). My first guess would be to create and array "147" and create random numbers in the ...
7
votes
2answers
891 views

Can all eigenvalues of a Hermitian Toeplitz matrix be computed in $\tilde{O}(n)$ time?

I know there are "superfast" $O(n \log^p n)$ algorithms for solving Toeplitz linear systems. Is it possible to compute all eigenvalues of such a matrix with the same complexity?
6
votes
1answer
4k views

FEniCS: how to specify boundary conditions on a circle inside 2D mesh

I would like to numerically find a mutual capacitance of two stripes of metal on the opposites sides of a cylinder. The problem is obviously a 2D Laplace equation. I would like to find the potential ...
3
votes
2answers
191 views

Earth and Moon computer simulation

Edit: I made a test model with 2 bodies. The sun and earth or w/e. But I now have the problem of zero divisions every time that one of the coordinates is zero. ...
8
votes
2answers
827 views

How to solve the stiff equation in this Restricted Three Body Problem numerically?

I've come across a stiff equation in solving the Circular Restricted Three Body Problem. [An object is moving considering the effect of the gravitational forces caused by two gravitational sources ...
23
votes
4answers
1k views

When is a high order method useful for computational fluid dynamics simulations?

Many numerical approaches to CFD can be extended to arbitrarily high order (for instance, discontinuous Galerkin methods, WENO methods, spectral differencing, etc.). How should I choose an ...
1
vote
0answers
55 views

Sine series using exponential based FFT

I have such a problem - I would need to expand a discrete function in a sine fourier series but I would like to use exponential based library for FFT (I will use CUDA to compute it). What have I to do ...
5
votes
2answers
8k views

SciPy interpolation with Univariate Splines

I have coded a routine for interpolation with B-splines, only to discover later that this functionality is already included in Python's SciPy. However, I do not understand one parameter in the SciPy ...
6
votes
2answers
2k views

Intermediate values (interpolation) after Runge-Kutta calculation

I have a numerical ODE simulation that I computed at fixed time step $h$ using a 4-th order Runge-Kutta method (RK4), producing a series of results $(x_1,y_1), (x_2,...
5
votes
1answer
877 views

Package for determining power output of windmill shapes?

I'm looking for the best package for doing the following: building a 3D model (or loading externally) of a non-standard windmill shape, simulating an airflow over the model, and determining the ...
6
votes
0answers
2k views

What is the best OpenFOAM RAS turbulence model for a motorbike/vespa problem?

I am learning OpenFOAM as a hobby and using my Vespa racing as the topic to apply it to. The objective is to produce modifications that improve the top speed (as well as getting some values such as ...
10
votes
3answers
3k views

How to build a recursive spline function in C++

At the moment I am working on a differential equation solving method called basis-spline collocation. What I am having trouble with is building a method to build an arbitrary order spline, with the ...
5
votes
1answer
379 views

How to transform such an SDP to standard form

I plans to use CSDP to solve the following semi-definite problem: $$\min_{B, \beta}\operatorname{trace}(CB) \\ \text{s.t.} \ \operatorname{trace}(AB)=1 \\ \beta\geqslant 0 \\ \begin{bmatrix} 1 & \...
7
votes
5answers
9k views

Interpolate 2D data

I generated a cartesian grid in Python using NumPy's linspace and meshgrid, and I obtained some data over this 2D grid from an ...
4
votes
1answer
4k views

Fenics: Meshfunction usage

I am confused most of the time with the application of boundary conditions in Fenics. Suppose I have an xml mesh for a rectangular beam and want to apply Dirichlet BC ($u =0$) on the left side of the ...
6
votes
1answer
429 views

Reference BLAS/LAPACK from NETLIB is twice as fast as MKL for complex numbers

I'm solving the Helmholtz equation using PETSc. I found with the PETSc configure option --download-f-blas-lapack my program runs twice as fast over running it with ...
3
votes
0answers
146 views

Explanation of LidarBoost Algorithm?

I am trying to understand the LidarBoost algorithm as explained in this paper (PDF warning). My apologies if this isn't the appropriate exchange; I've posted in DSP, but I didn't get a response there, ...
8
votes
0answers
413 views

Simple turbulence model appropriate for buoyancy-driven cavity like problem

Which turbulence model is suitable for resolving incompressible buoyancy-driven flow of a fluid within an cylindrical ampoule? I prefer turbulence model which is sufficiently simple so that fully ...
1
vote
1answer
183 views

How to setup a Neural Network?

I have a completely beginner question about the setup of artificial neural networks. Basically it boils down to: How do I put in data and get results? For example, classification: let say I have ...
3
votes
1answer
477 views

Fenics: time-independent Sine-Gordon equation

Is there a code for the equation $$ \frac{\partial^2u}{\partial x^2}+\frac{\partial^2u}{\partial y^2} = \sin(u) $$ or for the sine gordon equation in two dimensions because I want to change some ...
5
votes
1answer
862 views

Compute lengths of the longest edge of each cell

Having mesh = UnitSquareMesh(2, 2) Q = FunctionSpace(mesh, 'DG', 0) this works as expected ...
8
votes
2answers
3k views

Genetic algorithm vs conjugate gradient method

I am trying to optimize some force-field parameters in a molecular framework so that the result of simulation comes as close as it can to the experimental structure. In the past, I have written a ...
3
votes
2answers
412 views

Trajectory Planning: Polynomials as universal, integrable approximation functions?

I'd like to program a trajectory planner, let's say for a robot, and I can pass acceleration commands to the robot, the robot can move in one dimension. The outcome of the planner is now a vector with ...
0
votes
1answer
402 views

SVD regularization - ray 2D tomography

Sunny day today, isn't it? Please, I need help with my problem. I have written a program to do 2D ray tomography, according to this paper. For the result, I use formula (4.15) from the paper. Now I ...
-3
votes
1answer
634 views

Fenics : boundary condition

`I am working on a problem found here " http://www.caesarsystems.co.uk/NAFEMS_benchmarks/le10.html" ..I am really confused about the boundary conditions and tried my level best to compute it but ...
5
votes
1answer
123 views

The etymology of “Umbrella Sampling”

I am just wondering where the term Umbrella Sampling came from. Is there another meaning of literal "umbrella" in physics or mathematics?
2
votes
0answers
697 views

How to apply periodic boundary conditions to a Raviart-Thomas finite element space in Fenics? [closed]

I'm trying to use periodic boundary conditions within a Raviart-Thomas finite element space in Fenics (dolfin 1.2.0) in a Ubuntu 12.04 (amd64) machine (with python 2.7). If other FE space is used, ...
7
votes
1answer
595 views

Conservative finite-difference expression for the advection equation

Following on from the earlier question I am trying to derive a finite-difference scheme for the advection equation which is conservative. It was suggested that for advection equation with variable ...
2
votes
1answer
831 views

Fenics : Elementwise stress computation

In a elastodynamics problem, I define the stress as def sigma(v): return 2.0*mu*sym(grad(v)) + lmbda*tr(sym(grad(v)))*Identity(v.cell().d) I have computed ...
10
votes
1answer
1k views

Why is it difficult to numerically solve multi-electron time-dependent Schrödinger's equation

It seems that people usually use the Single Active Electron (SAE) approximation to deal with a multi-electron system, transforming the problem into a single electron problem. For example, in ...

15 30 50 per page
1
158 159
160
161 162
183