0
votes
0answers
12 views

Alternatives to Comsol Multiphysics

This might be a question better suited for the Software Recommendations side of S.E., however I do believe that people who frequent this part of S.E. are more likely to be able to answer this ...
0
votes
0answers
8 views

Lanczos with thick restart

I have been trying to write code for the Lanczos method using a thick restarting scheme as described in this paper. I am getting just ok results for the largest eigenvalues and horrible results when ...
0
votes
0answers
13 views

private register variable | OpenMP [on hold]

Consider, register int a; Does program allocate private register variables to each thread at the clause, ...
2
votes
1answer
49 views

What are the tradeoffs of using statically allocated arrays vs. pointers and dynamic allocation? [on hold]

I am learning Monte Carlo simulation by C++. I begin with reading codes (from the internet and text books) of the 2D Ising model and the XY model. I find some people define spins simply by a two ...
2
votes
1answer
61 views

FEM for a nonlinear parabolic PDE

I'm looking to numerically compute the solution to $$ k(x,u) \partial_t u - \Delta u = f \quad\quad\text{ in } \Omega \times [0,T]$$ where $k$ is a continuous but nonlinear (in $u$) real-valued ...
0
votes
0answers
26 views

Tetrahedron Mesh file format

Ply file formats is used to represent mesh structures.I was referring to the example meshes all of which represent ...
1
vote
0answers
37 views

Speeding up the classical Jacobi method using Scheduled Relaxation method? [on hold]

There has been quite a flutter recently in the iterative world about an algorithm that speeds up the classical Jacobi method by as much as 200 times using a scheduled relaxation method where a ...
2
votes
1answer
28 views

Zero-k mode in Pseudo-spectral solution of Stokes Flow

I'm trying to solve a Stokes flow problem with a pseudo-spectral method in periodic boundary conditions. The equations of interest are $-\nabla^2 \bf{v} + \nabla p = \bf{f} \\ \nabla \cdot \bf{v} = ...
2
votes
2answers
62 views

Large-scale nonlinear optimization problem

I want to solve a nonlinear optimization problem of the following form \begin{equation} min( \sum_i d^{x_i}c_{i})\\ 0 \leq x_{i} \leq a\\ \sum_{i} x_{i} \leq b \end{equation} Note that $a$, $b$, ...
0
votes
0answers
11 views

Windows Forms and C# [on hold]

I am a student and in my university I am currently learning Object Oriented programming but also a little stuff about Windows forms in C# in Visual studio.Do you know any tutorials like books or ...
1
vote
2answers
73 views

Compute accuracy order as mesh gets refined?

I have implemented a FVM code and now I need to plot the accuracy of the method as the mesh gets refined. Having a very fine mesh, my idea is to compare what is the error between the coarser and fine ...
0
votes
0answers
37 views

Tissue deformation Simulation using FEM [on hold]

I need to simulate tissue deformation using FEM. Is it advisable to represent the object as a triangle mesh or a ...
2
votes
2answers
64 views

Neumann Boundary Condition at r=0 in Polar Coordinates (Numerical BCs)

I have asked a question in this regard earlier. I am trying to solve the following equation in Polar Co-ordinates: $$ u_t - (u_{rr} + \frac{1}{r} * u_r + \frac{1}{\theta} * u_{\theta\theta} + bu) = ...
3
votes
0answers
31 views

ENO/WENO component-wise vs characteristic-wise

Can someone give some references to understand what's the differences between a component-wise and a characteristic-wise ENO scheme? If I'm right, the characteristic variables come from the ...
0
votes
0answers
21 views

Explanation of “adda” matrix in LSODI [on hold]

I am trying to solve an implicit DAE system using the LSODI solver of ODEPACK. What I cannot understand is the argument "adda". From the documentation of the subroutine: you must also provide a ...
0
votes
1answer
47 views

Solve eigenvalue problem using finite differences without vectorization

I am interested in solving the problem $-A u = \lambda u$ on a finite differences grid on a square. In my case, the operator $A$ is of the type $-\Delta + \mu I$, where $\mu$ is there to impose some ...
0
votes
0answers
9 views

FPTAS for bin packing [migrated]

If an algorithm for bin packing has a guarantee of OPT(I)+log^2(OPT(I)), then there is a fully polynomial approximation scheme for this problem. I have to prove this statement, but I have no idea ...
0
votes
1answer
43 views

Problem with implementing linear advection using DG-method

