Most Popular

1500 questions
7
votes
2 answers

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 outside the cylinder as well. Therefore I have…
facetus
  • 358
  • 2
  • 8
7
votes
1 answer

Jacobi preconditioner not reducing condition number?

Let's say you have a general matrix $A$, with diagonal entries $a_{ii} = d>0$. (No assumptions are made about the off-diagonal elements.) Then Jacobi preconditioning doesn't improve condition number, because $$ \kappa(A)=…
user14717
  • 2,155
  • 13
  • 14
7
votes
2 answers

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,y_2), (x_3,y_3) \dots (x_N,y_N)$. If I want to find an approximate solution $y$ at a…
John Alexiou
  • 543
  • 6
  • 13
7
votes
3 answers

Tutorial for flow around a cylinder in FEniCS

I am continuing my dive into computational fluid dynamics. I would like to build a simple test case for modelling the flow around a cylinder in FEniCS and then continue to model turbulence in order to observe the Karman vortex street. I am a newby…
seb
  • 994
  • 1
  • 9
  • 22
7
votes
2 answers

Reference implementation of Nédélec-Elements

Does anybody know of an implementation of Nédélec elements that does not come along with a huge bulk of additional software? Is there a small library written in a language like Python, Matlab, or Octave? The only implementations I know of are part…
shuhalo
  • 3,660
  • 1
  • 20
  • 31
7
votes
1 answer

Solving Coupled ODE eigenvalue problem

I've been trying to find some resources that would help me figure out how to numerically solve a coupled system of ODEs which is also an eigenvalue problem. The system is something like: $ \tag{1} \kappa h_2(r) +\kappa r h'_2(r)+ (1+\kappa) W_3(r)…
tau1777
  • 451
  • 2
  • 5
7
votes
2 answers

FEniCS: separate boundary conditions in normal and tangential direction of mesh boundary

Given a vector-valued PDE, I'd like to enforce the boundary conditions $$ \vec{n}\cdot u = g\\ \vec{n}\cdot \nabla (\vec{t}\cdot u) = 0 $$ on the solution $\vec{u}$. If the boundary happens to align with one of the coordinate axes, I could use bcs =…
Nico Schlömer
  • 3,126
  • 17
  • 36
7
votes
2 answers

Caching mechanism

I've been having problems designing an effective caching mechanism. The mechanism is to be used as part of a project developing scientific software. The goal is to save computation time by loading results of identical computations done in the…
Ofer
  • 173
  • 3
7
votes
4 answers

When analyzing a parallel algorithm, how do you take communication costs into account?

My question is related in spirit to "Is algorithmic analysis by flop counting obsolete?". Counting the number of computational operations in an algorithm is commonly used as a first-order model to aid in understanding the computational costs of an…
Geoff Oxberry
  • 30,394
  • 9
  • 64
  • 127
7
votes
1 answer

Biconvex optimization problems

Consider minimization of a biconvex function over a biconvex set. Is the biconvex optimization problems polynomially solvable?
Star
  • 575
  • 4
  • 13
7
votes
1 answer

method of frozen coefficients and its relation to von Neumann stability analysis

I am considering two equations $$u_t=a(x)u_{xx}$$ and $$v_t=b(x)v_x$$ as classical representatives of the parabolic and hyperbolic family of equations. If $a(x)=a$ and $b(x)=b$ were constants, to show stability of any finite difference scheme I use…
Kamil
  • 1,206
  • 11
  • 23
7
votes
1 answer

Differences between "least square", "mean square" and "least mean square"?

I was wondering what differences are between the terminology: "least square (LS)" "mean square (MS)" and "least mean square (LMS)"? I get confused when reading in Spall's Introduction to Stochastic Search and Optimization, section 3.1.2 Mean-Squared…
Tim
  • 1,281
  • 1
  • 12
  • 27
7
votes
2 answers

Which is easier to solve, regularized minimization, or constrained minimization?

Following regularized minimization problem $$\min f(x) + \lambda g(x)$$ where $\lambda>0$, and following constrained minimization problem $$ \min f(x) $$ s.t. $$ g(x) \leq \epsilon $$ where $\epsilon>0$, can be converted to each other so that they…
Tim
  • 1,281
  • 1
  • 12
  • 27
7
votes
4 answers

How to find more than one root of a polynomial?

This program finds the first root of the function f, defined in the code. There are 5 roots of this function. (x=1,2,3,4,5) I wish to find all of the roots in this program and print them to the screen. In the main function, you can see that I have…
flamingohats
  • 309
  • 4
  • 8
7
votes
2 answers

Why is the Dual problem preferred for Maximal Margin Classification?

The primal problem is $$\min_{w,b}\frac{1}{2}w^Tw$$ $$s.t. f_i(w)=1-y_i(w\cdot x_i+b)\leq0$$ Where $y_i=\pm1$. Instead of using Gradient Descent directly, the dual is usually…