[petsc-dev] style guide

Smith, Barry F. bsmith at mcs.anl.gov
Tue Feb 20 10:25:53 CST 2018



> On Feb 20, 2018, at 10:21 AM, Kokron, Daniel S. (ARC-606.2)[CSRA, LLC] <daniel.s.kokron at nasa.gov> wrote:
> 
> Developers,
> 
> I am working with a CFD code that makes heavy use of PETSc.  The case spends most of it's time dealing with 9x9 matrices.  I spent some time adding kernels for dealing with 9x9 matrices under src/mat/impls/baij/seq.  I have also re-written chunks of src/vec/vec/impls/seq/dvec2.c to reduce memory transfer requirements.  Overall, I'm seeing about a 10% speedup for this case.  I'd like to submit these changes for inclusion into a future release.
> 
   Thanks for your potential contributions.

> I have followed style guide excepts that I still have a few chunks of code in several 'include' files located under my src/vec/vec/impls/seq directory.  They currently have names like Case3.c and Case16.c.  Should I just move these to the top level include directory and be done with it

   We definitely don't want them in the top level include files. 

> or convert them to 'defines' and put them in some other location?

    We prefer to PETSC_STATIC_INLINE functions over defines if that works. 

     You could make a pull request with your current code and then we'd know exactly what it looks like and could make concrete suggestions for changes.

   Barry


> 
> Daniel Kokron
> NASA Ames (ARC-TN)
> SciCon group



More information about the petsc-dev mailing list