All Questions

0
votes
0answers
5 views

Numerical integration(principal value)

I need to solve this integral numerically, as you can see, the first term of this integral reduces to a principal value two dimensional integral and a one dimensional integral (due to dirac delta). In ...
2
votes
0answers
9 views

How to show the stability of $L^2$ projection?

If $\mathcal{T}_h$ is a regular and quasi-uniform triangulation of $\Omega$, and $V_h$ is the $H^1$-conforming linear finite element space. Moreover, let $P_h$ be the $L^2$ projection to $V_h\subset H^...
2
votes
1answer
58 views

BLAS operation question

I want to perform the following operation: $$ A = A + U B^T $$ where $A$ is $m \times n$ dense, $U$ is $m \times m$ upper triangular, and $B$ is $n \times m$ dense. The BLAS function ...
-1
votes
0answers
36 views

How to create Delaunay triangulation in C++?

I need some idea for create Delaunay triangulation in C++, without library.
0
votes
0answers
28 views

Monte-Carlo method for action (Solved) [on hold]

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 ...
0
votes
0answers
18 views

Is it more efficient to capture many constraints in one constraint?

I have a number of variables that need to be set to 0. They are positive real numbers so the way I see it I can do this by setting each one to 0 by separate constraints, or I can set their sum to zero....
4
votes
2answers
68 views

Numerical evaluation of a Gaussian Integral in Python?

Goal I'm trying to write code to compute the normalized Gaussian in the following, $$ \begin{equation} \int_{-\infty}^{\infty} \frac{1}{ \sigma \sqrt{2 \pi}} \exp\bigg( - \frac{(x - \mu)^{2}}{2 \...
2
votes
2answers
38 views

Good references for dual-weighted residual (DWR) method for goal-oriented adaptive mesh refinement (AMR)

Can anyone help me with good references (books or papers) where I can learn about dual-weighted residual (DWR) method for goal-oriented adaptive mesh refinement (AMR)?
2
votes
1answer
47 views

In iterative methods, are matrix decompositions considered useful for implementation?

When we study an iterative method from textbooks, for example, see the Gauss-Seidel Method, the given matrix is decomposed with suitable splittings. In the example, $A = L+U$. So we can proceed with ...
0
votes
0answers
13 views

How to use Wolfe-Powell step-size control in Quasi-Newton method?

I'm trying to find the minimum of a function using the Quasi-Newton Method with the BFGS algorithm. But I want to change the following implementation, so that: 1) Wolfe-Powell step-size control is ...
3
votes
0answers
32 views

Constraint solver vs Bayesian optimizer for fast discontinuous processes

I have a complex domain-specific process that accepts inputs: 10-500 inputs, where each input is of type: enum: choice between multiple string or numeric values int: integers float: floating point ...
5
votes
1answer
51 views

What are systematic ways of approximating a non-smooth (non-continuously differentiable) system dynamic to be n-smooth?

I have a system dynamic that is non-smooth because it has several signum and absolute value functions in it (three-tank level control). I can obviously choose different sigmoid functions to ...
0
votes
0answers
78 views

Super Computer cluster service for students [duplicate]

I would like to ask whether there is a free of charge supercomputer for students, in my current institution they don't have a supercomputer, I am running MD simulations, I would be grateful for ...
-1
votes
0answers
23 views

Alternative to Fabric Mechanics DFMA

I would like to ask if there an alternative to DFMA fabric mechanics software for FEM modelling and maybe this software using MD as well, but I am not sure. For more details: DFMA stands for Design ...
2
votes
1answer
34 views

Computing face fluxes in FVM

In FVM, we have to compute fluxes at some face of a cell. There are many ways to compute this face flux value, but the most common and easiest way involves some simple averaging at the face. However, ...
7
votes
0answers
59 views

How to construct an effective preconditioner for this particular problem

A quick introduction to my problem I am currently developing a method for simulation of water waves in three dimensions based on potential flow theory. The computational bottleneck of the method is ...
1
vote
0answers
57 views

Best optimizer for unconnstrained non-convex nonlinear least-square optimization problem?

I am looking for a very good optimizer to the following problem: $$\min_{P,\Theta}\lVert APD(\Theta)P^{-1} -B \rVert_F$$ where $A,B \in \mathbb{R}^{n\times m}$, $P \in \mathbb{R}^{m\times m}$, $D\in \...
7
votes
1answer
135 views

Spectral Element vs Finite Element

