← Back to team overview

dolfin team mailing list archive

Re: Running bigger jobs and normalizing

 

On Tuesday April 6 2010 11:54:34 Nathan Borggren wrote:
> Hello,
>     I'm trying a 3D analogue of the advection-diffusion demo with a
> few other modifications and am having a couple troubles that I'm
> hoping to resolve.
> 
> Say I have:
> 
> u0 = Function(Q)
> v0 = Expression("exp(-x[0]*x[0]-x[1]*x[1]-x[2]*x[2])")
> u0.interpolate(v0)

To get the expansion coefficients, which you want to normalize you:

  v = u0.vector()

and then normalize the coefficients by the integral of the function

  v /= assemble(u0*dx, mesh=mesh)

or in one line:

  u0.vector()[:] /= assemble(u0*dx, mesh=mesh)


Regards,

Johan

> and would like to normalize u0 without changing the expression.  What
> is the best way to do this?  I would like to be able to insure at each
> time step that the function is positive everywhere and integrates over
> the mesh to 1.  the normalize() command seems to require a vector.
> 
> also when I ask for to large of a mesh I get an out of memory error as
> below.  I didn't manage to find a solution in the suggested documents.
>  I'd like to still run everything on my humble intel Duo Core on my
> desk.  Is there away to make it just take longer rather then all out
> crashing?
> 
> Thanks,
>    Nathan Borggren
> 
> error message:
> 
> Applying boundary conditions to linear system.
> Solving linear system of size 110592 x 110592 (PETSc LU solver, umfpack).
> 
> UMFPACK V5.2.0 (Nov 1, 2007): ERROR: out of memory
> 
> [0]PETSC ERROR: --------------------- Error Message
> ------------------------------------
> [0]PETSC ERROR: Error in external library!
> [0]PETSC ERROR: umfpack_UMF_numeric failed!
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: Petsc Release Version 3.0.0, Patch 8, Fri Aug 21
> 14:02:12 CDT 2009
> [0]PETSC ERROR: See docs/changes/index.html for recent updates.
> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
> [0]PETSC ERROR: See docs/index.html for manual pages.
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: Libraries linked from /home/nborggren/Work/FEniCS/build/lib
> [0]PETSC ERROR: Configure run at Thu Feb  4 10:30:23 2010
> [0]PETSC ERROR: Configure options COPTFLAGS=-O3 --with-debugging=0
> --with-shared=1 --with-clanguage=cxx --download-umfpack=1
> --prefix=/home/nborggren/Work/FEniCS/build
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: MatLUFactorNumeric_UMFPACK() line 176 in
> src/mat/impls/aij/seq/umfpack/umfpack.c
> [0]PETSC ERROR: MatLUFactorNumeric() line 2396 in
> src/mat/interface/matrix.c [0]PETSC ERROR: PCSetUp_LU() line 222 in
> src/ksp/pc/impls/factor/lu/lu.c [0]PETSC ERROR: PCSetUp() line 794 in
> src/ksp/pc/interface/precon.c [0]PETSC ERROR: KSPSetUp() line 237 in
> src/ksp/ksp/interface/itfunc.c [0]PETSC ERROR: KSPSolve() line 353 in
> src/ksp/ksp/interface/itfunc.c
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help   : https://help.launchpad.net/ListHelp



References