11.07.2015 Views

PETSc Tutorial - The ACTS Toolkit

PETSc Tutorial - The ACTS Toolkit

PETSc Tutorial - The ACTS Toolkit

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Profiling <strong>PETSc</strong>Efficient Matrix CreationCreate matrix with MatCreate()Set type with MatSetType()Determine the number of nonzeros in each rowloop over the grid for finite differencesloop over the elements for finite elementsneed only local+ghost informationPreallocate matrixMatSeqAIJSetPreallocation()MatMPIAIJSetPreallocation()M. Knepley (ANL) <strong>Tutorial</strong> <strong>ACTS</strong> ’06 45 / 166

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!