I am trying to understand the difference between SEM and FEM. If I go by this paper, spectral element methods are a subset of FEM methods and the only difference lies in the choice of basis functions. ...
5
votes
2answers
301 views

Python: vectorizing a structured linear system solve

Overview I am looking for a way to solve a structured linear system in Python without using a for loop (preferably using vectorization, if possible). Background Consider the following linear system:...
3
votes
1answer
66 views

Doubt about Python code for calculation of Energy Conditions in General Relativity

In General Relativity, one possible way to decide if a space-time [i.e. a Lorentzian Manifold $(\mathcal{M}, \textbf{g})$ where $\textbf{g}$ is an arbitrary metric tensor.] is a "resonable physical" $[...
2
votes
1answer
65 views

Inverting a matrix from LU decomposition

The LAPACK routines xGETRI compute the inverse of a matrix $A = PLU$ in its LU decomposed form by first computing $U^{-1}$, and then solving the system: $$ (A^{-1} P) L = U^{-1} $$ My question is: ...
-2
votes
0answers
52 views

How to find the roots for this equation

I am new using Matlab. I am trying to find the roots for an effective permittivity equation in two forms: Quadratic and Nonlinear and it Should have the same solution. Any suggestion on how to solve ...
4
votes
1answer
115 views

Fast and free server for computing

I have to calculate a huge differential equation. With my laptop, it's going to be computed for several days. Is there a free (I need just for 3 days) fast server for scientific calculations? My ...
5
votes
2answers
73 views

Computing a ratio of exponential functions without overflow issues

I'm interested in computing pointwise values of the function $u(x) = \sinh(k-kx)/\sinh(k)$ for $x \in (0,1)$, where $k = 10^{4}$. A direct computation of course results in overflow issues due to the $\...
3
votes
2answers
99 views

Electromagnetism FEM (FEniCS) interpolation - leakage effect

As for the background of what is going on: I'm using FEniCS that is dedicated FEM solver The problem I'm solving is magnetostatic problem where the governing PDE is $$ \bf{\nabla} \times \frac{1}{\mu}...
4
votes
1answer
77 views

$L^\infty$ stability property of an ODE

Suppose we have the initial-value problem on $(0,L)$: $$ \frac{d u(x)}{d x} = f(x) u(x),\, \qquad x\in\Omega,\,~~ u(0) = u_0, $$ I am reading a claim that says if we multiply the ODE by $u$ and ...
1
vote
1answer
56 views

Split solution of FEM problem depending on number of DOF

Assume we have a 3D finite element structural problem discretized with hexahedral elements with 8 nodes and 3 degrees of freedom per node. Instead of solving the global stiffness matrix system for all ...
0
votes
0answers
61 views

Trouble with creating correct element matrices in Finite Element Analysis for a cantilever beam

I'm trying to solve for displacements of a cantilever beam numerically with FEA. The beam is modeled as a 3D-solid made up of a set of 8-noded hexahedral elements, which are in their undeformed state, ...
2
votes
1answer
43 views

Blowup of error in Conjugate Gradient method with periodic Dirichlet Poisson matrix

My problem is that the L2-Norm of the residual for the periodic Poisson matrix $P$ is initially decreasing but starts to blow up after a certain number of iterations. The blowup happens earlier the ...
2
votes
1answer
60 views

Graphing electric potential of a ring of charge using MATLAB help

Here is a summary of what I am trying to do: Use MATLAB to compute the potential $V$ at any point $(x, y, z)$ in space due to a uniform ring of charge. Use a Riemann sum to compute the integral with ...
0
votes
0answers
40 views

Optimization (best input variables search) for a non-smooth non-linear unknown function

I am trying to optimize a system that monitors and advises a user multiple times over a certain period of time depending on changing outside factors. The systems behavior can be altered by 5 ...
0
votes
1answer
51 views

How to use LAPACK function (DGELSY) in Fortran

I am trying to use Least Squares Minimization to solve a the matrix problem: b = A*x for x. The system is overdetermined, and A is a dense matrix. In the LAPACK library, I believe the routine DGELSY ...
0
votes
0answers
23 views

Execution time of cumulative integral

In Matlab, we have the cumtrapz function, which returns the approximate cumulative integral of y: I = cumtrapz(x,y) This ...
1
vote
1answer
59 views

Solving nonlinear PDE with finite difference based on Newton-Krylov

I am now working on solving MHD equations with finite difference method, which include nonlinear equations: $$ \frac{\partial\rho}{\partial t}+\nabla\cdot\left[\left(\rho_0+\rho\right){v}\right]-\...
-1
votes
0answers
33 views

Meshing Fabric Error

Disclaimer: I am newbie at meshing, however, I stumble in a problem that I cannot solve. I have reproduced modeling of woven T-Yarn and Knitted S yarn from YouTube tutorials (1, 2). Later, I have to ...
1
vote
1answer
49 views

Is there any fundamental difference between meshing for FEM, FVM and FDM?

I am a novice to the field of computational science and have just started studying the FDM and FEM (haven't started on FVM yet). While trying the understand the subject I got this question and trying ...
0
votes
0answers
25 views

Testing the SUPG method and other methods for hyperbolic equations

I am interesting in integrating the simple equation $$ \frac{\partial \phi}{\partial t} + \mathbf{u}\cdot\nabla \phi = 0 $$ with a Dirichlet boundary condition at the influx boundary ($\mathbf{u} \...
0
votes
1answer
33 views

Computing excited states using itensor (with DMRG)

I am trying to compute first few excited states of some Hamiltonian (I am using itensor and its DMRG algorithm). To do so, I am ...
0
votes
0answers
21 views

Reduce projection error while retaining similar amount of elements in CG-FEM

Based on the answers I got to my questions (Interpolation of function onto mesh gives different results, depending on mesh density and Solving a non-linear heat equation with the galerkin method gives ...
0
votes
0answers
25 views

How can I implement the Invaded Cluster Algorithm for a network of Ising spins?

My primary concern is about finding the percolating cluster for any given network. For a lattice it is straight forward : When the size of a cluster reaches the length of the lattice, then it is said ...
0
votes
0answers
23 views

Numerically computing deflection due to thermal expansion

Using linear elasticity formulation, I am attempting to numerically compute the displacement due to thermal expansion. This is done for a 3-D isotropic material. The governing equations are simply: ...
11
votes
3answers
2k views

Mathematically, why does mass matrix / load vector lumping work?

I know that people often replace consistent mass matrices with lumped diagonal matrices. In the past, I've also implemented code where the load vector is assembled in a lumped fashion rather than an ...
2
votes
1answer
59 views

Re-using LU factorization within iterative (?) setup for a sum of two matrices

So, I would love to make at least some use of my preexisting data, no matter how small, and just out of ideas. Maybe I am just a prisoner of a Kahneman-like theatre-ticket paradox, and don't know ...
2
votes
1answer
39 views

Symplectic linear multistep method?

I'm doing a gravitational n-body simulator and I'm thinking of implementing linear multistep methods like Adam-Bashforth. But is there any symplectic multistep methods?
1
vote
1answer
43 views

Isotropic thermal expansion

I frequently see the equation $$ \sigma_t = E\alpha \Delta T $$ as the equation for thermal stress. Where $E$ is Young's modulus, $\alpha$ is the CTE, and $\Delta T$ is the change in temperature. ...
2
votes
1answer
79 views

What method of Finite difference is this?

I am reviewing Numerical Recipes method on solving ODEs via relaxation (Chapter 18.3 in the 3rd edition) and they chose a finite difference method I am unfamiliar with (Equation 18.3.2): \begin{...
10
votes
3answers
196 views

Numerical evaluation of highly oscillatory integral

In this advanced course on applications of complex function theory at one point in an exercise the highly oscillatory integral $$I(\lambda)=\int_{-\infty}^{\infty} \cos (\lambda \cos x) \frac{\sin x}...
2
votes
1answer
71 views

GMRES vs Newton-GMRES for Solving nonlinear PDE's

Often when numerically solving nonlinear PDE's using method of lines approach with an implicit integrator a system of nonlinear equations have to be solved. To be more specific, let's say we have ...
0
votes
1answer
36 views

Interpolating the gradient of a cylindrically symmetric potential field that's 'supposed to' obey the Laplace equation?

The script below tries to implement a Jacobi iterative relaxation of a potential field for an electrostatic lens. It's hot-off-the-press and I've just started to debug and look for things to test it ...
0
votes
1answer
34 views

How to do Weierstrass-transform in MATLAB?

I have a diagonalization problem. I have the eigenstates correctly, and I want to do a Gaussian-smearing (Weierstrass-transform) on them. So I have the wave functions ($\Psi$), and the continuous ...

15 30 50 per page