All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
17 views

2-norm and infinty norm of a system in controls

How to compute 2-norm or infinity norm of following system? i am confused whether to calculate using simple matrix theory "where it don't regard for s domain" or H2 and H-infinty norm. ...
2
votes
1answer
565 views

How can I evaluate more accurate energy eigenvalues from Schrodinger equation using shooting method?

I am trying to use the "shooting method" for solving Schrodinger's equation for a reasonably arbitrary potential in 1D. But the eigenvalues so evaluated in the case of potentials that do not have hard ...
1
vote
1answer
110 views

Material properties for a node in a 2-material FEM code

I'm trying to debug an FEM that I inherited, and I unfortunately do not have much knowledge of FEM. I only know FD and FVM. If you're modeling a system with 2 materials, there will be an interface ...
3
votes
0answers
29 views

Solving multiple linear regression in parallel

I am working on a problem where I need to solve approximately 500 Million Linear Regressions (OLS). What would be the most efficient way to do this (e.g. using GPU or a some framework that can do this ...
0
votes
1answer
128 views

What is difference between L2 norm and H2 Norm?

When someone refers 2-norm of system,L2 and H2 are used interchangeably by author and is rather confusing. Even the matlab has different functions for H-infinity norm and L-infinity norm. as shown in ...
0
votes
2answers
101 views

Need software for generating self-avoiding random walks on a tetrahedral lattice

I am looking for FOSS code that can generate self-avoiding random walk trajectories on a tetrahedral lattice. The purpose of the exercise is to create random conformations of model polymer chains that ...
1
vote
0answers
50 views

Finite Difference Approximation for the Laplacian in 2D that produces a nonsymmetric matrix

Consider the following PDE \begin{align} -\Delta u &= f \ \ \text{en} \ \ (0,1)\times (0,1) \label{P1} \\ u &= 0 \ \ \text{en} \ \partial ((0,1)\times (0,1)) \label{P2} \end{align} if we ...
2
votes
0answers
26 views

How to obtain smallest eigenvalues with Arnoldi iteration

I understand that the Arnoldi iteration produces a basis which tends to include in its span the eigenvectors corresponding to eigenvalues of large magnitude (hence the analogy between the last vector ...
-1
votes
0answers
29 views

Does the leap-frog algorithm conserve energy for n-body problems?

The leap-frog algorithm is able to conserve to a certain extent the energy of a system, which flucutates as a cosine around a stable value. Is this true if we apply the algorithm to a n-body ...
2
votes
2answers
72 views

Time complexity analysis

I want to know the time complexity of following code Say I have a list unique_element[] There is an array which contain elements {4,5,2,4,7,8,1,5,9,8,1} Now as per my code I want to find out the ...
0
votes
1answer
54 views

How to Calculate magnetic and electric field in 2D Magnetotelluric using Edge based Finite Element

I calculate 2D Model of Magnetotelluric responses which are apparent resistivity and phase. I do the calculation for Transverse Electric (TE) mode. Then I used edge based finite element with ...
3
votes
1answer
64 views

Quantify difference between two discrete 1D solutions

I have an ordinary differential equation that is solved as an initial value problem using different numerical schemes. I end up with several discrete time signals that should display a reasonably ...
1
vote
2answers
86 views

what finite elements are stable for the mixed form of the elasticity equations?

The mixed form of the elasticity equations is to find the unique critical point of the Hellinger-Reissner functional $$J(u, \sigma) = \int_\Omega\left(\frac{1}{2}A\sigma : \sigma - (\nabla\cdot\sigma)\...
3
votes
1answer
2k views

Applying Neumann boundaries to Crank-Nicolson solution in python

Consider the heat equation $$u_t = \kappa u_{xx}$$ with boundary conditions of $$u(x,0)=0\\ u(0,t)=100\\ u(l,t)=0$$ Numerical analysis by pyton can be done with ...
0
votes
0answers
39 views

Simulation data from VTK to python

I have run some simulations that give the output data in the VTK format. This is very nice for visualization in Paraview. However, I want to take some spatial Fourier transforms of the data in the VTK ...
1
vote
1answer
98 views

A better word to indicate slowness/high latency?

We are comparing two techniques in computer science. We want to say X has "significantly high latency" when executed on system Y. Is there a better one-word term we can use for the above to ...
5
votes
0answers
127 views
+200

About the condition $\ker(B_h) \subset \ker(B)$ in mixed finite elements formulation

I'm studying mixed finite elements. The problem is a classical saddle-point one: we seek for $(u,p)$ in $V \times Q$: $$A u + B^t p = f$$ $$Bu = g$$ where $A: V \rightarrow V', B:V \rightarrow Q'$ ...
-1
votes
1answer
37 views

Time complexity and its formula

Is there any example support the case of $O(n^k)$ where $k$ has a fixed calculated value for every $n$ and $k$ is not a constant value for all $n$. As $k$ depends on the value of $n$ in polynomial ...
1
vote
1answer
92 views

Locking phenomena for $P1 - P0$ elements

Consider the Stokes problem and the usual divergence operator $B:V \rightarrow Q'$, $\langle Bv, q\rangle = b(v,q)=(\operatorname{div} v,q)$ and its discrete versione $B_h : V_h \rightarrow Q_h'$. In ...
0
votes
1answer
58 views

Finite Difference Method on a function with multiple elements of the same array

First time posting here, so I apologize for any missing info upfront. I am working on a program in VBA that calculates a function (which itself calls another function), then calculates the derivative ...
-1
votes
1answer
27 views

Parameter explained by many distributions

If we had, for example, labeled data, where for each entry (label) we have several data distributions associated to it, how can I get something meaningful from them? Is this a solvable problem? Is ...
2
votes
1answer
111 views

Convolute a gaussian kernel with a large array of off-grid centroids without looping? (how to make “A Thousand (Gaussian) Points of Light” )

For a finite object size diffraction simulator, I need to generate arrays which are the sum of thousands of instances of a Gaussian (or other) 2D kernel at centroids that will not fall in any ...
3
votes
0answers
97 views

Invert a huge sparse operator;

please help me with this question, I want to invert a huge sparse (non-circulant) this below in a $Ax=y$ equation: $$(\lambda I+ \beta D+ \sigma C)x=y$$ where I is an Identity Matrix,D is a Diagonal ...
1
vote
1answer
78 views

Finding the source of numerical instability in a electrostatic problem solved by conformal mapping

I'm using conformal mapping to solve a 2D electrostatic problem (calculating the potential $u(x,y)$ in the plane). Let $C_1$ and $C_2$ be two circles at an electric potential $U_1$ and $U_2$, ...
2
votes
1answer
120 views

Why can bad jacobians sometimes works better for implicit ODE method?

I'm solving a system of stiff ODEs describing atmospheric chemistry and transport. I am using CVODE BDF from Sundials Computing. I have two ways to approximate the jacobian: Allow CVODE to ...
0
votes
0answers
50 views

Finite element method for Stokes and Navier--Stokes with square elements only

I wanted to learn how to implement a code for the Stokes and Navier--Stokes equations 2D/3D. I already know how to implement it when the elements are triangles or tetrahedral. Do exists finite element ...
2
votes
0answers
67 views

Understanding inf-sup conditions for classical saddle point problems

I'm studying the inf-sup conditions for saddle point problems. I'm referring to the usual one $$\begin{cases}Au + B^t p = f \\Bu=g \end{cases}$$ In the book I'm using (Ern - Guermond: Theory and ...
1
vote
0answers
78 views

Matlab - Equality between 2 Fisher matrices constructed in a different way

I want to know if, on a Fisher matrix, the projection operation (with a Jacobian matrix) commutes with a matricial inversion operation. The 2 ways to build these 2 matrices are: 1) First method: 1.1) ...
3
votes
1answer
263 views

Calculating Error for Poisson Equation using Successive Over-Relaxation technique, Python

I am trying to solve the Poisson Equation $\frac{\partial^2 T}{\partial x^2} + \frac{\partial^2 T}{\partial y^2} = 32(x(x-1) + y(y-1))$ for a 61x61 grid using Python3 with boundary conditions being $T=...
4
votes
0answers
102 views

Optimization problem

In the expression: ${\underset{\Omega}{\min}\left\|\beta A\Omega^{-1}B+C\right\|_{F}^{2}+tr(W\Omega^{-1}W^T)},$ s.t. ${tr(\Omega)=1, \Omega \ge 0}$, where any element of ${\Omega}$ is nonnegative. ...
-1
votes
0answers
35 views

Inverse matrix euqation problem with restricted condition

$\underset{\Omega}{min}~\lambda\left\|A\Omega^{-1}B+C\right\|_F^{2}+\beta tr(W\Omega^{-1}W^{T}), s.t. tr(\Omega)=1, \Omega_{i,j} \ge 0$, How to solve this problem with $\Omega$?
1
vote
1answer
303 views

Robin Boundary Condition with Implicit Upwind - Finite Difference Method for 2D Convection-Diffusion Equation

I am trying to solve a problem with 2D Convection-Diffusion equation with U = Concentration ($mg/m^{2}$) using Implicit Upwind Finite Difference Method like this $$ \frac{\partial U}{\partial t} + ...
3
votes
1answer
171 views

Good languages/packages for interior point optimization with non-linear constraints?

I'm currently using Python's scipy.optimize package to perform parameter estimation for a system of 10 ODEs. I have some observed data, and I'm trying to find the set of parameters which makes the ODE ...
3
votes
1answer
121 views

Proof of R. Verfürth paper on adaptive mesh and bubble functions

I'm studying adaptive meshes, and my professor wrote the following property for a bubble function ( see this scicomp post for the definition I'm using)$b_T$ defined on a triangle $T$. $$||b_T \phi ||_{...
1
vote
0answers
64 views

How to generate the convolution of f(x, y) with a parametric function g(t), x(t), y(t) in Python? (Something better than this brute-force sum)

I'd like to know how to convolute $f(x, y)$ with a parametric shape; a 1D distribution along a parametric path as defined by $g(t), \ x(t), \ y(t)$ in Python, resulting in a 2D array of $f * g$. A ...
4
votes
1answer
158 views

Learning computational science through guided discovery

I am currently trying to get through Pattern Classification by Duda et al (for a course). However, the book seems too dense for me. Pattern recognition seems like a topic that could be better learned ...
0
votes
0answers
31 views

Using chebfun to solve 1D system of pde [closed]

I am tring to use chebfun to solve the following system of equation: \begin{cases} v_t+u_x+(uv)_x+au_{xxx}=0\\u_t+v_x+(u^2/2)_x+cv_{xxx}=0\end{cases} I mimic the code for the scalar PDE, here is what ...
6
votes
6answers
5k 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 ...
1
vote
2answers
161 views

Sum of norms over elements is not equal to norm over the whole $\Omega$

In my finite element notes, after the proof of the global estimate for the interpolation error, assuming a regular triangulation with triangles $T_m$: $$\sum_m|v - \Pi_h^r v|_{s,p,T_m} \leq \sigma^{-s}...
-1
votes
1answer
29 views

relres in gmres MATLAB

I think the relres in MATLABis the form that relres = norm(M(b-Ax))/norm(M\b),when it smaller than tol then stop the iteration. I want to know how to change relres to norm((b-Ax))/norm(b). Or use ...
1
vote
1answer
83 views

Solving Poisson-like PDE with FFT

Problem I have an $n\times n$ grid, and each point on the grid is assigned two values: a score, and an (inverse) speed factor. There is a "turtle" moving along the grid, and it's goal is to ...
-1
votes
0answers
17 views

Solve_ivp using timestep

I am trying to compute the path of a charged particle as it moves through a magnetic field. I am currently using a uniform field, but I am going to expand into nonuniform fields later on. The problem ...
5
votes
1answer
221 views

Non-negative least squares with very small numbers

(I have asked this question on StackOverflow previously but it has been pointed to me that CSSE or MSE could be more appropriate) I have to solve a constrained optimization problem of the following ...
1
vote
1answer
131 views

Confusion about bilinear form for elasticity equation in deal.ii tutorial

I'm learning how to solve vector-valued problems with deal.II library. In particular, I'm looking at the following introduction from the official website https://www.dealii.org/current/doxygen/deal.II/...
0
votes
0answers
42 views

Solve a matricial equation, i.e a system of 16 equations with 16 unknown : Error when call solve function [closed]

I wonder under which conditions I could have equality between the 2 matrices 4x4. I build my 2 matrixes from which I would like to get an equality. But to get this equality, I have to solve an unknow ...
1
vote
0answers
44 views

Maximizing $l_1$-normalized entropy using CVXPY

Suppose that $x = (x_1, ..., x_n)$ is a vector of variables and I would like to maximize the Shannon entropy of $\frac{|x|}{||x||_1}$ (i.e. the vector of absolute values of $x_i$, normalized to have $...
-1
votes
1answer
61 views

Apply method of manufactured solution into fractional order compartment model

I am trying to solve a fractional-order 2-compartment model using the method of manufactured solution (MMS). I do understand the concept of MMS, but I am not sure how to come with a Mathematica code ...
2
votes
0answers
64 views

Efficient solver of a Integer programming

I am solving an Integer programming using MATLAB, yet the efficiency is low. Here is the problem: Suppose $v$ is a $N \times 1$ vector. For $v_i \in v$, $v_i \in \{0,1\}$. $D$ is a 0-1 matrix, which ...
4
votes
1answer
134 views

Discrete divergence free functions

I'm studying the weak formulation of NS equations. During the analysis, the book I'm using (Quarteroni-Valli, page 301-302), defined $$Z_h=\{v_h \in V_h: (\operatorname{div}(v_h),q_h)=0 \quad \forall ...
0
votes
1answer
64 views

Looking for Partinioning Algorithms allowing for Constraints

What algorithms exist that partition the domain according to a black box evaluation function (possibly subject to some assumptions)? Examples Simple Example To better exaplain we consider as our ...

15 30 50 per page
1
2 3 4 5
195