Most Popular
1500 questions
8
votes
2 answers
Programming Finite Element Methods in C++
I am trying to develop a library for finite element methods in C++ and for that I am looking at the data structures for meshes. Based on what I've read up on fenics and deal.ii, the general understanding seems to be that a basic mesh class should…
gk1
- 322
- 2
- 7
8
votes
1 answer
How can I tell VASP 5.2 is compiled with FFTW3?
When VASP 5 was released, the performance was mostly slower than our make of VASP 4.6. I wrote it off as an optimization issue, and went on in my life. Then, in VASP 5.2, with the release notes, I realized that the it was all due to slower FFT, and…
Dr_bitz
- 327
- 1
- 9
8
votes
1 answer
Numerical evaluation of an elliptic integral in python
Goal:
I need to evaluate numerically an integral of the following form:
$$
\int_0^\infty \frac{dx}{(a^2+x)\sqrt{(a^2+x)(b^2+x)(c^2+x)}}
$$
where $a,b,c \in \mathbb{R}$ are in the interval $(1,1000)$.
This needs to be done in Python.
Problem:
The…
Eric Kightley
- 364
- 2
- 10
8
votes
5 answers
Some good reading on polygon algorithms
What are some good resources (books, articles, sites) about polygon intersection and union algorithms?
Lev
- 81
- 2
8
votes
2 answers
Initial guesses for perturbed linear systems
Suppose you solve a linear system $Au = f$ by an iterative method, e.g. conjugate gradients or Richardson iteration. Then you try to solve a linear system that is slightly perturbed in the matrix and the right-hand side, say, $\tilde A \tilde u =…
shuhalo
- 3,660
- 1
- 20
- 31
8
votes
1 answer
How to check the correctness of my implementation of a numerical scheme for differential equation
I know the method of constructing solutions. For example I have a BVP:
$$ u_{xx} + u = 0 $$
subjected to:
$$ u_{x}(0) = f_1, $$
$$ u_{x}(1) = f_2 $$
If I want to check the correctness of my numerical implementation, just plug in $u(x) = \sin(x)$ and…
Sohail
- 246
- 1
- 6
8
votes
2 answers
Method to quantify geometric difference of two dissimilar meshes
I am looking for a method or algorithm to produce a value that describes how different two meshes are geometrically but that have different topologies.
An example would be some CAD data that has had an FE mesh applied and the part after it has been…
mcragun
- 83
- 2
8
votes
1 answer
Are there improved method of computing the following expression?
given a symmetric matrix $Y \in \mathbb{R}^{n \times n}$, and an arbitrary matrix $X \in \mathbb{R}^{n \times n}$, and a vector $v \in \mathbb{R}^{n \times 1}$, is it possible to compute the following expression in $O(n^2)$ time?
$$diag(X^TYX) \cdot…
John Smith
- 241
- 1
- 2
8
votes
3 answers
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?
EDIT: Since Bill Barth's answer raised some questions I want to make some remarks:
Passing argc/argv is not required since MPI 1.1.
The question is…
gnzlbg
- 1,075
- 10
- 18
8
votes
2 answers
How to plan & incorporate project management tools into research code
I'm entering my 3rd year of my PhD program, and up until now my research code (numerical inverse problems/medical imaging/image processing/etc) consists mostly of disorganized MATLAB scripts and functions, with a few MEX'd C++ and CUDA routines…
icurays1
- 423
- 2
- 9
8
votes
2 answers
Choosing epsilons
Most numerical algorithms require an epsilon to be chosen in order to be robust and provide meaningful results. Choosing machine epsilon is usually too aggressive. Barring any special knowledge about your problem, one rule of thumb I remember is…
Jay Lemmon
- 583
- 3
- 10
8
votes
1 answer
Finite element convergence rates for mixed problems
I've coded up a Stokes Flow problem using finite elements and am in the process of verifying that it works. I'm just not sure what convergence rate I should be expecting as I globally refine the mesh.
I know for scalar problems using linear basis…
Lukas Bystricky
- 615
- 5
- 13
8
votes
4 answers
How to efficiently assemble global stiffness matrix in sparse storage format (c++)
I am writing a finite element solver in C++. The main bottle neck is assembling the global stiffness matrix in sparse compressed row storage (so far I am only solving steady problems). Because I don't know how many nonzero entries exist in each row,…
James
- 1,889
- 1
- 16
- 31
8
votes
1 answer
What's the right way to compare vectors in floating-point?
I know that I should use a tolerance for comparing floating point numbers. But for comparing vectors, I can think of 3 possible solutions corresponding to different distance metrics:
Compare the components of each vector individually: the vectors…
japreiss
8
votes
1 answer
C++ library for graphs with maximum common subgraph solver
I'm looking for a convenient, free C++ library for graphs that include a solver for the maximum common subgraph (MCS) problem.
I'm aware of the
Boost Graph Library
and
LEMON
, but neither includes an MCS solver.
Deathbreath
- 1,042
- 7
- 20