I am trying to implement a second order DG-method using a monomial basis and explicit Euler in time. I have written down some of the theory, which I present below: Theory Consider the linear ...
0
votes
0answers
58 views

Finite Difference in Polar Co-ordinates

Background Please note that I am duplicating the question on scicomp. I have already asked this in math. I am trying to come up with a scheme in Polar Co-ordinates for the following PDE: PDE I am ...
5
votes
1answer
90 views
+50

calculating eigenvector components of a given vector

I have some vector $V$ which can be decomposed into the eigenspace of the hermitian sparse operator $M$: $V = \sum_i v_i \hat{m}_i$ Is there a way to find the $\hat{m}_i$ (the eigenvector itself) ...
1
vote
0answers
15 views

infinite but non-periodic space with PMLs in Comsol

I have a problem with implementing proper boundary conditions on sides of my simulation (in RF or WaveOptics module of Comsol). I want to obtain an infinite but not periodic space (beacuse then I will ...
1
vote
1answer
46 views

What is the cost of factorization for one-dimensional sparse problems?

In Golub and Van Loan's book, Matrix Computations, page 606, it is stated that: With standard discretizations, 2-dimensional problems can be solved with $O(n^{3/2})$ work and $O(n \log{n})$ ...
0
votes
1answer
50 views

Deriving the error bound for Bisection Method

This is a homework question, I would like to know if someone can shed some light on it. Let $x_n = \frac{a_n + b_n}{2} , r=\lim_{n \to \infty}x_n$ and $e_n =r-x_n$. Here $[a_n,b_n]$ with $n\geq0$ ...
0
votes
0answers
13 views

Designing a datamodel to use with neural networks in C++ [closed]

After first steps in NN c++-programming I'm looking for an elegant/generic datamodel. My Problem I try to explain by following example: Let's assume a NN described like here with layout ...
0
votes
1answer
38 views

What is Mesh Independence Report?

I am performing analysis on chassis (Static Structural) and for optimization purpose i am asked to generate MESH-INDEPENDENCE REPORT,of which i have no idea. I have tried going through research papers ...
-1
votes
0answers
21 views

Ridge Logistic Regression in R

I wrote code for Iterative Newton Raphson for logistic regression. Now I need to use the Ridge logistic regression. Any help to edit the code to have the coefficients after applying Ridge. And the ...
2
votes
1answer
47 views

Efficient Successive Over Relaxation using Cuda?

I recently implemented Successive Over Relaxation using Cuda as a part of my course project and was curious to know how I can make the code more efficient. I'm using Red/Black SOR scheme which is ...
1
vote
0answers
57 views

Solving a Nonlinear BVP using Finite Difference Method

I am trying to write a code to solve a nonlinear BVP using the Finite Difference Method. The BVP is: $(T^2)\frac{\partial^2 T}{\partial x^2} + T \left( \frac{\partial T}{\partial x}\right)^2 + Q = 0$ ...
1
vote
2answers
59 views

Determine unit outward normal vector for a curve

It is necessary for me to find the unit outward normal vector for the curve: $$\gamma=(x(t),y(t)) $$ where $$x(t)=\cos(t)−0.5\cos(3t)$$ and $$y(t)=\sin(t)+\sin(7t)+\sin(3t)$$ I know how to find ...
0
votes
1answer
99 views

How to construct the matrix like this

"We consider an unstructured planar (undirected) graph and calculate the stationary probability distribution of the random walk on the graph. The graph is generated by choosing n random points in the ...
3
votes
1answer
61 views

Is solving Verlet constraints parallelizable?

I am a computer science student and I came across the Verlet Cloth simulation. An implementation is here. I was interested in how such computation would lend itself to parallelization. The problem ...
0
votes
0answers
44 views

What is a reasonable manufactured solution to test finite difference method? [duplicate]

What is a reasonable manufactured solution to test the following equation against its finite difference approximation? I want it to look like a Cosine function about $0$, rotated about $Z$ axis ...
1
vote
3answers
121 views

Searching solution for solving huge linear system in MATLAB or C

I am encountering a problem that my MATLAB code ran and an error occurs and shows that it is out of memory. My code is using finite element method to solve some complicated kind of integral equation ...
0
votes
0answers
25 views

Conceptual question about fitting of scattered data

What are the problems that arise when fitting (2D or 3D) a set of scattered data? (non uniformly distributed) I had some data I had to fit and I solved the problem using the triscatteredinterp() ...
1
vote
1answer
35 views

Application of CLAWPACK to Richards' equation

I'm looking to solve the Richards' equation. This models water flow in porous media and is a nonlinear, possibly degenerative, parabolic differential equation that takes the form $\partial_t ...
1
vote
1answer
72 views

Solve steady state reaction-diffusion/Helmholtz equation numerically

I am solving a problem of the form: $\frac{\partial u(x,y,t)}{\partial t} = \nabla^2 u(x,y,t) - f(x,y,t)u(x,y,t) - \kappa(x,y,t)$ At the moment, I am solving this at each time step by assuming a ...
1
vote
0answers
23 views

Data format for Cartesian mesh with cut cells

Is there a mesh data format which is particularly well suited for Cartesian meshes with Dey-Mittra style cut-cells? Ideally, one which does not require converting the cut-cells into a more general ...
3
votes
0answers
56 views

Tracking the speed of 2D oscillations on a lattice

I wrote a Monte Carlo simulation of the 2D Lotka-Volterra model on a discrete lattice (with periodic boundary conditions). A video that I produced (which images the system after some number of monte ...
0
votes
0answers
113 views

How to solve this problem using Particle Swarm Optimization?

I'm currently revising my optimization algorithm for a specific part of a problem. I have trouble in wrapping my head around a new approach and my mind is having this tunnel-vision of ideas. I could ...
0
votes
0answers
17 views

Unexpected behavior, values tend to converge instead of fluctuate. (MD)

I am writing a molecular dynamics program to create an lattice and populate it with atoms/molecules. These then are given random velocities and the system is initialized. Then throughout time the ...
0
votes
0answers
39 views

Phase retrieval via SDP (semidefinite program) of 2D test image (Matrix completion)

In SDP based phase retrieval we have intensity measurement (abs(FFT2(x))^2) of the form A(xo) = |ak,x|^2 =b^2, phase retrieval is then find x that obeys A(xo)=b The quadratic measurements can be ...
4
votes
0answers
96 views

How big a matrix can we row reduce in reasonable time?

I have very large matrices that I would like to row reduce (I need to keep track of the steps and find a basis of the kernel/image, not just find the rank). The good news is that I work mod 2 and the ...
2
votes
2answers
90 views

using GPUs before CUDA and OpenCL

Before there was CUDA or OpenCL people were using GPUs for computation. I am trying to find out how they did that -- because I want to press my Rasberry Pi's GPU for computing and it does not seem to ...
1
vote
0answers
34 views

Finding a scalar field in order to generate a solenoidal vector from a given vector

I am working on generating a (complex) solenoidal vector field $\mathbf{A}$ from a prescribed (complex) vector $\mathbf{a}$ and the gradient of a scalar, $b$, such that $$\mathbf{A} = \mathbf{a} + ...
1
vote
1answer
44 views

Is there an upper bound for fill-ins for indefinite triangular factorization?

For $A=LU$, or $A=LDL^T$ factorization, bandwidth is preserved when there is no pivoting. This is true even for indefinite A, see question. However, when there is pivoting band structure is destroyed, ...
0
votes
1answer
83 views

Computing multiple numerical derivatives at once

Lets say I have a function $f(X) = f(x_1,...,x_N)$ to be integrated. But unlike time discrete methods, my integrator uses quantisation to advance time, that is if $|x - q| > dQ$, with $q$ being the ...
0
votes
1answer
14 views

roots of polynomials of high degree: LinAlgError: Eigenvalues did not converge

I wrote a simple script to generate random polynoimals $\displaystyle f(z)= \sum_{k=0}^N a_k \frac{z^k}{\sqrt{k!}} $ of high degree and find their roots. For more discussion on random polyomials see ...
1
vote
0answers
36 views

ARPACK gives different answers from Matlab and NAG

I'm playing with ARPACK. I looked into the examples they provide, zndrv4.f illustrating the usage of the routine znaupd, in the directory of ARPACK/EXAMPLES/COMPLEX/. I also came cross NAG Fortran ...
2
votes
2answers
59 views

Steklov-Poincaré operator for overlapping domain decomposition

For non-overlapping domain decomposition methods for elliptic problems there is an associated Steklov-Poincaré definite positive operator defined on the interface, allowing a direct computation of the ...
0
votes
2answers
74 views

How-to: Epic visualizations of 3D fractals?

I have seen videos like this before in the past of things like "3D Mandlebulbs" and similar fractal sets, but can anyone tell me what sorts of programs are actually used create these visualizations? ...

15 30 50 per page