instruction stringlengths 43 28.1k |
|---|
Having multiple streams of pseudo-random numbers known to be independent and with a uniform distribution I want to do Monte Carlo simulations in parallel.
In other words, one thread will have a full-period independent and uniformly distributed stream of pseudo-random numbers. Each thread will consume these numbers in f... |
Say, I want to use the UPC code Water Supply Fixture Unit tables in my software that I'm writing ... is it okay or there will be copyright issues?
|
Let's assume that I have a comsol model for solving time-dependent problem. In order to find initial value for one variable I need to solve simple algebraic equation before starting simulation, therefore I added Global ODEs and DAEs module to the model. Now it works good, but it seems like equation from Global ODEs and... |
I want to simulate capacitor with Comsol by using Poisson's equation in genaral and weak form. How can I specify boundary condition for this case?
|
I have a set of equations to integrate something in time $t$. At each time step I compute a scalar field $\phi(t)$ and a potential $V(\phi)$. I should also control the conservation of energy with an equation:
$E=\frac{1}{2}\left(\dot\phi^2+V(\phi)\right)$
Or numerically:
$E=\frac{1}{2}\left(\left(\frac{\phi_{n}-\phi_{... |
Is there an efficient storage format for general, non-symmetric sparse matrices for which one can find all non-zero entries in a given row or column in $O(d)$ time? ($d$ is the max number of non-zero entries in any row or column.)
If I store an $m \times n$ sparse matrix $A$ in the compressed row or ellpack formats, I ... |
I am working on a model of social interactions in mice. I have mice and boxes and a simulation that outputs which mouse stays in which box during which time period (this comes out as a mouse is selected randomly to change a box). The problem is how to obtain, in the end and from this, the meetings of two mice which wer... |
I am interested in globally maximizing a function of many ($\approx 30$) real parameters (a result of a complex simulation). However, the function in question is relatively expensive to evaluate, requiring about 2 days for each parameter set. I am comparing different options, and was wondering if anyone had suggestio... |
I have a sparse $5\,656\,236 * 5\,656\,236$ matrix $A$ with $166\,526\,888$ non-zero elements. The matrix comes from using the finite element method on a linear elasticity problem and is positive semi-definite. I'm trying to use the preconditioned conjugate gradient method to solve it, particularly, the pcg() function ... |
I'm trying to write an efficient bilinear (2D)-interpolation, after reading some recipes, as a fortran-mex for Matlab that is used extensively throughout a long algorithm of solar image processing, and therefore is one of my main bottlenecks. My 1st attempt work but is slow. See code below.
Any advice that can speed u... |
In my last question I noticed a peculiar error when solving the Poisson equation using finite volume method (FVM), Peculiar error when solving the Poisson equation on a non-uniform mesh (1D only) finite volume method.
This is actually only one equation in coupled system of non-linear equations. The other equations in ... |
There are two general approaches to representing solutions in the discontinuous galerkin method: nodal and modal.
Modal: Solutions are represented by sums of modal coefficients multiplied by a set of polynomials, e.g. $u(x,t) = \sum_{i=1}^N u_i(t) \phi_i(x)$ where $\phi_i$ is usually orthogonal polynomials, e.g. Legen... |
I'm working on translating a discontinuous Galerkin code from MATLAB to C and I'm at the final point where I need to solve a sparse system. I've taken a course in C before but I'm very rusty and wasn't all that good to begin with.
I've used LAPACK before but was wondering if there are better options out there. My profe... |
I need to numerically determine the convergence order of Euler's method for various step-sizes. I am unsure how to go about doing this.
Here is the question:
Problem statement: $\frac{dy}{dt}=\alpha t^{\alpha - 1}, y(0)=0$, where $\alpha > 0$. Use Euler's method to solve the initial value problem for $\alpha = 2.5,1,5,... |
I’m going through some considerable effort to translate one of my codes from MATLAB. It’s a type of finite element code and I haven’t implemented the solver yet but comparing CPU times for simply assembling the global system between MATLAB and C, the latter is more than two orders of magnitude faster...
Anyways, I have... |
As we know, machine epsilon limits relative rounding error in the range of normalized floating point numbers. But it is easy to check that this is not true for denormalized numbers.
My question is when one should take this subtlety into account and what sort of problems can this issue cause? Any references?
|
I have a sparse and symmetric matrix A(n x n). The method Lanczos tranforms matrix A into tridiagonal and symmetric matrix T and the Lanczos vectors in matrix V.
From there how do I compute k smallest or largest eigenvalues and corresponding eigenvectors?
|
I am not sure if this is the correct place to ask this question!
Is there a data set such as the University of Florida Sparse Matrix Collection which is produced from stencil operations?
Or is there a way to generate such sparse matrices, maybe using Matlab?
|
I have an oscillatory, decaying function that can be decomposed as
$$\sum_k e^{iz_kt} $$where $z_k$ are complex. What I want is the imaginary parts of all of the $z_k$'s with some range of real parts. I could do a fourier transform and extract the widths of the lines, but I don't know how to handle the case that the l... |
This question popped up today in our group meeting. Suppose you are given a cloud of N points in 2D and each is associated with a velocity vector. These points are associated with particles on a 2D interface and velocities are obtained via simple particle tracking.
The interface we are studying is not "clean" in the se... |
I’m implementing a finite element code (translating from a working MATLAB version, so I have results to compare to) and for some odd reason, some of my computations are only accurate to around 6 decimal places.
I’m working with doubles and PetscScalars and I’ve double and quadruple checked my code and am fairly certain... |
You can calculate the electric potential over every point in a defined space by solving Laplace's equation. To do this in a computer program you set up an 2-d array/ matrix and loop the internal points applying the following formula:
$$\phi(x,y)= \frac{\phi(x_{i-1},y_j)+\phi(x_{i+1},y_j)+\phi(x_i,y_{j-1})+\phi(x_i,_{j+... |
I am reading Stephen Wolfram's "A New Kind of Science".
At present, I cannot understand how the cellular automata illustrations on p79 are created.
In the patterns, the active cell, representing the head, appears to change orientation between up and -45 degrees (towards bottom right). However, none of the rules seem to... |
I have this problem in my textbook:
Suggest efficient algorithm for solving system of linear equations with cyclic three-diagonal matrix, that is of the form:
\begin{bmatrix} a_1&b_1&0&\cdots&0&d_1\\c_2&a_2&b_2&0&\vdots&0\\0&\ddots&\ddots&\ddots&0&\vdots\\\vdots&\vdots&c_{n-2}&a_{n-2}&b_{n-2}&0\\0&\cdots&\cdots&c_{... |
Hej,
I want to simulate a partial differential equation (a modified Cahn-Hilliard equation, but the details do not matter much. The questions also applies to the diffusion equation). I'm looking for a good framework to do heavy numerics. My requirements are:
No license costs (matlab is no option, because we do not hav... |
Background
I am solving the unsteady heat equation in 3D using an alternating direction implicit (ADI) method. This means that I am solving three different tridiagonal systems within a single timestep (once for each cartesian axis). The size of these matrices is on the order of 10^5 x 10^5.
Although each direction's A ... |
I’m currently having some issues with my routine for the linear advection-diffusion problem. The model problem is as follows:
$$
\nabla\cdot(\mathbf{s} u) - \nabla\cdot(\kappa\nabla u) = f, \;\;\;\text{in}\;\Omega \subseteq \mathbb{R}^{2}
$$
$$
u = g_{D} \;\;\;\text{on}\;\Gamma_{D}
$$
The boundary is purely Dirichlet i... |
Can the Levenberg-Marquardt algorithm be used for minimization and not fitting?
Usually we input the derivative of the function we want to fit in the minimizer. Now if I assume I have an objective function $f(t;a,b,c)$ (which I want to minimize with respect to the parameters $a,b,c$). Then I would not see a way to inp... |
I am working on numerical method of Multigrid. What's the available implementation(solver) (actually used in scientific computation) of multigrid method?
|
I'm looking for analytic solutions to time dependent fluid flow problems (can be compressible or incompressible, Euler or Navier-Stokes equations). The main thing though is that I'd like there to be 'interesting' physics going on and for this 'interesting' physics to develop as time proceeds. I'm fine with having sourc... |
In general (and in real application), suppose I am using a randomized algorithm (e.g. Use MCMC to sample from a distribution and then compute $E(f(x))$ for some function $f$)
Assume my algorithm will face every possible input and I use a pseudo-random generator to provide randomness.
Shall I derandomize my algorithm by... |
I'm trying to numerically invert the following integral transform:
$$F(y) = \int_{0}^{\infty} y\exp{\left[-\frac{1}{2}(y^2 + x^2)\right]} I_0\left(xy\right)f(x)\;\mathrm{d}x$$
So for a given $F(y)$ I need to approximate $f(x)$
where:
$f(x)$ and $F(y)$ are real and positive (they are continuous probability distribution... |
I was wondering if the use of incompressible flow approximation for fluid flow in heated pipes is reasonable. A previous question (Definition of incompressible flow) seemed to focus on Natural Convection heat transfer. It does not seem to apply to Forced Convection problems where the fluid is heated as it moves in a pi... |
I'm writing a code using continuous piecewise linear finite elements on triangular
grids to solve the diffusion-reaction problem. the source function f is a Dirac mass at the center. How can i compute the mesh in order to have the dirac in the baricenter of almost one triangle of the mesh?
thanks
|
I'm solving a heat conduction problem in cylindrical coordinates with a composite cylinder made of two different materials. Essentially the cylinder is split into a central cylinder of material A, surrounded by an annulus of material B. My mesh is set up so that a control volume boundary aligns with the interface betwe... |
I have a numerical computation problem which requires solving nonlinear equations (with long integers) in multiple precision.
I tried an MPFR C++ wrapper from this link by Pavel:
mpfr C++ wrapper by Pavel
The wrapper can be downloaded here:
mpfrc++-3.5.6.zip
However, there is precision loss in the solution when handlin... |
There is one 3D-diffusion IBVP for sphere (Dirichlet problem with zero conditions on the surface of sphere).
The equation has the following view:
$$\frac{\partial u}{\partial t}=\operatorname{div}\left(A(r,\varphi,\psi)\nabla u(r,\varphi,\psi,t)\right)+f(r,\varphi,\psi,t) ,$$ where the matrix $A$ is skew with variable ... |
For the backward Euler discretization in time:
$$
\left( \frac{u^{(k)}-u^{(k-1)}}{\Delta t}, v\right) + a(u^{(k)},v) = \ell(v)
$$
where $a(\cdot,\cdot)$ is the bilinear operator associated with the discretization in space. I’m considering linear elliptic problems in 2D. So I rearrange the above equation:
$$
\left(\frac... |
I'm trying to find the potential given some boundary conditions using the successive over-relaxation method.
I have 2 solutions:
-One iterates over all elements and applies the formula field[y,x] = (1-alpha)*field[y,x] + (field[max(y-1,0),x] + field[min(y+1,field.shape[0]-1),x] + field[y,max(x-1,0)] + field[y,min(x+1,f... |
Recently I have been comparing different non-linear solvers from scipy and was particularly impressed with the Newton-Krylov example in the Scipy Cookbook in which they solve a second order differential equation equation with non-linear reaction term in about 20 lines of code.
I modified the example code to solve the n... |
I am trying (using MATLAB) to generate the following image (from the section 4.1 Numerical Examples) of Wu Tian Chen research article 'Condition-based Maintenance Optimization Using Neural Network-based Health Condition Prediction':
The model is derived from the equation:
$$
L(t)=θ′+β′t+ε(t)
$$
where $θ′$ is a normal ... |
I am attempting to model the steady state behavior of a cylinder using the finite volume method (FVM) subjected to a variety of boundary conditions in Matlab. First off, I am treating the cylinder as being axisymmetric so I am only determine the temperature profile in the r-Z plane. I set up a 2D grid so that the r coo... |
The application is a simple non-linear advection diffusion problem (steady state) using DGFEM. My error at each iteration is given by
$$
e_{n+1} = ||\mathbf{J}^{-1}(\mathbf{u}_{n})\mathbf{F}(\mathbf{u}_{n})||_{L^{2}(\Omega)} = ||\mathbf{u}_{n+1} - \mathbf{u}_{n}||_{L^{2}(\Omega)}
$$
For testing purposes, I'm using an $... |
I want to find a solution for $xA=0$, where $A$ is a square matrix. I know that most of the LAPACK routines solve for $Ax=b$. So I take $A^T$ as a, and set $b=0$. I have an additional restriction of $\Sigma x=1$.Thus, I add an additional row of $ones$ to $A^T$ and a single $one$ to $b$. This also allows to avoid the t... |
I'm trying to learn about numerically solving PDE by myself.
I've been beginning with finite difference method(FDM) for some time because I heard that FDM
is the fundament of numerous numerical methods for PDE. So far I've got some basic understanding for FDM and been able to write codes for some simple PDE lay in regu... |
I'm trying to construct the right–hand side of my 2D Poisson's equation in Matlab. I used the vertex rule in order to approximate the integral:
function F1 = rightVer(p,t,f)
%area triangle
it1=t(1,:);
it2=t(2,:);
it3=t(3,:);
area = ((p(1,it2)-p(1,it1)).*(p(2,it3)-p(2,it1))-(p(1,it3)-p(1,it1)).*(p(2,it2)-p(2,it1)))/2;... |
I am attempting to model the steady state behavior of a cylinder using the finite volume method (FVM) subjected to a variety of boundary conditions in Matlab. First off, I am treating the cylinder as being axisymmetric so I am only determine the temperature profile in the r-Z plane. I set up a 2D grid so that the r coo... |
I'm working on some MATLAB code to perform something called the Index Calculus attack on a given cryptosystem (this involves calculating discrete log values), and I've gotten it all done except for one small thing. I cant figure out (in MATLAB) how to solve a linear system of congruences mod p, where p is not prime. Al... |
Is it computationally safe and accurate to use the following equation in COMSOL to compute the divergence of the vector quantity J (instead of using its general built-in equations that have $\nabla$ operations):
$$div_J = d(J_x,x)+d(J_y,y)+d(J_z,z)$$
|
For a computational representation theory program, I have to calculate the trace of $A^+B$ for a fixed $A$ and many different $B$, where $A^+$ is the pseudoinverse of $A$ ($A,B$ have full column rank and the same image). Currently, I compute the LU decomposition of $A$ and use this to solve $Ax_i=b_i$ for each column $... |
On my triangular mesh, I have the $(x,y,z)$ coordinates of each vertex of each triangle. For higher order elements, I refine each element a few times so I have more points to work with. If I just need to visualize the solution for myself, I use fill3 but I'm not entirely sure how to insert my own colorbar. Ideally, I w... |
I have implemented the 2D heat equation with what I thought was the Crank-Nicolson algorithm in the following way:
function[newDomain] = heatCN(domain, dt, Nx, Ny, hx, hy, spanX, spanY)
aux = domain;
newDomain = domain;
for i=2:Nx-1
for j=2:Ny-1
derX1 = dt * (-2.0 * domain(i,j) + domain(i+1, j) + domain(i-1... |
I'm having a problem with multigrid code I wrote. If I solve Laplace's equation in 2D and use more than 5 grid levels, the V-cycles stop converging after a few cycles (see below, convergence factor > 1). At grid level 3, you can see that the recursive V-cycle actually increases the error (L2 norm of the defect). If I u... |
How can show that the prerequisites for the Lax-Milgram Lemma holds if I have different test and trial spaces (which I think is the natural thing to have if at least part of the boundary is non-homogenously Dirichlet)?
To take a simple example (in my actual case I have a non-homogenous Neumann part as well, but that is... |
I’m attempting to write a C program to gather values from a coupled spring system: There is a wall, connected to a mass $m_1$ by a spring, then this mass is connected to a second mass $m_2$ by another spring.
The values I require are the positions of the two masses and their velocities.
Using initial values for positio... |
What is the best way to impose a "constant constraint" for a PDE? Specifically, I want to solve an eigenvalue problem $Au=\lambda u$ on the rectangle $(0,2\pi)\times(-\pi/2,\pi/2)$ with periodicity constraints horizontally and constant constraint on the lines $y=\pi/2, y=-\pi/2$. Here a constant constraint means that $... |
Is it possible to solve the eigenvalue problem:
$$Ax = \lambda Mx$$
using ARPACK when $A$ and $M$ are both non-symmetric complex matrices? According to this documentation, the function znaupd only works when $M$ is symmetric positive definite. I have verified that the results are only correct when $M$ meets this requir... |
I have the same single thread problem, which is something like a simple
#include<stdlib.h>
#include<iostream>
#include<stdio.h>
#include<time.h>
//#include<ctime.h>
int main(){
clock_t start=clock();
for (int i=0;i<100 000 000; i++){
//do something here
}
double duration = (clock()-start)/(double)CLOCKS_PER_SEC;
cou... |
I have a while loop, in which I use a Matrix A, vectors B and x with varying dimensions:
int count=0;
while(true){
count+=1;
MatrixXd A(count,2*count);
VectorXd B(2*count);
// assignment of A, and B
//
VectorXd x = A.householderQr().solve(B);
// output of x
if (x.norm()>30)
break;
}
However the program built th... |
I am trying to plot the wave function for a particle in a 3D box. This requires me to plot 4 variables: x, y, z axes and the probability density function.
The probability density function is:
abs((np.sin((p*np.pi*X)/a))*(np.sin((q*np.pi*Y)/b))*(np.sin((r*np.pi*Z)/c)))**2
I am using np.arange() for the X, Y and Z.
I ha... |
I am trying to find the Nusselt number for a small element of the outside of a cylinder that has a height of $\Delta z$. I found the average Grashof number of a surface as
$$Gr_{L}=\frac{\beta \rho (T_{s}-T_{\infty})L_{c}^{3} }{\nu^{2}}$$
If I wanted to find $Gr_{x}$ of a certain element, would I use a characteristic ... |
Suppose that I have the following vectors $v_1$, $v_2$, $v_3$ $\in R^n$,$n= 9$. What I want to do exactly is to combine these $3$ vectors into $1$ representative vector $V$.
According to the following article: Document Classification and Page Stream Segmentation for Digital Mailroom Applications
they Perform at fir... |
How can I generate a list of all the variables that have been assigned in an R language session?
|
Is there any tool to plot 3d dimensional histogram in a spatial grid? Preferably are there any filters or operators in Paraview or Visit for this?
|
I heard that subspace iteration plus Ritz acceleration could improve the performance a lot for solving clustered eigenvalues, for the eigenvalues and eigenvectors could converge linearly with ratio $\lambda_{p+1}/\lambda_j$, $j=1,\ldots,p$. For Hermitian Matrix this is even faster.
This is really fantastic. Now for a... |
I would like to compute, as part of the solution of the Laplace equation using the Fast Multipole Method, the second derivative of the associated legendre functions of the first kind .
Specifically, I am looking for C implementations or just the correct recurrence relation to use to write the function myself.
I have tr... |
I have a dense matrix A and its corresponding inverse $A^{-1}$. The Woodbury matrix identity states:
$$ (A + UCV)^{-1} = A^{-1} - A^{-1}U(C^{-1} + VA^{-1}U)^{-1}VA^{-1} $$
I wish to perform small updates to the diagonal of $A$ and compute corresponding $A^{-1}$. The updates can actually be described as a constant $k$ m... |
I'm interested in taking some partial derivatives of a 3 dimensional array in Matlab - say $A(i,j,k)$ approximates $f(x_i,y_j,z_k)$. I need to approximate things like $\partial_{xy}f$, $\partial_{yz}f$, etc. I've already built the finite difference matrices for a few of these derivatives, but ultimately this is going... |
So I am basically trying to solve the simplest case possible for the heat equation:
on the domain [0;1] x [0,1] with boundary conditions 1.5 on one face of the square and 1.0 on all other faces.
I am using octave and I am solving the mathematical system from scratch, for learning purposes. (I know it is inefficient)
T... |
I'm working with error estimates for Poisson's equation of the form
$$\mathcal{E}^2_T = h_T^2\|-\Delta u - f\|_{L^2(T)} + \sum_{e\in \partial T} h_e\|n\cdot \nabla u\|_{L^2(e)}$$
where $T$ is an element and $h_T, h_e$ are representative sizes of the element volume and face, respectively.
For skewed elements, I'm uncl... |
Image attached is where I am at the moment. Blue dots=points/cities, Black x's represent central points in each box that contains at least one city, and pink dots represent the midpoint of these centre points
I am doing a short project using Lab Windows to approximate the minimal path between points on a 2D plane. (Gr... |
I wrote a simple ray tracer, and now I try to implement an uniform grid. There is a lot of documentation on how to traverse the grid, but I don't know how to construct the grid.
I have my uniform grid and my triangles. How could I know, which cell(s) in the grid correspond(s) to my triangles ?
Thanks fo your answers.
|
I have an array of floating point values $F$. I want to input my array into an algorithm that only takes integer values. How can I efficiently determine the smallest multiplier $m$ such that all values in $m \centerdot F$ are integers within a given tolerance $tol$?
|
If I have a psd, symmetric matrix $\mathbf{A}$ and I need to do LU decomps on $\mathbf{B_i}= \mathbf{A} + \mathbf{D_i}$ (where $\mathbf{D_i}$ is a diagonal psd matrix, where $\mathbf{D_i}$ changes randomly). Is there an easy way to go from the LU of $\mathbf{A}$ + some function of $\mathbf{D_i}$ to get the LU of $\math... |
We are working on a Bayesian model for a space-time process, and are using a No-U-Turn sampler (NUTS) that requires a model for the log-probability and it's gradient with respect to the model parameters. More succinctly, we have fairly complicated log-probability function $f : \mathbb{R}^n \rightarrow \mathbb{R}$, inv... |
My long-term goal is to numerically solve the 1D advection-diffusion equation of the form:
$$\frac{\partial u}{\partial t}=\frac{\partial }{\partial x}\left( v(x,t) u+D\frac{\partial u}{\partial x}\right)$$
To start I've set set $v(x)$ instead of $v(x,t)$ and I've been using an implicit finite difference method with va... |
In order to balance atom count in chemical equation:
a O2 + b C12H24O11 → c CO2 + d H2O
I make linear equation:
O: 2*a + 11*b = 2*c + d
C: 12*b = c
H: 24*b = 2*d
and I must find smallest positive non-zero integer that satisfy that question.
In GNU Octave I bit this problem with human interaction:
[2,11,-2,-1; 0,12,-... |
I aim to find $x \in \mathbb{R}^n$ that
$\min_x |D \cdot F \cdot x|^2$
subject to $x_i = X_i$ and $x_j \geq X_j$ ,
$i \in I, j \in J$ and I and J partition ${1\cdots N}$ into two sets.
it is easy to do $D \cdot F \cdot x$ because D is diagonal and F is the discrete Fourier transform. But actually storing and comput... |
Firstly I would like to achieve a final goal as can be found in the links below:
Link 1
Link 2
Now I started doing a little bit of research and found that Stereophotogrammetry is the field I should be looking to study should I want to achieve the desired result in the links above. Now I know there is software like Catc... |
I am looking for a clean way to compute preciseley, when $x$ is very close to zero: $$\exp(-1/x^2)$$ using C. What is the best way (speed, precision, etc.) ?
|
Let $x\in \mathbb{R}^{n}$, $Y\in \mathbb{R}^{mxn}$.
We can then define:
$row_{i}(Y)=$ $i^{th}$ row of $Y$
$column_{i}(Y)=$ $i^{th}$ column of $Y$
$x_{i}=i^{th}$ element of $x$
$sum(x)=$ sum of the element of $x$
$card(x)=$ number of non-zero element of $x$.
My Goal is to devise a method to determine if it is pos... |
I am solving a problem using an iteratively-reweighted least squares method: http://en.wikipedia.org/wiki/Iteratively_reweighted_least_squares
Essentially this requires solving a number of least-squares problems of the form $$D_i A\vec x\approx D_i\vec b,$$ where each $D_i$ is a different diagonal weighting matrix.
Is... |
I am trying to implement a simple finite volume method solver. I had a class on FVM a while back, but am still aware of the principal concepts. But implementing the FVM for non-cartesian or 1D meshes is not straightforward to me.
E.g. I have a mesh representing my control volumes. I compute the cell centroids to be us... |
Matlab ttest "returns a test decision for the null hypothesis that the data in x comes from a normal distribution with mean equal to zero and unknown variance, using the one-sample t-test."
Can anyone clarify what exactly is output by the command ttest when run on a vector of numbers $a_1, a_2, \ldots, a_n$? OK to ans... |
I would like to minimize:
$$J = \int_{\Omega} \|\nabla u - \nabla g\|^2 + \lambda \|\frac{\partial u}{\partial t} + \nabla u.v||^2 ~\text{dx dy dt}$$
where $u(x,y,t)$ is the unknown function, the integral is over a fixed spatio-temporal domain $\Omega$, $\nabla$ is the spatial gradient, $v(x,y,t)$ is a velocity (vector... |
I have my pde 2D problem with robin condition (form: du/dn +ku=g) to solve with matlab. i have the exact function u and I want to find the function g in robin condition. How can i do it?
thanks for the help :)
|
I wrote the code to fix this problem; now I should validate it using a test function to see the error in my code. I can't figure out how starting from u can derive the function g on the edge, in particular I don't manage to compute the outward normal.
This is my code to calculate g: https://dpaste.de/hzYm (p,t,e are ... |
Is there an efficient way to find the largest negative eigenvalue of a matrix? The matrix in question is a Markov matrix.
Computing the full spectrum of the matrix by decomposing it is not an acceptable solution.
|
First off I would like to mention that I am absolutely terrible at statistics... so bear with me please.
The question:
a sha1 hash is a hexadecimal string of 40 characters, the largest number being:
ffffffffffffffffffffffffffffffffffffffff
which if you convert it to a decimal, it becomes around 1.2830013993246E+48.
I ... |
I'm implementing a mass-spring solid mechanics solver and I'd like to use the Velocity-Verlet time integration scheme. However, I cannot find anything about the maximum stable time step -- either saying there is none and it's unconditionally stable like an implicit scheme or that there is one and it's bound by somethin... |
So I'm trying to implement a Gauss-Kronrod adaptive quadrature. That is, I want to calculate
$$\int_a^b f(x) dx = \sum_i f(x_i) w_i$$
where f(x) is evaluated at multiple points at once for efficiency. A key point to bear in mind is that $f$ is also vector-valued (possible risk of confusion here with the double meaning,... |
I'd like to find the normalized ground state wavefunction for the anharmonic oscillator (Duffing) whose potential for which there is no analytic solution; an oscillator with a quartic potential, in addition to the quadratic potential. Any comments would be highly appreciated
$$V(x_{-}) = \frac{x^2}{2}+\lambda \frac{x^4... |
So, I am running this openfoam simulation and I need areaAverage velocity and pressure on a surface,currently the entire plane is being read, I wan't to specify my own in sampleSurfaceDict,
new_plane
{
type faceSource;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
o... |
I am interested in solving a sparse complex linear system Ax=b where A is a square matrix of complex numbers and b is vector of complex numbers.
If possible I would like such a library to be templated (for the ease of installation and use)
sth in the spirit of Eigen
I checked out Eigen but it does not, I think, look ... |
I want to solve Lid driven cavity flow with the help of projection method i want to make own fortran program to solve two dimensional unsteady flow.
I propose to solve the equations in the following way: apply a second order Adam Bashforth method for convection terms and Crank nicloson scheme for viscous term by negl... |
I'm trying to get a deeper understanding of the Finite Element Method (FEM) to better understand what I do in COMSOL and FEniCS.
The sketch below shows the problem that I want to solve in FEM. The rectangular domain resembles a flow reactor. In the flow reactor there is a laminar velocity field in the z direction, $U_Z... |
So I have a 2D histogram, in the third dimention are the counts.
What I want to achieve is by choosing two random position, make a plot of a 1D histogram along the line that passes through the two points.
I also want to be able to change the distance from the line to which points are included in the 1D histogram.
Any i... |
How do CUDA and OpenCL compare to each other as of late 2013 from a programmer's perspective? My group is thinking about trying to make use of GPU computing. Would we be limiting ourself significantly by choosing hardware that only supports OpenCL but not CUDA?
To be a bit more specific, are the following assumptions... |
I am using image filtering for an image processing algorithm I'm developing. I'm using a predefined Matlab function to do the convolution, but I'd like to know what the computational complexity is for this algorithm.
The simple way of thinking of this is that an $M \times N$ (grayscale) image and a $m \times n$ filter,... |
I apologize in advances if this is the wrong place to be asking this question, (I had considered putting it on CV first).
I am studying financial (S&P, Dow Jones, etc) data, and would like to compute some quantiles of an array of numbers. I have been reading about quantiles, so I know what they are, but does the compu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.