instruction
stringlengths
43
28.1k
What is the difference between explicit FEM and implicit FEM exactly? According to the post here, it seems that the only difference is whether implicit or explicit time integration is used. As I remember from one book that I read, implicit FEM is where the mass is not lumped to the nodes. What are the exact definitions...
I have a set of users who have won a game ('jim', 12), ('james', 54), ('john', 76), ('dave', 22), ('garry', 34), ('stuart', 16) I want to award them a share of points based on their position in the game on a sliding scale. The 'global pot' is $100 and I would like the winner to get the most with other users getting le...
I am comparing two iterative methods for inverting random square matrices. Since the matrices are random, every test case takes both different amounts of iterations and different elapsed times. My question is, on top of mean CPU time, is the mean value of iterations taken by both the methods useful information for co...
I just started working on some Biophysics research, and I was looking around for a good MD library to use. There is one right now at the university set up in C, with openMC parallelization, but the code is so hacked together at this point that it is hard to tell what is going on. I do have access to a computing cluster...
Following from my previous question I am trying to apply boundary conditions to this non-uniform finite volume mesh, I would like to apply a Robin type boundary condition to the l.h.s. of the domain ($x=x_L)$, such that, $$ \sigma_L = \left( d u_x + a u \right) \bigg|_{x=x_L} $$ where $\sigma_L$ is the boundary value;...
I'm trying to solve this problem using genetic algorithms and am having difficulty choosing the fitness function. My problem is a little different than the original Traveling Salesman Problem, since the population and maybe also the win unit do not necessarily contain all the cities. So, I have 2 values for each unit: ...
I have an issue of finding the cut sets of large voxel sets. The voxels are assumed connected if they touch by face/edge/vertex (can vary), and ideally what I want is given any two members of the set to find a minimal cut set of voxels that separates them into two components. The sets are 'large', 10^7 upwards, so I'm ...
After doing some research, I've found that most of the literature on operator splitting methods (e.g. Strang Splitting, Fractional Step, etc.) are specifically designed for a standard problem type of the form: $$u'=(A+B)u.$$ In my application, I have a slightly different form: $$Mu'=(A+B)u$$ where $M$ is not the identi...
I have worked out some poor code to achieve the goal of 3D Delauney triangulation(random points in E3), but the time consuming is huge, and when five points are exactly (or nearly due to the round-off error) on one sphere, my code can not handle this situation properly. I use the basic data-structure which is a list of...
I want to approximate the integral: $$ I = \int f(\boldsymbol{x})d\boldsymbol{x} $$ where $\boldsymbol{x}$ is $d$-dimensional. I have a set of non-equally spaced points $\boldsymbol{x}_1, \dots, \boldsymbol{x_n}$, and the corresponding values $f(\boldsymbol{x}_1), \dots, f(\boldsymbol{x_n}$), and I would like to use t...
For 1D derivative we have \begin{equation} F(x) = \frac{\partial f(x)}{\partial x} \end{equation} \begin{equation} f(x)=\sum_{i}f_ie_i(x) \end{equation} \begin{equation} F(x)=\sum_{i}F_ie_i(x) \end{equation} where $e_i(x)$ are the FEM basis functions. We can then apply the Galerkin procedu...
I'm testing Quicksort based on Niklaus Wirth algorithm. I'm checking how much time I need to sort an array. There is interesting thing that for an array consisting elements in these sequence: 1 3 5 7 9 10 8 6 4 2 (example how an array looks like for bigger instance) 0.14 seconds - array with ...
Suppose I have a time-dependent PDE discretized by the Rothe method and FEM, like $$ \int_{\Omega} k^{n+1/2}(u^{n+1}-u^{n}) v \;\mathrm{d}x = F^{n+1/2}(u^{n+1},u^n)[v] \quad \forall v\in V_h^n. $$ What is a good way of quantifying the difference between a transient solution $u^{n} \in V_{h}^{n}$ and a stationary solu...
I was attempting to do a discrete Fourier transform through a computer program on a list of numbers. Before doing that I decided to test it by running through a list of 1000 numbers which I created by summing 20 sine waves which were created by the formula sin(2*pi*integer between 1 and 1000/ desired frequency). Based ...
I have a set of known points/nodes irregularly spaced in N-Dimensional space (N>=2), and I would like a way to generate the Delaunay triangulation of these points, and return the corresponding elements. Are there any existing meshing libraries that will do an N-D Delaunay triangulation? (I am doing this because I want...
Disclaimer In the process of typing up this question, I determine its solution. Since I went through the trouble of typing up the question in its entirety, I will post its answer as well. It may help out others who find themselves in the same predicament. Think of this as a sort of blog-post, if you will. The Goal C...
I want to develop a visual simulation of a propagating 2D wavefunction with an added attractive potential. Basically I have to numerically solve the time-dependent Schrodinger equation (PDE with x,y,t as variables) but, instead of boundary conditions, I want to have an incoming wavefunction of my choice as the initial ...
How to do transpose for trtrs (or tptrs) in blas? I want to solve: XA = B But it seems that trtrs only lets me solve: AX = B Or, using the 'transpose' flag, in trtrs: A'X = B which, rearranging is: (A'X)' = B' X'A = B' So, I can use it to solve XA = B, but I have to first transpose B manually myself, and then, agai...
I'm compiling a blas to use with scalapack. Some blases, such as openblas, are naturally multithreaded, but scalapack uses mpi, so maybe needs a single-threaded blas? My questions then are: does scalapack need a multi-threaded blas? a single-threaded blas? or it will work just fine on either because, for example, i...
I am given a $12 \times 12$ matrix $Q$ that is symmetric, invertible, positive definite and dense. I need to test if $$\det(Q) = \det(12I-Q-J) \; \; (1)$$ where $J$ is the all ones matrix. I am currently doing this with the armadillo library but it turns out to be too slow. The thing is that I need to do this for a tri...
Overview My understanding is that one should use a time step $\Delta t < \frac{h}{v}$ (where h - smallest mesh element, v - velocity) to get an accurate result. But how important is this really for the accuracy of the simulation? Is it as important as having an independent mesh? Is there even such a thing as a time ste...
Hello there and thanks for taking a look at this problem. This problem is related to my previous question and I will therefore use a similar introduction from, Choice of step size using ODEs in matlab. Introduction: I'm currently studying a 2D exciton spinor Bose-Einstein Condensate and am curious about the ground sta...
What libraries can compute dense Cholesky factorizations in distributed-memory environments (preferably using MPI). I'm using C/C++, and have access to a cluster of between 1 and 40 nodes, where each node has 12 cores. I've heard of ScaLAPACK but am interested in alternatives.
I would like to use a high-quality renderer (physically based path-tracing or MLT) to generate some images of molecular systems I have. Right now I'm just using some of the simple renderers in VMD, but I am curious if anyone has developed a plugin for something like Indigo Renderer or Luxrender? Essentially it would c...
This is maybe a trivial question, but I am stuck with the problem. Suppose we have a general graph: $$G=(V,E)$$ Each edge represents a task, each vertex represents a data for the task (hence each task works with two vertices). When two tasks with common vertex run in parallel, some computation time is lost because two ...
I have a $50000\times 50000$ matrix $A$ sparse matrix containing only 5 non-zero elements in each row. Now the problem is that the diagonal elements and the constants (in $B$ matrix such that $AX=B$) get updated after every iteration. If I go by the usual Matlab function inv or via Gauss Elimination, it takes around 13...
I'm currently looking into parallel methods for ODE integration. There is a lot of new and old literature out there describing a wide range of approaches, but I haven't found any recent surveys or overview articles describing the topic in general. There's the book by Burrage [1], but it's almost 20 years old and hence ...
I'd like to compute $u(y) = \int f(x,y) dx$, but don't see a really efficient way to do this in FEniCS. My first thought was to just assemble(f*v*dx) for two different meshes. (try1, below), but it seems I can't combine 1D and 2D meshes, and that the DG meshes have to have at least 2 basis functions in each direction,...
I'm new here so please forgive me if I lack proper stack exchange etiquette. So, I was wondering if anyone here could provide insight on a problem that I am running into with with a Hartree-Fock calculation. I wrote a code from scratch that attempts to calculate the HF energy and basis for a 1D potential that is suppo...
I want to use the PETSc library to do some numerical work on finite element and parallel computing, but I wonder what I should know first to use these libraries. Could you give me some guiding information? Any answer of comment will be appreciated. Thank you.
I have a Matrix<double> on a single core, the result of doing an MPI_Reduce. I want to do the Cholesky, so I need to distribute over multiple cores. What's the easiest/most standard way of doing this in Elemental? Do I need to MPI_Bcast it out to all nodes first, and then move it into a DistMatrix, or is there some w...
TVD (total variation diminishing) finite difference methods that produce non-oscillatory solutions are based on the total variation. In LeVeque's book the total variation of a function $q(x)$ is defined as (p. 109) $TV(q)=\sup\sum_{j=1}^N\left|q(\xi_i)-q(\xi_{i-1})\right|$ where "the supremum is taken over all subdivis...
What implementation details need to change if I use a cell average approach rather than a cell total approach for the finite-volume method? For example, consider the conservation law, $$ u_t + \mathcal{F}_x = s(x,t) $$ A cell average approach yields, $$ \frac{\partial}{\partial t}\int_{x_{j-1/2}}^{x_{j+1/2}} u(x,t)~dx ...
Is there any free / open source solution to search for the minimum energy path with the nudged elastic band method in combination with the Turbomole Package?
How to make Elemental Gemm run quickly? I have the following code: #include "elemental.hpp" using namespace std; using namespace elem; extern "C" { void openblas_set_num_threads(int num_threads); } int main( int argc, char *argv[] ) { Initialize( argc, argv ); const mpi::Comm comm = mpi::COMM_WORLD; c...
Quiet a lot of insight can be gained form experience, I was just wondering if anybody has seen something similar to this before. The plot shows the initial condition (green) for the advection-diffusion equation, then the solution at iteration 200 (blue) and then again at iteration 400 (red). The solution of the advect...
I have two FMU developed with different simulation tools. I would like to connect them through some variables and run a co-simulation with an open source tool as OpenModelica. This co-simulation has to be rather tight as both FMU have discontinuities. Is that possible?. Could you provide a simple sample?
In some linear program that is hard to find an initial feasible point, simplex method will fail in its phase one algorithm. But we can find such a feasible point through other method such as genetic algorithm: the problem is such solution may have many "noise" of small numbers for some coordinate. We want to use simple...
I have written a short example to run the simplex algorithm with coin-or Clp, something quite simple like this: ClpSimplex solver; solver.readLp(file_in); solver.initialSolve(); if(solver.isProvenOptimal()) { int ncol = solver.getNumCols(); const double *solution = solver.getColSolution(); for(int i=0; i<...
I would like to know which is the algorithm Comsol uses in order to correct the time step it uses. For example, when you try to solve an equation you've written in the PDE coefficient interface, and you set free time-step, Comsol automatically choose the time step in order to obtain the specified absolute error. Anyway...
CHOLMOD is very fast, but I am just wondering what kinds of size A such that it can solve Ax=b. I have a A of 200,000 * 200,000, but it outputs errors" problem too large". I am very appreciated if anyone can tell me which solver/software for numerical computing can solve such large size problem. Thanks!
I'm comparing the performance of distributed gemm, using Scalapack over OpenBLAS, with threaded gemm, using OpenBLAS. It seems quite hard for me to get scalapack to give better results than multithreaded BLAS. Is there some tweaking/optimization/configuration I need to do, or something I need to do differently someho...
I want to implement thin spline interpolation of scattered elevation data $ \{z_i(x_i,y_i)\}_{i=1..n} $ in C++. This seems fairly simple using Radial Basis Functions: $$ z(x,y) = p(x,y) + \sum_i l_i\phi(r)$$ where p(x,y) is a polynomial and $\ \phi= r^2\ln(r) $ . Requiring the interpolated surface to go exactly trough ...
Changing cholmod_* to cholmod_l_* results in the following error: sparse:error: integer and real must match the routines What does this error message mean? This message shows after cholmod_l_start(&c); cholmod_l_print_sparse(A,"A",&c) and then the following steps L = cholmod_l_analyze(A,&c); cholmod_l_factorzie(...
I am trying to solve numerically next PDE system: $$\frac{\partial c}{\partial t}=\epsilon\frac{\partial}{\partial x}(\frac{\partial c}{\partial x}+\rho\frac{\partial \varphi}{\partial x}+\frac{vc}{1-vc}\frac{\partial c}{\partial x})$$ $$\frac{\partial \rho}{\partial t}=\epsilon\frac{\partial}{\partial x}(\frac{\partia...
Given a real symmetric matrix $M$, ostensibly of "low rank", efficiently find an expression $M = \sum \alpha_i u_i u_i^T$ using the number of terms rank($M$). A 2011 StackOverflow Question Dense Cholesky Update in Python asked about doing low rank updates to Cholesky decompositions, but was answered largely with ways t...
I would like to apply Dirichlet conditions to the advection-diffusion equation using the finite-volume method. This answer, "How should boundary conditions be applied when using finite-volume method?" emphases the benefit of staying with integral form of the equations for as long as possible. This works fantastically f...
I have to write a finite volume code for Magnetohydrodynamics (MHD). I have written numerical code before but not at this scale. I just wanted to ask which will be a good choice, using a data structure (object orientated approach) with classes or just using multiple arrays for different properties, in terms of speed, s...
I want to numerically solve the non-linear diffusion equation: $$ \frac{\partial}{\partial t} T(x,t)= \frac{\partial}{\partial x}\left(T^{5/2} \frac{\partial T}{\partial x} \right) $$ I want to use finite difference approach to solve it via Crank-Nicolson method. But I don't understand how to treat the non-linear coeff...
my question is between mathematics, physics and informatics. Suppose i have an Hamiltonian (hermitian matrix) that i can diagonalize. The matrix that allows this transformation is a unitary matrix build with the eigenvectors of my Hamiltonian. Now suppose I select only the $n$ first eigenvectors of length $m$. The matr...
I'd very much appreciate if you could help me out with this as I think I'm missing something simple out or should be using alternate syntax: I am running the following Python code in FEniCS, where I solve for a variable - the solution looking as I expect it to, so no problems there, now I wish to solve a next equation ...
I am using an Euler-Euler method to model two phases - both are treated as a continuum using modified Navier-Stokes equations. One phase is air and the other is particles, that are being entrained by the air. The original geometry is very small, the airpath being 2 x 20 mm. When the mesh is scaled up 10 times (grid fin...
Monte Carlo simulations for MATLAB sometimes require a huge usage of CPU and in some cases may take a long time. MATLAB has provided some structures in order to enable the parallel processing. But I have been intrested in using the processors of the graphical card (GPU)... Is there any tutorial for using GPU in order...
I have X, Y and Z variables in matrix form, each of size n x 1. Eg.: X = [-38.0400, -38.6700, -38.9300, -39.4500...] Whenever I run the code below: % find center of X minx = find(X==min(min(X))); maxx = find(X==max(max(X))); centx = (minx + maxx) / 2; xy = Y(centx); xz = Z(centx); centx = [centx xy xz]; I'll get the...
I'm trying the Torque scheduler. I have previous experience with the LSF scheduler, and I quite like being able to use 'bsub -I make -j 12' to compile a program really quickly, i.e. running an 'interactive' job, and seeing any errors as they happen. Now, there is an interactive option in Torque, but it's really, reall...
I have some large (n~100) square matrices with entries two variable polynomials of bounded degree (roughly <20, but many entries are smaller) and integer coefficients, and I'd like to be able to compute their determinants (exactly, as two variable polynomials with integer coefficients). What method should I use? Is th...
I have a certain ODE problem that needs to be solved using Scilab. dx(1)/dt=k*x(1)-x(5) dx(2)/dt=k2*x(2)-k1*x(1) dx(3)/dt=k1*[x(2)-x(3)] dx(4)/dt=k1*[x(3)-x(4)] x(5) takes value 0 till time t0 Can anyone help me with coding this problem? Any suggestions would be of immense help.
For a project, I have to implement these two methods and compare how they perform on different functions. It looks like the conjugate gradient method is meant to solve systems of linear equations of the for $$ A\mathbf{x} = \mathbf{b} $$ Where $A$ is an n-by-n matrix that is symmetric, positive-definite and real. On t...
My code solves the incompressible Navier-Stokes equation in a conducting fluid, together with the induction equation: $ \partial_t u + u \nabla u + 2\Omega \times u = -\nabla p + \nu \Delta u + (\nabla \times b) \times b \\ \partial_t b = \nabla \times (u \times b) + \eta \Delta b$ where $u$ and $b$ are the velocity an...
I have just read "Accelerating the convergence of spectral deferred correction methods". The link is here: http://www.unc.edu/~junjia/papers/sdcgmres.pdf‎. But I wonder how to understand deferred correction method. Can you give me a description of this method? Or any other papers or books to read to understand this met...
I am interesting in solving the following nonlinear, time-dependent pde in 2 spatial dimensions (complex Gross-Pitaevskii eq): $$i \frac{\partial \psi}{\partial t} = \left[ -\nabla^2 + (1-i \sigma)(|\psi|^2-1) \right] \psi$$ The goal is to find steady state solutions for the function $\psi(x,y,t)$, for different parame...
The Parareal, PITA, and PFASST algorithms are all across-the-domain techniques for parallelizing the solution of time-dependent problems in time. What are the guiding principles behind these methods? What are the main differences between them? Can I say that one is based on another? How? What about their applications...
I have got an input series of matrices $A_1, A_2, A_3, \dots $ and the difference between $A_i$ and $A_{i+1}$ is the replacement of one single column. Before i get to know $A_{i+1}$, I have to compute $A_i^{-1} b$ for some fixed vector $b$, so I also have a series of vectors $A_1^{-1}b, A_2^{-1}b, A_3^{-1}b, \dots $ to...
I need to evaluate the following derivative: $$\frac{1}{\prod_i \xi_i!}\frac{1}{\prod_j \eta_j!} \left.\frac{\partial^{\xi_1 + \cdots + \xi_m}}{\partial\alpha_1^{\xi_1}\ldots\partial\alpha_m^{\xi_m}} \frac{\partial^{\eta_1 + \cdots + \eta_n}}{\partial\beta_1^{\eta_1}\ldots\partial\beta_n^{\eta_n}} \exp\left(\sum_{ij} a...
I'm trying to train an L2-regularized L1-hinge loss SVM using vowpal-wabbit. I use the following commands to train and test on the splice dataset: time vw --passes 10 -c --loss_function hinge -f model.txt -d train_vw.txt --l1 0 --l2 1 time vw -t -i model.txt -p out.txt -d test_vw.txt perf -ACC -files test.labels out.tx...
I'm looking for an efficient, multicore, library to do incomplete cholesky (possibly modified). Many ILU code exists, but I can't find much about IC except in PETSC or Pastix. Could some of you drop me any library name ? Thank you ! Tom
When going from the strong form of a PDE to the FEM form it seems one should always do this by first stating the variational form. To do this you multiply the strong form by an element in some (Sobolev) space and integrate over your region. This I can accept. What I don't understand is why one also has to use Green's f...
Can you all give me (at least) one example about convection-dominated problem in order that I can test it (them) on FreeFEM++. If possible, please give me specific examples (it/they contain(s) full equations, boundary condition, initial condition, value of parameters, code in FreeFEM++,...)
I need to solve the following system of differential equations. When I have the solutions for $n_f$ and $v$, I need to find and plot $J=-e_\cdot n_{f} \cdot v$. I wrote a code in matlab with all ODEs like this: function systemSolve clc tr=50e-12; % Recombination lifetime n0=1e11; ...
There are several variants of the simplex method known, which differ by the choice of entering and leaving variables. But neither have I found a reference, which variants are used in which applications, nor have I found an attempt to compare the run-time of those methods. I suspect that a fair share of these variants h...
I need to build a system in Simulink that solves a PDE, but I can't find any literature or books where it is described how to do it (especially any stuff according to modeling PDE in Simulink). Please give some advice where I can find such literature. Thanks beforehand!
In discussing smoothing filters, Numerical Recipes p. 772 says ... irregularly sampled data, where the values $f_i$ are not uniformly spaced ... one can simply pretend that the data points are equally spaced ... a rough criterion: If the change in $f$ across the full width of the $N$ point window is less than ...
For a given 3D domain, two unstructured tetrahedral meshes M_1 and M_2 are generated. The average edge length in M_1 is double the average edge length of M_2. Are there estimates on the ratio of the number of tetrahedra in both meshes?
I'm writing some image processing software to detect bubbles in oil at work. One of the image filters I need (Perona Malik) seems like it will take a long time to compute. (It involves solving some partial differential equations numerically). One possible solution I'm thinking of investigating is using a super computer...
How to divide a surface to subdomains, which can be recognized in msh file? Avoiding duplicated nodes is necessary. In general I have geo file which contains definition of smaller and bigger region, now I would like to assign different physical surfaces (tags) to both - but right now is impossible due to only one plane...
Based on the variational principle, one might expect that the ground state energy of a density functional theory (DFT) calculation will decrease as the basis set size increases. (As I understand it, this is the case in Hartree-Fock.) Mathematically speaking, is it in fact true that the DFT energy decreases with basis s...
I would like to find the optimal set $ \{ x_i \} $ given $ L $ and $ \{ a_i \} $ that minimizes the problem below. My first thought was to use linear programming. Is there a transformation that makes it possible, or do I need a more general optimization technique? $$ \min_{x_i} \left[ 2\sum_i | x_i | + \max_i | x_i ...
The advection-diffusion problem, where $0<x<1$, $$u_t = (-au + du_x)_x$$ with Dirichlet boundary conditions, $ u(0)=1,~u(1)=0 $ , has the steady-state solution, $$ u(x) = \frac{e^{\lambda} - e^{x\lambda} }{e^{\lambda} - 1} $$ This of course assumes both $a$ and $d$ are constants and $\lambda=a/d$. Q. Does this proble...
I have a set of column vectors $[v_1,v_2,v_3,...,v_k]$ and I want to get the orthonormal basis $P$ for the range of those vectors. I use modified Gram-Schmidt to do orthogonalization. If $v_3$ is a linear combination of $v_1$ and $v_2$, when we orthogonalize $v_3$, it will return a $0$-vector. My problem is when a vect...
In MPI, is there any built-in mechanism to notify a group of processes that they need to receive messages from other processes? In my application every process needs to send data to a group of processes with known rank IDs (which potentially changes at each iteration), but they do not know the rank of the processes th...
I would like some super simple computational code for solving magnetohydrodynamics problems. High accuracy nor performance is not my concern. I wan't it just to visually explore qualitative behavior of plasma. Important for me is: Generality - it should not be specialised on any particular subproblem of MHD Easy to g...
I'd like to do a $A=QR$ decomposition of a matrix $A$, with $m\times n$. I use dgeqrf_ (or dgeqp3_) to proceed to the first part of the decomposition. Then, I can easily compute the matrix $R$ by taking the upper diagonal part of the output matrix. If $A$ is such that $m > n$, the Lapack subroutine dorgqr_ create the ...
I need to examine the (static) electric field distribution around various electrode configurations in the presence of a dielectric, and have been using a finite difference approach to the 2D generalised Poisson equation do this. James Nagel's nice paper at http://www.drjamesnagel.com/notes/Nagel%20-%20Numerical%20Pois...
The discrete analogue of the $L_p$ norm for the mesh function $V$ is $$\|V\|_{l^p(\bar{\Omega}^N)}=\left(\sum_{i=0}^NV_i^p\bar{h}_i\right)^{1/p}$$ where $\bar{\Omega}^N$ is an arbitrary mesh, $\bar{h}_i=(h_{i+1}+h_i)/2$ and $h_i=x_i-x_{i-1}$. The error $e$ of a certain approximation is such that $e_i=-e^{-x_i/\epsilon...
I would like to gain knowledge on available free or commercial tools to generate automatically structured mesh from geometry, particularly quadrilateral. Which options do I have ?
I'd like to find a condition that allows me to determine if a matrix is invertible or not. naively, I computed the determinant to see if it was zero. but then I realized that even for very small values (1e-100), lapack is still able to find an invert matrix. I read here that a $QR$ factorization can be used to compute ...
After exporting the solution (u) and the mesh (p, e, t) from pdetool to workspace, I need to compute the solution at a set of predefined points. These predefined points where the solution is sought are not uniformly spaced and are scattered in the xy space. I know that if one has the solution (u) from pde toolbox, it c...
I am trying to implement the following system of time-dependent, coupled nonlinear pdes in FEniCS: $$\partial_{t}\rho+2\left(\nabla\rho\nabla\phi+\rho\nabla^{2}\phi\right)+2\sigma\rho\left(\rho-1\right)=0$$ $$\partial_{t}\phi+\left(\nabla\phi\right)^{2}-\frac{1}{2}\left[\frac{\nabla^{2}\rho}{\rho}-\frac{1}{2}\frac{\lef...
On page 18 of SuperLU's user guide, the following sample input matrix A is given: 19,0,21,21,0 12,21,0,0,0 0,12,16,0,0 0,0,0,5,21 12,12,0,0,18 U matrix is given as follow in the user guide: 19,0,21,21,0 0,21,-13.26,-13.26,0 0,0,23.58,7,58,0 0,0,0,5,21 0,0,0,0,34.2 But dgssv() produces the following matrix, which is p...
I want to solve this PDE: Currently I have some code that will automatically generate pde solutions for a very similar pde that includes a time derivative (partial d/ partial t) using an ADI method. I'm wondering if there is a way to approximate the attached pde with a pde that includes a time derivative? I know ther...
I need to generate an output file from my molecular data that can be loaded into VMD to visualize the bond connectivity. I'm not sure what the best choice is. I know the PDB format has a HETATOM record with a CONECT field, but I believe this is supposed to be used only for unusual connections or very small molecules....
I am taking a shot at solving a coupled physics problem. I have this matrix formed: $\mathbf{J}=\begin{bmatrix} \mathbf{A} & \mathbf{B}\\ \mathbf{C} & \mathbf{D} \end{bmatrix}$ where $\mathbf{A}$ and $\mathbf{D}$ represent two different physics, and $\mathbf{C}=-\mathbf{B}^{T}$. Originally, I wanted to use the Schur ...
Consider an instance of non-convexoptimization problem: It seems that this problem is NP-complete. How can I find a suitable reduction for this?
I have a very sparse non-linear system $N(u) = 0$ that can be solved as a time-dependent ODE, $\frac{du}{dt} = N(u)$, and explicitly integrated until $\frac{du}{dt} = N(u) = 0$, e.g. by forward euler, $u^{n+1} = u^n+\Delta t N(u^n)$. In the process of this numerical integration, is there any way to recover the eigenval...
It seems to me many CFD codes in coding the turbulence models, uses the relation $\tau_{ij}{\partial _j}{U_i}=\tau_{ij}W_{ij}$ instead of using strain-rate tensor, i.e., $\tau_{ij}{\partial _j}{U_i}=\tau_{ij}S_{ij}$ for the sake of numerical friendliness, to estimate the production term $P_k=\tau_{ij}{\partial _j}{U_i}...
I have a nonlinear inequality constrained optimization problem of the form $$\begin{array}{cc} \min & f(x) \\ \textrm{s.t.} & g(x) \ge 0 \end{array}$$ where $x \in \mathbb{R}^n$, $f : \mathbb{R}^n \to \mathbb{R}$, $g : \mathbb{R}^n \to \mathbb{R}^m$. I am currently solving this system with pseudotransient continuation...
I am performing series of random projections i.e. projecting the input matrix onto randomly generated orthonormal bases (of much lower dimensionality). The projection is just a matrix multiplication like $A \cdot B = P$, where $B$ is the basis composed of several mutually orthogonal column vectors of unit length. I hav...
Are there high order energy-conserving or symplectic methods for solving $y'=f(y)$?
I wish to solve a coupled system of non-linear equation of this form, $$ u_t = -(\mathcal{F})_x + f(x,u,w) \\ w_t = \mathcal{F} + g(x,u,w) $$ by stepping the equations forward in time. The first equation is the advection-diffusion equation with non-linear reaction term, and where the flux has the definition, $$\mathca...
I have implemented a V-Cycle multigrid solver using both a linear defect correction (LDC) and full approximation scheme (FAS). My problem is the following: Using LDC the residual is reduced by a factor of ~0.03 per cycle. The FAS implementation does converge with a linear factor too, but the factor is only ~0.58. Thus ...