Hi Ben and Roy,
The version of libMesh is 0.6.2. I modified src/mesh/unstructured_mesh.C,
add "(name.rfind(".unv") < name.size())" on line 385 to skip renumber nodes
and elements for .unv input file.
I use PETSc2.3.3. Running the code with -info, I find that Number of mallocs
during MatSetValues() is not 0 when calling system.solve().
In the system, there are peroidic boundary conditions applied through "
dof_map.constrain_element_matrix_and_vector(Ke,Fe,dof_indices);" before
system.matrix->add_matrix(Ke,dof_indices);
system.rhs->add_vector(Fe,dof_indices);
during  elements assemble iteration. I have used this method in libMesh0.5.0.
There is not PeriodicBoundary Class at that time. The periodic b.c. is
applied in libMesh0.6.2 just as in libMesh0.5.0. I don't know how to apply
periodic bc using PeriodicBoundary class. Is there any examples?

After call system.solve(); The info of PETSc is:
[0] PetscCommDuplicate(): Using internal PETSc communicator -2080374784
-2080374782
[0] PetscCommDuplicate():   returning tag 2147483643
[0] PetscCommDuplicate(): Using internal PETSc communicator -2080374784
-2080374782
[0] PetscCommDuplicate():   returning tag 2147483642
[0] MatAssemblyEnd_SeqAIJ(): Matrix size: 375 X 375; storage space: 3174
unneeded,34191 used
[0] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 2466
[0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 156
[0] Mat_CheckInode(): Found 375 nodes out of 375 rows. Not using Inode
routines
[0] MatAssemblyEnd_SeqAIJ(): Matrix size: 375 X 375; storage space: 0
unneeded,34191 used
[0] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 0
[0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 156
[0] PetscCommDuplicate():   returning tag 2147483619
[0] PetscCommDuplicate():   returning tag 2147483618
[0] PetscCommDuplicate():   returning tag 2147483617
[0] PetscCommDuplicate():   returning tag 2147483616
[0] PetscCommDuplicate():   returning tag 2147483615
[0] PCSetUp(): Setting up new PC
[0] PetscCommDuplicate(): Using internal PETSc communicator 1140850689
-2080374783
[0] PetscCommDuplicate():   returning tag 2147483614
[0] PetscCommDuplicate(): Using internal PETSc communicator 1140850689
-2080374783
[0] PetscCommDuplicate():   returning tag 2147483613
[0] PetscCommDuplicate(): Using internal PETSc communicator 1140850689
-2080374783
[0] PetscCommDuplicate():   returning tag 2147483612
[0] PetscCommDuplicate():   returning tag 2147483641
[0] PetscCommDuplicate():   returning tag 2147483611
[0] KSPDefaultConverged(): user has provided nonzero initial guess,
computing 2-norm of preconditioned RHS
[0] PetscCommDuplicate():   returning tag 2147483610
[0] PetscCommDuplicate():   returning tag 2147483609
[0] PetscCommDuplicate():   returning tag 2147483608
[0] PetscCommDuplicate():   returning tag 2147483607
[0] PetscCommDuplicate():   returning tag 2147483606
[0] PetscCommDuplicate():   returning tag 2147483605
[0] PetscCommDuplicate():   returning tag 2147483604
[0] PetscCommDuplicate():   returning tag 2147483603
[0] PetscCommDuplicate():   returning tag 2147483602
[0] PetscCommDuplicate():   returning tag 2147483601
[0] PetscCommDuplicate():   returning tag 2147483600
[0] PetscCommDuplicate():   returning tag 2147483599
[0] PetscCommDuplicate():   returning tag 2147483598
[0] PetscCommDuplicate():   returning tag 2147483597
[0] PetscCommDuplicate():   returning tag 2147483596
[0] PetscCommDuplicate():   returning tag 2147483595
[0] PetscCommDuplicate():   returning tag 2147483594
[0] PetscCommDuplicate():   returning tag 2147483593
[0] PetscCommDuplicate():   returning tag 2147483592
[0] PetscCommDuplicate():   returning tag 2147483591
[0] KSPDefaultConverged(): Linear solver has converged. Residual norm
2.55487e-11 is less than relative tolerance 1e-10 times initial right hand
side norm 1.03162 at iteration 18
[0] PetscCommDuplicate(): Using internal PETSc communicator -2080374784
-2080374782
[0] PetscCommDuplicate():   returning tag 2147483640
[0] PetscCommDuplicate():   returning tag 2147483590
[0] VecScatterCreate(): Special case: sequential vector general scatter

Sincerely
Shengli

2008/3/19, Benjamin Kirk <[EMAIL PROTECTED]>:
>
> > Hi, Libmesh Users
> > I find the stiffness matrix assembling is very slow at the first time.
> But
> > it is very quickly at the second time and laters for the same system.
> > It needs 2 hours to assemble the stiffness matrix of the 3d stokes
> system
> > with 15,000 dofs. How to speed up the process of assembling the system
> > stiffness matrix at the first time?
> > I find the similar question in the maillist. The title is "assembling a
> > PetscMatrix".
> >
>
>
> Can you verify that ex11 runs quickly?
>
> It is important that the PETSc sparse matrices be efficiently
> preallocated,
> otherwise matrix insertion can cause a cascade of dynamic memory
> operations.
> In this case all subsequent assemblies will be fast because the memory is
> already allocated.
>
>
> You can verify that this is working by running the code with -info (at
> least
> for PETSc 2.3.3)
>
> You should see something like:
> [0] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 0
>
>
> -Ben
>
>
>


-- 
Best regards,

Yours sincerely
ShengliXu
Department of Engineering Mechanics
State Key Laboratory of Structural Analysis for Industrial Equipment
Dalian University of Technology
Dalian, 116023, P. R. China
Email: [EMAIL PROTECTED]
==========================
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to