All Questions

Filter by
Sorted by
Tagged with
1
vote
1answer
36 views

How to evaluate the average value of a polynomial inside the triangle area in finite volume sense?

Consider we have a linear bivariate polynomial: $$p(x,y)=ax+by+c.$$ To construct the linear polynomial using least square method, we need to evaluate the value of the average polynomial $p$ in at ...
0
votes
0answers
24 views

Mesh transition between beam and shell element types

I am using NASTRAN solver & FEMAP as preprocessor for reduce modelling of wing using 1D and 2D finite elements. Beside transition of 1D & 2D elements to 3D, I had not found any method/solution ...
2
votes
3answers
62 views

How are the classical set of equilibrium equations for linear elasticity derived?

In linear elasticity, the governing PDE is the equilibrium equations (absent of vibration considerations): $$ -\nabla \cdot \sigma = F $$ Is this equation simply derived from the sum of forces and ...
1
vote
1answer
53 views

How to compute the $L^{2}$ error of the gradient in the Finite Element Method

Let $\Omega\subset \mathbb{R}^{2}$ and $\tau_{h} = \{\Omega_{k}\}_{k=1}^{N}$ be a triangulation of $\Omega$. The $L^2$ error for a FEM approximation $u_{h}$ is given by: $ || u-u_{h} ||_{L^2} = \sqrt{ ...
2
votes
1answer
81 views

C or fortran library to solve linear 2D/3D elliptic PDE

I am looking for a general purpose library which can solve a 2D or 3D linear elliptic PDE on a rectangular domain with mixed/Robin boundary conditions. I am a C programmer, so I would prefer a C ...
4
votes
1answer
153 views

Scipy Spline Interpolation Parameter

Documentation in scipy.interpolate (found at https://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html) states: "The parameter variable is given with the keyword argument, u, which ...
0
votes
0answers
47 views

Formula for overdetermined logical matrix pseudoinverse not requiring SVD?

In https://commons.wikimedia.org/wiki/File:YI_%3D_PI.png, you will find a formula-based solution for an overdetermined logical matrix pseudoinverse. This simple formula gives the same result as the ...
0
votes
0answers
49 views

Solving 1D wave equation with finite difference method

I've written a code in Python to solve the 1D wave equation with the finite difference method (the explicit and the implicit methods). I'm trying to perform a mesh convergence study to estimate the ...
4
votes
1answer
61 views

trilinear hex elements

Do the faces of tri-linear hex elements have to be planar? Three nodes define a plane. If the fourth node does not lie on the plane, then the nodes are not planar and the face is not plane. In general,...
3
votes
0answers
39 views

Choice of iterative solver for a sparse asymmetric matrix with symmetric structure

I have a sparse $nxn$ matrix A with pretty interesting structure. It has a block structure with symmetric structure but asymmetric blocks. Expressed mathematically $A_{jk} = A_{kj}$ but $A_{jk} \neq ...
3
votes
1answer
167 views

'Eigen' matrices with static dimension

I noticed that 'Eigen' matrices with dynamic dimension are less efficient than the matrices with static dimension. My algorithm uses a lot of matrices which don't need to be resized, so I wanted to ...
2
votes
1answer
54 views

Cauchy Lorentzian simulation on FFT with oscillation

Recently I do simulation on Lorentzian Function with FFT Lorentzian Function is 2a/(x**2+a**2) ...
-1
votes
0answers
14 views

how to compute the computational complexity of cellular neural networks?

Anyone, please help us that how to compute the computational complexity of the dynamic state of the single-cell and total cells for the 2D-CNN (two-dimensional cellular neural network). 2D-CNN of M * ...
2
votes
3answers
100 views

Create a sparse matrix

I am writing a FE program which calculates the displacements under a uniform load. I want to store the stiffness matrix in sparse form(COO) without using an external library.Assume an upper-bound for ...
0
votes
1answer
44 views

How can I color my Mandelbrot set like this?

I have a background image of a fractal on my phone that I would like in a higher resolution with super sampling, and decided to write my own program for it. I've got down rendering a Mandelbrot set, ...
0
votes
0answers
13 views

Minimal covering of rectangle with fixed, overlapping rectangles

A finite set $R$ of fixed, axis aligned 2-D rectangles $r_i=\left\{x_{0i},y_{0i},W_i,H_i \right\}$ is given. These rectangles are potentially overlapping. Given a new axis aligned rectangle $t$, I ...
0
votes
1answer
45 views

Linearization of Remez algorithm rational case

In the rational case, we are interested to find polynomials $P(x)$ and $Q(x)$ s.t. $f(x_k)-P(x_k)/Q(x_k)=(-1)^kE$ for $k=1,2,\ldots, N$ where $N=deg(P)+deg(Q)+2$ This can be rewritten as $$ (1)~~~~~~(...
1
vote
1answer
22 views

can you give me some information of tools for load reblance

I want a tool for load rebalances. I have a distributed grid. Each process can handle a part of the global grid. Each process has a different node and I want to rebalance it. I want a tool that can ...
1
vote
1answer
49 views

Define continuous, non-analytical pdfs in python

I am planning to do some basic algebra on continuous, non-analytical random variabels. I want to define their probability density functions as arrays x and f(x). Yet, I was surprised to find out that ...
3
votes
1answer
36 views

Python documentation on creation of an exponential random variable

I didn't really know if this stack was the right place to post but I was reading the documentation for creating an exponential random variable in numpy. But isn't there a typo. Like shouldn't it be : $...
3
votes
2answers
191 views

Computing numeric derivative via FFT - SciPy

I wrote the following code to compute the approximate derivative of a function using FFT: ...
2
votes
0answers
67 views

If dot product is commutative, why does MATLAB give different answers?

Why does the dot() function in MATLAB return different expressions based on the order in which I pass vectors?
2
votes
0answers
37 views

In sights into why higher order finite differencing method leads faster to instability

I was playing around with numerically solving the 1D wave equation with density and stiffness varying with position using central differencing methods and noticed that for certain discretization steps ...
5
votes
6answers
3k views

What is the difference between MATLAB and FORTRAN?

In our university some Ph.D students for computational methods prefer FORTRAN over MATLAB. I can't understand why? What is the difference between them when are used in computational methods like ...
0
votes
1answer
101 views

how to Implement linear tetrahedral elements for finite element computations?

I am trying to implement 3D tetrahedral elements in my finite element code (which works fine for linear triangles and quadrangles in 2D). But my simulations are crashing with tetrahedral elements. My ...
3
votes
0answers
61 views

Construction of Prolongation and Restriction Operator for Geometric Multigrid (2D-FEM): Resulting in a Decreasing Solution

Consider the following problem, $$ -\Delta u(x) = f(x), \qquad x \in \Omega \\ u(x) = 0,\qquad x \in \partial \Omega$$ with $\Omega = [0,1]\times [0,1]$ being the domain and $\partial \Omega$ being ...
7
votes
2answers
3k views

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 ...
3
votes
1answer
401 views

General case Kutta condition

I'm working on a 2D inviscid fluid simulation using a "panel method", with Potential being used to enforce the no-through boundary condition. I'm trying to incorporate the Kutta condition, which says ...
1
vote
1answer
56 views

Where could error terms that blow up in SWE come from?

I have been working on a solver for shallow water equations with reflective boundary conditions. I have found that it diverges very fast. As a workaround I noticed yesterday that if I smooth the ...
0
votes
1answer
77 views

Solving an ODE using odeint in Python and continuing the integration

The following relates to the linked question: Scattering of waves in a symmetrical potential (using python) I have attempted to solve the problem for $U(r)$ using ...
7
votes
0answers
162 views

fastest way to compute many small dot products

I have two n-by-3 blocks contiguous in memory ("n vectors of length 3") and I'd like to compute the dot product between each of the rows as fast as possible. In numpy, using ...
4
votes
1answer
103 views

When does L-BFGS outperform GD?

In practice, L-BFGS is frequently held comparably to other inexact QN methods, and it provides a middle ground of sorts between Hestenes–Stiefel CG and BFGS as memory goes from zero to infinity (...
1
vote
2answers
168 views

Does LAPACK offer routines for Krylov sub-space based solvers and nonlinear solvers?

I have skimmed through the LAPACK user guide, but I could not find if LAPACK offers routines for Krylov Subspace based methods (such as CG or BiCGSTAB etc) and Newton method based nonlinear solvers. ...
1
vote
1answer
63 views

Heineken Virus C program ( how to simplify and discard else if in my code) [closed]

So I have a question about simplifying my C code , This is the question : A pandemic of the Heineken virus is underway in Croatia and around the world. The National Civil Protection Headquarters plans ...
1
vote
0answers
51 views

Finite volume reconstruction techniques

For a cell-centered finite-volume calculation, with a nontrivial stencil (either using an unstructured grid or a strongly non-uniform structured grid), what are the main techniques for reconstruction ...
0
votes
1answer
56 views

SciPy odeint fails in unpredictable ways on deterministic system of ODEs

I've been trying to solve the following (relatively simple) system of Lotka-Volterra ODEs in Python using SciPy's odeint: $$\dot{z_1} = z_1 \left(- \sigma z_1 + \sigma z_2 + \rho z_3 - z_4 - z_5\right)...
0
votes
1answer
108 views

Iterative single variable solutions in large linear systems

I have a system where $A$ is a large $n\times n$ marix with fast MVMs. It may have many nonzero entries (albeit in a structured way so as to allow fast MVMs), and is not necessarily diagonally ...
5
votes
1answer
97 views

Solving $AX+X^TB=C$?

Is there a name/standard algorithm to solve the following equation for $X$? $AX+X^TB=C$ Matrices $A$,$B$,$C$ are dense, diagonalizable, nearly singular, about $1000\times 1000$ in size. I've looked ...
1
vote
1answer
45 views

How I can derive the Neuman boundary condition of this system of hyperbolic equations in 1D?

I would like to research the Neuman boundary that can verify the following problem $\begin{aligned} &\text { (} P \text { )}\left\{\begin{array}{l} \frac{\partial U}{\partial t}(x, t)+A \frac{\...
2
votes
1answer
79 views

Diagonalization of Hermitian matrices vs Unitary matrices

What are the general algorithms used for diagonalization of large Hermitian matrices and Unitary matrices? ($>5000 \times 5000$) LAPACK seems to diagonalize Hermitian matrices almost 20 times as ...
1
vote
2answers
1k views

implementation of a simple SPH example

I am currently learning the Smoothed Particle Hydrodynamics method that I need to use later in my thesis. I have studied the mathematics behind the method and I want to code a simple example to show ...
3
votes
2answers
91 views

Compute $tr(A^TBC)$ in Python

I have to compute the trace of the product between three matrices $A,B,C$ in python, i.e. I have to compute $tr(A^TBC)$ and I was wondering what was a good way to do it in Python(here $A^T$ is the ...
0
votes
0answers
20 views

Abaqus approach to simulate many flexible elements

I would premise that i am not an expert on the domain (i am a programmer that usally work with DB and data, not structural problem), but i have just see the work of a friend of mine and i am curious ...
2
votes
0answers
55 views

Explicit DG time step restriction for compressible Navier-Stokes equations

Hesthaven's book 1 mentions the following time step restriction for Navier-Stokes equations (see (7.32) in 2008 edition) $$ \Delta t \approx \frac{h}{N^2} \frac{C}{|u| + |c| + \frac {N^2 \mu}{h}} $$ ($...
1
vote
1answer
36 views

Symmetry in P1 basis elements on a reference triangle in 2D-FEM

I am trying to understand the finite element method and want to apply it to a 2D equation with a triangular mesh. I have chosen the reference element to be the triangle with vertices $(0, 0), (0, 1)\...
2
votes
1answer
90 views

Methodology Suggestion for Wave-propagation Problem using Finite Elements

I want to simulate the propagation of a sinusoidal plane wave in a rectangular domain using Finite Elements Method. First, the wave should propagate through a fluid medium, then it will encounter a ...
3
votes
1answer
108 views

Is upwinding needed for slope limiter / flux limiter and numerical flux?

I have a cell centered cartesian grid and am trying to implement the flux inside the divergence term using numerical flux with a flux limiter. I found different formulas for MUSCL flux limiter, where ...
-1
votes
0answers
23 views

Could anyone illustrate using examples, the difference between machine epsilon and an underflow?

I have recently gotten started on Numerical Analysis and I was hoping that someone could help clarify the idea of these two concepts to me. Using specific examples of floating-point operations that ...
2
votes
2answers
78 views

Different form of the Navier--Stokes equations

Normally I write the incompressible Newtonian isothermal flow Navier--Stokes equations as follows: $$\displaystyle \frac{\partial v}{\partial t} -\nu\Delta v +\color{red}{(\nabla v)v} +...
0
votes
1answer
91 views

What is Voronoi particle tracking?

I've been trying to track this down, but google is giving paywall papers that don't appear to be directly related to computational science, or simply don't explain the source algorithm. There's an ...

15 30 50 per page