instruction stringlengths 43 28.1k |
|---|
I'm not really sure how to explain this problem clearly, so please bear with me.
I have a basis of 3 orthonormal unit vectors and a position, a standard 4x4 transform matrix in computer graphics.
Also I have several points (offsets) in that space that I transform to world space.
The points are then perturbed slightly ... |
As all knows incompressible flow doesn't exist in reality, its an assumption introduced to simplify governing equations. We can not apply this assumption straightforward. Generally Mach number(M<0.3 for incompressible flow), density variation(zero density variation) and divergence of velocity (is equal to zero for inco... |
I know this question is somewhat familiar to my previous question found here, however I am now coming at it from a slightly different and more general angle.
Let's say I have a code whose runtime is in the days to weeks range. For one reason or another, the code can not be changed to improve performance. My goal is t... |
I'm implementing a Markov Chain Monte Carlo process for a Quantum Monte Carlo routine, in every book and paper I've read so far the success of the routine and quality of the results strongly depends on the random number generator.
Well I've chosen to implement the code in C++ 2011, and I'm presented with a fair wide se... |
I have a cubic of the form
$$x^3 - a x - b = 0$$
where $a, b > 0$. Thus, I know there is exactly one positive root.
Is there a nice stable formula for this unique positive root?
|
Let $T$ be a real symmetric tridiagonal matrix. Then the divide-and-conquer eigenvalue algorithm, as detailed in any standard text, goes by subdividing
$$ T = \begin{bmatrix} T_1 & 0 \\ 0 & T_2 \end{bmatrix} + \rho vv^T,$$
after which we can solve the eigenvalue problem for $T_1, T_2$, and then solve the full eigenvalu... |
There is quasi 1-D C-D nozzle test case for compressible flow codes, like that "is there any 1-D test case for incompressible flow codes?"
|
I'm calculating the gradient of a function with a symbolic math library called theano. Then I'm using gradient descent to find the minimum of the function.
I'd like to prove that the minimum is a global minimum. How can I prove that my function is convex?
|
My dear community,
I am wondering why BFGS methods are not so widely used for simulating mechanical problems which heavily still relies on inverting the hessian matrix. I am essentially interested by constrained problems (contact on the interface for instance), and I know that some authors proposed method to deal with... |
Is there a way in Tecplot to change data from face-centred to node-based?
If I look at the plot, it seems to me that internally Tecplot is changing the data from being at the centre of the face to being at the corner nodes - is this a correct observation and can this data be written to a file?
|
I tried to use PETSC direct solver (SUPER LU) to solve the system of equations.
After a long time effort, the code is working properly and gives some good results. The only issue that came up recently is a bout memory leakage.
I found that after iterations RES memory is increasing which leads to the server crash.
I tri... |
I have a completely beginner question about the setup of artificial neural networks. Basically it boils down to:
How do I put in data and get results? For example, classification: let say I have 10 input features, all numerical, and 5 output classes.
How do I set up my input layer and my output layer? Would it be... |
Consider minimization of a biconvex function over a biconvex set. Is the biconvex optimization problems polynomially solvable?
|
With the Sun Grid Engine, how can I get the directory where the job script is located, within the job script?
I need this so I can start the script with
cd script-location
to make sure it'll have access to all the necessary files. So far I have hard-coded the script directory into each script, which makes it much too... |
First of all, I want to say that I am extremely new to MD simulations, so I apologize for any of these questions if they appear to be something that should be well known.
I know that the classical type of picture that MD packages such as Gromacs give us are not really useful for simulating chemical reactions and non lo... |
I plan to write a code that solves the flow past a cylinder and try to see the Von-Karman vortex street. I will solve the 2-D viscous, incompressible Navier-Stokes using the projection method. The following figure demonstrates a subset of my intended boundary.
I am sort of confused about the decoupling of velocity and ... |
In FEM applications, each processor needs only data from neighboring processors, which gives a stencil or star pattern of communication. In MPI_Win for MPI_Get, one needs to setup a group of processors to window on common data. But what we usually need is specifying a stencil pattern for MPI_Get. And it seems to me MP... |
In the method of manufactured solutions (MMS) one postulates an exact solution, substitutes it in the equations and calculates the corresponding source term. The solution is then used for code verification.
For incompressible Navier-Stokes equations, MMS easily leads to a (non-zero) source term in the continuity equati... |
I was reading through this article (very good article and excellent blog BTW) to do some measurements in my (very simple) implementation of the Mandelbrot Set.
I'm using a Quadro 2000D card which has a theoretical bandwidth of approximately 20 GB/s ( = 1304 MHz * 128 bit-bus).
Mandelbrot image has 700x700 pixels (uchar... |
I have an FFT code that solves a particular case of the steady Euler equations where a Poisson equation is solved, what is a good way to quantify the error? Is what I am doing ok?
Since I do not have an analytic solution to compare with what I have done is I have computed the solution on a very fine grid and then comp... |
When I use the cvx matlab toolbox, I met a puzzled problem. The function of fft (or dct, wavelet, etc.) cannot be recognized by the type of 'cvx'. For the 1-d fft, it can be constructed to an equivalent matrix. But for the 2-d fft, how to transform it to the matrix form ?
|
I want to explore the low energy states of an amino acid or a peptide by generating input geometries, defined by multiple dihedral angles of the backbone or the side chain. From these starting conformations I want to do geometry optimization to yield local energy minimum geometries.
The following approaches failed:
Us... |
I have a Galerkin solution for a heat equation
$$
u_t = \Delta u + f
$$
with Dirichlet conditions
$$
u=0, \qquad x \in \partial\Omega
$$
The time discretization is done using a BDF scheme. How can I accurately and efficiently compute the heat flux on the boundary
$$
\sigma = \frac{\partial u}{\partial n}, \qquad x \in ... |
In "LU, QR and Cholesky Factorizations using Vector Capabilities of GPUs", by Vasily Volkov and James Demmel, there is an interesting way to interpret the latencies, line sizes, and page sizes of a cache from a graph like this:
Apparently, the line size is where the the cache begins to plateau (about 32 bytes in this ... |
There is unstructured grid which contains only quadrangles cells. Each cell has 4 neighbors, and known them (has a pointer to them). I can iterate through all cells in the grid. Some cells are marked as a "A - red" some as a "B - blue" - see attached picture - Image
Cells form blue and red regions. I need to separate t... |
I would like to use f2py with modern Fortran. In particular I'm trying to get the following basic example to work. This is the smallest useful example I could generate.
! alloc_test.f90
subroutine f(x, z)
implicit none
! Argument Declarations !
real*8, intent(in) :: x(:)
real*8, intent(out) :: z(:)
! Variabl... |
SEE: http://www.songho.ca/dsp/convolution/convolution2d_example.html
"First, flip the kernel, which is the shaded box, in both horizontal and vertical direction"
Why do we need to flip the kernel in 2D convolution in the first place?
So, why can't we leave it unflipped?
|
I know some of the places where SPD linar systems arises such as elliptic PDEs and normal equations. Can I have a more comprehensive list of scientific applications which require solving SPD linear system. I am specially interested in cases where matrix is not sparse and cases where matrix might not be available direct... |
I'm working through a problem in a textbook as follows:
"Consider the $d \times d$ Toeplitz matrix
$$ A = \left[ \begin{array}{ccccc} 2 & 1 & 0 & \cdots & 0 \\
-1 &2 &1&\ddots&\vdots\\
0&\ddots&\ddots&\ddots&0 \\
\vdots &\ddots&-1&2&1\\
0&\cdots&0&-1&2 \end{array} \right].$$
Find explicitly all the eigenvalues of the ... |
Given 3D Poisson equation
$$
\nabla^2 \phi(x, y, z) = f(x, y, z)
$$
and the right hand side and the domain, am I free to impose any boundary conditions (BC) on the function $\phi$, or do they have to be somehow consistent with the right hand side? In particular, if I impose periodic BC, will there be exactly one soluti... |
I have a few set of data of three dimensional matrices, n x 3 with x, y and z coordinates.
I viewed the matrices in the figure window.
% read function;
OBJ1=read_obj('subject1.obj');
FV.vertices=OBJ1.vertices;
FV.faces=OBJ1.objects(2).data.vertices;
figure, patch(FV,'facecolor',[0 0 1]); camlight
grid on
axis equal
I ... |
I am currently tasked with calculating the total flux of photons or irradiance from a flat emitter ('pixel'). Previously we measured the Luminance head-on (90 degree from the emitting surface) and calculated the illuminance assuming a lambertian emission. As it turns out the calculation fails for several of our devices... |
I have coded a routine for interpolation with B-splines, only to discover later that this functionality is already included in Python's SciPy.
However, I do not understand one parameter in the SciPy module (UnivariateSpline)[http://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.UnivariateSpline.html#sci... |
I am trying to do the speed up analysis of the rotating mask filter (section 4.2.3).
Let $N^2$ be the pixels in the image and let $m^2$ be the neighborhood of a given pixel, what I have for my sequential code is basically the following steps
for every pixel in the image
for every rotating mask
compute dispersi... |
we are using a first order implicit finite volume code for simulation of incompressible flows. At its core, the code utilizes a (non-preconditioned) GMRES method for solving linear systems given in webpage
In general, it is quite difficult to find an "ideal" setup of the GMRES algorithm for a given problem, i.e. especi... |
How does MATLAB, for instance, calculate the SVD of a given matrix? I assume the answer probably involves computing the eigenvectors and eigenvalues of A*A'. If that is the case, I would also like to know how does it compute those?
|
Recently when I was solving a system of ODEs using runge-Kutta method , I got much different results when I transformed the variables from spherical coordinates ($r$ and $\theta$ ) to cylindrical coordinates($\rho$ and $z$) and solved it again.
(no need to mention that
$cos(\theta)=\frac{z}{\sqrt{z^2+\rho^2}}$
$r=\sqr... |
I have a transient flow and solute transport simulation running using a fortran code. The final solution time is 1 day. I need the output of hydraulic head for the output time of 0.5 day. I want to know what is going to change in my output data (0.5 day) if I run the same simulation for a longer time, e.g., 1000 days?
... |
I'm looking for the best package for doing the following: building a 3D model (or loading externally) of a non-standard windmill shape, simulating an airflow over the model, and determining the generated torque. Ideally, it would be either open-source, or have a free demo/low-cost version. Nice-to-have, would be one re... |
I am working on implicit schemes for Euler equations. Implicit methods allow one to use large CFL values, but is there some way to evolve CFL number from a much smaller value than desired value to avoid errors in initial iterations. There are some strategies available in literature, such as exponential increment.
CFL... |
According to Wolfram Alpha and the Sage computer algebra system, the following identity holds:
$$
\cos\left(\arctan\left(\frac{l_1-l_2}{d}\right)\right) = \frac{1}{\sqrt{1 + \frac{(l_1-l_2)^2}{d^2}}}
$$
However, when I tried to verify it with an arbitrary example in NumPy, I noticed a rather large difference in the act... |
I am trying to solve some unconstrained nonlinear optimization problems on GPU (CUDA).
The objective function is a smooth nonlinear function, and its gradient is relatively cheap to compute analytically, so I don't need to bother with numerical approximation.
I want to solve this problem with mostly fp32 maths ops (for... |
I intend to solve Ax = b where A is complex, sparse, unsymmetric and highly ill-conditioned (condition number ~ 1E+20) square or rectangular matrix. I have been able to solve the system with ZGELSS in LAPACK accurately. But as the degrees of freedom in my system grow, it takes a long time to solve the system on a PC wi... |
This question is extended from this question
The original problem is to maximize the Frobenius norm of a matrix product
$max_{X\in \mathbb{D}}||B^TXA ||_F$, where $\mathbb{D}$ is the doubly stochastic matrix set
One challenge is that the size of matrix $X$ is big and I would like to reformulate it into a low memory re... |
I've been having problems designing an effective caching mechanism.
The mechanism is to be used as part of a project developing scientific software.
The goal is to save computation time by loading results of identical computations done in the past.
The problem I've been encountering is how to know if a computation is i... |
Is there any preprocessor directives that could be used to use the polylog function? Or is it included in cmath? If so, do you call it by Li or by polylog?
EDIT:
What I really am trying to do is give an analytical value for the indefinite integral of the function
$$ \frac{x^3}{e^{x} -1} $$
which involves polylogarit... |
I wrote a Python code which solves a second degree nonlinear differential equation using the Newton iteration method. The code converges to a 2-cycle within 50 or so iterations. The cycle only appears in noticable magnitude in the last half dozen grid points (of ~120).
I use Central Differencing for solving a 2 bounda... |
I have some issues solving sparse linear equations Ax = b
My matrix A is sparse with dimension of 5 million by 5 million. Actually, it is a combination of two matrices. One is tridiagonal and the other matrix has a bigger band. For example the $29450^{th}$ row has non zero diagonal entry. Plus non zero element at $147... |
Let's consider the following equation
$$X=F_{1}XF_{1}^{T}+...+F_{p}XF_{p}^{T}+C$$
where $p$ is an positive integer and $C$ is a known positive semidefinite matrix. If we augment $F=[F_{1}...F_{p}]$ and $Y=diag (X...X)$, then the equation becomes
$$FYF^{T}−[I...0]Y[I...0]^{T}+C=0$$
seems like a generalized Lyapunov equa... |
I mean, in handling boxed constraints?
In terms of stability, and more importantly, the numerical performance?
I have already written some well-optimized and well-tested C/CUDA/C++ codes for several unconstrained optimzation methods.
And I use augmented largrangian to handle constraints, however, it looks like bounded... |
I am trying to understand the LidarBoost algorithm as explained in this paper (PDF warning). My apologies if this isn't the appropriate exchange; I've posted in DSP, but I didn't get a response there, and the FAQ said that some image processing algorithms are acceptable here.
I don't understand how they take the origi... |
I have made a standard curve. The X-axis is logarithmic. The y-axis is linear.
I have added a logarithmic trendline
(y = -1.546ln(x) + 39.254; R² = 0.9906).
How can I re-arrange the equation to calculate an unknown X-axis value?
|
It is well known that, when a system of linear equations is obtained from discretization of partial differential equation, the solution process can be accelerate significantly by multigrid technique. In the smoothing step of a multigrid cycle, relaxation method, such as Gauss-Seidel or Jacobi, is used. However, for rel... |
I am trying to follow the Openfoam user guide but I'm stuck at the first tutorial 1.
In fact, when I try to run the blockMesh command (using the administrator account), the following appears:
Writing polyMesh
--> FOAM FATAL ERROR:
Failed writing polyMesh.
From function blockMesh
in file blockMeshApp.C at line ... |
I'm trying to get an animated 2D data surface on MatPlotLib. After a bit of search on the internet, i've found an example that almost works:
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
import numpy as np
import time
def generate(X, Y, phi):
R = 1 - np.sqrt(X**2 + Y**2)
return np.cos... |
I am interested in cases where Conjugate gradient works much better than GMRES method.
In general, CG is preferable choice in many cases of SPD (symmetric-positive-definite) because it requires less storage and theoretical bound on convergence rate for CG is double of that GMRES.
Are there any problems where such rat... |
I need to solve the follwing constrained optimization problem. Is there any MATLAB
toolbox which can solve this.
minimize $A_1 x$
subject to $A_2 x = 0$
$A_1$ is an $m\times n$ matrix where $m \lt n$
and $A_2$ is a $(n-m) \times n$ matrix.
Now if $A_1$ were a row vector, this would reduce to the standard linear-p... |
I'm studying the usual wave equation:
$$ \frac{\partial^2 \psi}{\partial x^2} - \frac{1}{c^2} \frac{\partial^2 \psi}{\partial t^2} = 0$$
with complex field $\psi$, on a n-dimensional cube region of length $L$, which are $n-1$ spatial dimensions of length $L$, and one time dimension of duration $L/c$. Now i proceed to e... |
As stated in the title, I need to make a discrete 3D convolution of two matrix-valued functions. Or, actually, I need to convolve a matrix-valued function with a vector-valued function. That is, I need to compute the discrete version of $(f \ast X)(x)$ for some finite set of $x$'s, where $f:\mathbb{R}^3\to\mathbb{R}^{3... |
Suppose I have some matrix A whose SVD I know. Now, I am given B which is A plus some small perturbation. Is there any algorithm which can use the SVD of A as an initial guess to gain speedup in the computation of the SVD of B?
|
So the theory is straightforward. We have:
$$\frac{\partial^2U}{\partial t^2}=c^2 \frac{\partial^2U}{\partial x^2}$$
discretizing it gives:
$$\frac{U(i+1,j)- 2U(i,j) + U(i-1,j)}{(\Delta t)^2} = c^2 \frac{U(i,j+1)-2U(i,j) + U(i,j-1)}{(\Delta x)^2}$$
where $U(i,j)$ is $U(t_i,x_j)$ with $t_i=i*\Delta t$ and $x_j=j*\Delta ... |
Consider a multivariate polynomial $f(x) = f(x_1, \ldots, x_n)$ with maximum degree $d$. Following the linear symbolic perturbation scheme described in Seidel 1998, I want to evaluate the limit
$$\lim_{\epsilon \to 0^+} \textrm{sign}~ f(x + \epsilon y)$$
for some $x,y \in \mathbb{R}^n$. This limit is given by the low... |
Variants of this question have been crossposted to Stack Overflow and Mathematics Stack Exchange. Additional answers may be found at these other sites.
Computational Science People:
I originally posed this as part of a question at https://math.stackexchange.com/questions/379809/is-there-a-name-for-this-function-parit... |
Given an energy level $\mu$, I'm looking to calculate the eigenvectors corresponding to the time-independent Schrodinger operator on the torus (that is, periodic boundary conditions)-- $H = -h^2 \Delta + V$ for some nice, bounded potential $V$ -- whose eigenvalues are nearest to $\mu$.
I was wondering if there are some... |
I want to solve job assignment problem using Hungarian algorithm of Kuhn and Munkres in case when matrix is not square. Namely we have more jobs than workers.
In this case adding additional row is recommended to make matrix square.
For example in the following
link.
And here task IV is assumed to be done.
But in real... |
Wikipedia lists a lot of FFT algorithms:
Cooley–Tukey FFT algorithm, Prime-factor FFT algorithm, Bruun's FFT algorithm, Rader's FFT algorithm, and Bluestein's FFT algorithm
What are the pros and cons of each algorithms?
And which one do you prefer?
|
I was having this discussion with a colleague of mine a week ago and thought I might as well bring it here to a broader audience. That said, I am not certain this is a kind of question that is appropriate for scicomp.
Anyhow, given their abundance and, relatively low prices, has anyone thought of using smartphones for... |
From what I understand the GMRES method is (using Arnoldi Iterations/Modified Gram-Schmidt):
The first vector of the Krylov subspace span of A is the normalized vector $\frac{\vec b - A\vec x_0} {|| \vec b - A\vec x_0 ||}$
At each iteration i, calculate a single new orthonormal vector of the existing Krylov subspace. I... |
can you help me? I have a fluid simulation in 2D, where I compute by finite differences on the grid the velocity field and pressure. So this is my output from the program. Now I have to show how the vertical component of traction on the boundary looks like. But I am not sure what the word traction means, what I have to... |
I have download sparselib++, but it seems that it can't be complied in Windows, only in Unix, I don't know. So can anyone recommend some which can be used in Visual Studio 2010? I want to do a large sparse matrix operation in VS2010. Thanks!
|
Does anyone know of a java library or algorithm for efficiently implementing the second Chebyshev function?
To be clear, I'm refering to this expression:
$$\vartheta(x) = \sum_{p \le x}\log p$$
$$\psi(x) = \sum_{m=1}^{\infty}\vartheta\left(\sqrt[m]{x}\right)$$
where $\vartheta(x)$ is the first Chebyshev function and $\... |
Does anyone know where to find an analytic form for the singular values of the finite-difference approximation to the 2D Laplacian, expressed in matrix form for a square grid? This would be for the standard 5-point FD approximation.
I've found the eigenvalues (they are $\sin^2$ functions), but have not seen expressions... |
The most computationally intensive part of my application is the triangularisation of a matrix, $\mathbf{S} = \operatorname{triag}\left(\mathbf{A}\right)$, such that $\mathbf{S}\mathbf{S}^T = \mathbf{A} \mathbf{A}^T$.
For this application $\mathbf{A} \in \Re^{n \times 2(n+v)}$, where $n$ is generally close to the same ... |
I have a ~4.12 Tb structured relatively-sparse matrix dataset (about 8% of the matrix entries are non-zero) that i want to apply an LU decomposition, however, given the size of it, loading it in memory and using the usual BLAS or Eigen routines is out of the question.
Is there some unix/linux library that i can use to ... |
Suppose I have a fixed point iteration of the form
$$x_{n+1}=f(x_n).$$
Suppose further that after some initial testing, I found that it does not converge to an a priori known fixed point $x^*$. I recall from optimization class that often when the standard newton's method does not converge, one can implement a global ... |
When solving a FV formulation of a set of equations, a code I am currently working with has user defined normalization factors for scaling equations. It normalizes time, number densities, potential, and fluxes, each with a different factor.
I have the impression that these are a legacy attempt at a rough diagonal pr... |
I recently started to study non-parametric clustering methods and I come across to CRP. After reading all the material I found on the web there is one thing which is not completely clear to me: which is the aim of this process? You can't cluster according to 'distance' (and in fact it was invented another method called... |
I'm about to start working on a software library of numerical ODE solvers, and I'm struggling with how to formulate tests for the solver implementations. My ambition is that the library, eventually, will include solvers for both nonstiff and stiff problems, and at least one implicit solver (more or less on par with the... |
While reading some literature on PDE solvers I came across the term pseudo time-stepping today. It seems to be a common term, however I failed to find a good definition or an introductionary article for it.
Hence: What is pseudo time-stepping, and how is it usually used?
|
What is the theoretical convergence rate for an FFT Poison solver?
I am solving a Poisson equation:
$$\nabla^2 V_H(x, y, z) = -4\pi n(x, y, z)$$
with
$$n(x, y, z) = {3\over\pi} ((x-1)^2 + (y-1)^2 + (z-1)^2 - 1)$$
on the domain $[0, 2] \times [0, 2] \times [0, 2]$ with periodic boundary condition. This charge density is... |
I am currently working on my bachelor thesis, where I am calculating trajectory of electrons and ions in Hall Effect Ion Thruster. However, to be sure what I am calculating, I need to know how does the electromagnetic field look like.
I already have working code for visualization of electromagnetic field using streamsl... |
Recently, I've been pushing my group to include more testing when writing their code. There were several major bugs that took a lot longer to catch than probably speaking was necessary, because we didn't have a good testing regime in place.
However, I suspect that having the appropriate tools to automate (or to help st... |
Is there any application for PDEs with nonlinear Dirichlet boundary conditions? That is, I am looking for an example of a partial differential equation for a state $u$ posed on a domain $\Omega$ with $g(u|_{\Gamma})=0$, where $\Gamma$ is the boundary of $\Omega$ and $g\in L^2(\Gamma)\to L^2(\Gamma)$ is a nonlinear func... |
I am given the advection equation
$$
u_t=u_x
$$
and then the transformation of coordinates
$$
x=x(\xi,\theta), \qquad t=\theta
$$
which leads us to the transformed equation
$$
x_{\xi} u_{\theta} - u_{\xi} x_{\theta} = u_{\xi}
$$
Further, i have to derive the central difference approximation for $u_x$ (at point $x_i$).... |
I'd like to loop over all edges of a simplex (in a mesh). To this end: How can I extract the the points from a cell?
This is for the eval method of a C++ definition of an Expression, i.e.,
void eval(Array<double>& v,
const Array<double>& x, ... |
I am about to start my journey into the world of CFD and wanted to start with the Fractional-step method for solving the incompressible Navier-Stokes equations. Could you perhaps suggest some articles or books I should look into (for this method specifically)?
|
I am using the Chebyshev spectral differentiation technique that is described concisely under "details" here. The idea is to take the initial data $v_0,v_1\,...,v_N$ and store it in union with itself as the vector $$V = [v_0\,v_1\,...\,v_{N-1}\,v_N\,v_{N-1}\,v_{N-2}\,...\,v_1]^\top$$
From there, the Fourier transform ... |
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 with one of the coordinate axes, I could use
bcs = DirichletBC(V.sub(0), g, 'on_boundary')
as Dirichlet condition. What ... |
I am planning to model the laminar flow reactor shown in the picture below using computational fluid dynamics (CFD). The laminar flow reactor is used to study a multiphase flow: a layer of sheath air that cushions a stream of aerosols.
Currently, I am in the process of narrowing down the software to be used. In my (li... |
I'm applying finite-difference method to a system of 3 coupled equations. Two of the equations are not coupled, however the third equation couples to both the other two. I noticed that by changing the order of equations, say from $(x, y, z)$ to $(x, z, y)$ that the coefficient matrix becomes symmetric.
Is there any adv... |
Given a Dolfin Function u on a mesh, I'd like to check if it is greater than 0 throughout the mesh. I noticed that the expression
u > 0
is an object of the type
GT(Coefficient(FiniteElement('Lagrange', Domain(Cell('triangle', 2), 'triangle_multiverse', 2, 2), 2, None), 0), Zero((), (), {}))
How can I evaluate that th... |
I am trying to get an interpolation function $f$ (in 3D) at all vertices of cells. I extract all vertices of cells and then I assign the value to each vertex: if it's in a sphere of radius $R$, then I assign the value, say 3.91. If it's outside the sphere, then I assign the value 0. I got it running without the error m... |
I am trying to calculate a 3D Function f on a large set of points, say a uniform cubic grid. Besides, the cubic grid points do not coincide with the mesh vertices where the Function f is defined. For example:
from dolfin import *
mesh1 = Mesh( meshfile) # A uniform mesh
V1 = FunctionSpace(mesh1, 'CG', 1)
f1 = Function(... |
I'm currently learning the maximal margin classifier with kernels, and I'm wondering - why do they work? In which cases do they work best?
I'm especially interested in the RBF and polynomial kernels, but not only.
|
I've been trying to find some resources that would help me figure out how to numerically solve a coupled system of ODEs which is also an eigenvalue problem.
The system is something like:
$ \tag{1} \kappa h_2(r) +\kappa r h'_2(r)+ (1+\kappa) W_3(r) + (1+ \kappa)
r W'_3(r)+ (1 + \kappa) r^2 W''_3(r) = 0 $
$ \tag{2... |
Given a vector-valued Dolfin function u from the function space V*V with V=FunctionSpace(mesh, 'CG', 2), how do I extract
$$
\max_{x\in\Omega} \|u(x)\|
$$
? An approximation works, too.
|
I have a job already submitted to a TORQUE queue. The system I submitted it on has several queues, and I want to change which queue I'm running it in. I found this question, which recommends the use of qalter, but qalter's man page doesn't have instructions for changing the queue.
EDIT:
I tried qalter -q <queuename> <j... |
I'm using the Crank-Nicolson finite difference scheme to solve a 1D heat equation. I'm wondering if the maximum/minimum principle of the heat equation (i.e. that the maximum/minimum occurs at the initial condition or on the boundaries) also holds for the discretized solution.
This is probably implied by the fact that ... |
I solved the steady state dynamic linear elastic model in a solid. My equation is a function of frequency and the strong form is:
$$\operatorname{div}(\operatorname{stress}(\vec x, w)) + w^2 \rho u( \vec x,w)=0$$
where $\rho$ is the density.
The BC is
$$ \sigma(\vec x,w) \cdot n(x)=T(x,w), \qquad u(x,w)=U_0$$
The ... |
Given a real-rectangular matrix $S$ and inorder to solve this simple quadratic programming problem:
Minimize $w'S'Sw = ||S w||^2$ over $w$ subject to
$e^Tw = 1$ and $w \geq 0$
using a solver I want a re-parametrization of the problem to the form:
$\min(-d^T b + 1/2 b^T D b)$ with the constraints
$A^T b \geq b_0$
so tha... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.