Re: Re: finite differencing of a PDE system
- To: mathgroup at smc.vnet.net
- Subject: [mg67723] Re: [mg67656] Re: finite differencing of a PDE system
- From: gregorc <gregor.cernivec at fe.uni-lj.si>
- Date: Thu, 6 Jul 2006 06:51:50 -0400 (EDT)
- References: <e8888u$92q$1@smc.vnet.net> <200607031038.GAA16538@smc.vnet.net> <acbec1a40607050108o4999ab27r6014aa907d8a66f4@mail.gmail.com>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Chris, > CoefficientArrays creates a 163779x155001 (m) matrix and a 163779x1 > (-b) matrix if I feed it the interior and boundary conditions. I think this should not happen. You should alway obtain square matrices since N = number of discretization points and DOF = number of degrees of freedom at each discretization point. N*DOF = total number of unknowns. Since theoretically each DOF at one discretization point could be in correlation with DOF at any other discretization point (Practically in 1D central point correlates with 2 adjacent points in 2D with 4 and in 3D with 6), the total size of the matrix should be N*DOF X N*DOF ?! > I could try LinearSolve with the homogeneous equations, but I have a > feeling the m matrix will be singular or that there will otherwise be > no solution. It certainly wouldn't be a solution corresponding to my > boundary conditions. Did you do proper scaling of your equations? > I could also try a least-squares fit (pseudo-inverse). That seems like > it should be unnecessary. This is the very last think you should try! If the scaling does not improve the conditioning of your matrix the matrix should be decoupled into several matrices, each for one DOF. Solving linear systems separately and with sequential substitution of the solution for previous DOF into the solution for new DOF will improve the the conditioning but worsen the convergence. The method is called Block-SOR-Newton. Cheers, gregor Chris Chiasson wrote: > First, thank you to my previous responders: > Gregor > Oliver Ruebenkoenig > > I changed my discretization of the interior PDEs so that they detect > when they're on the boundary and appropriately change from center > difference to forward or backward difference. > > current situation: > > CoefficientArrays creates a 155001x155001 (m) matrix and a 155001x1 > (-b) matrix if I just feed it the finite difference equations > generated from the interior PDEs. > > CoefficientArrays creates a 163779x155001 (m) matrix and a 163779x1 > (-b) matrix if I feed it the interior and boundary conditions. > > LinearSolve[m,b] only works for a square m. > > questions: > > How do I include the Dirichlet boundary conditions for the stress? > > poor solutions: > > I could try LinearSolve with the homogeneous equations, but I have a > feeling the m matrix will be singular or that there will otherwise be > no solution. It certainly wouldn't be a solution corresponding to my > boundary conditions. > > I could also try a least-squares fit (pseudo-inverse). That seems like > it should be unnecessary. > > Thanks again for any input you may give,
- References:
- Re: finite differencing of a PDE system
- From: Oliver Ruebenkoenig <ruebenko@uni-freiburg.de>
- Re: finite differencing of a PDE system