Merged petsc/petsc into rmills/petsc master
Merged petsc/petsc into rmills/petsc master
Merged petsc/petsc into rmills/petsc master.
Very incomplete work on adding DMLocalToLocalBegin()/End() operations.
SNES nonlinear elasticity example with buckling.
Fix for the analytical Jacobian in the elastic buckling example.
PCBDDC: bugfix in PCPostSolve_BDDC.

Right hand side was not get back to its original state when change of basis was not requested.
Parallel fix for BCs in elastic buckling example
Parallel fixes to jacobian on SNES elastic buckling example.
Merge branch 'prbrune/dm-coordinaterestrict' into prbrune/snes-elasticityexample
Domain decomposition fixes for analytical jacobian in buckling example.

Complex fixes too.
Make the default for elastic buckling be realistic parameters
Removed a bunch of redundant code from elastic buckling example
Added slow nonlinear GS to elastic buckling example.
Added faster, more complete nonlinear GS to nonlinear elastic buckling test
Made it easier to change the quadrature order and basis size
Merge branch 'prbrune/dm-coordinaterestrict' into prbrune/snes-elasticityexample
Merge branch 'dalcinl/libpetsc-abi' into maint
Bib: Added reference
Removal of TXPETSCGPU package from the SEQAIJCUSPARSE class

In this commit, I've removed the dependence of the SEQAIJCUSPARSE
class on the TXPETSCGPU package. However, other classes such as
SEQAIJCUSP, VECCUSP, and MPIAIJCUSPARSE, and MPIAIJCUSP still depend
on that package. These dependencies will be removed in subsequent
commits once the design and structure is agreed upon.

The reason for this dependency removal is that SEQAIJCUSPARSE only
depends on the Nvidia CUSPARSE library which comes standard with CUDA.
Thus, the SEQAIJCUSPARSE class should be built whenever PETSc is
built with CUDA support. This will be far more maintanable in the
long term. Lastly, most of the CUSP dependencies have been removed
from this class. The only remaining CUSP dependencies are in the
vector data structures used in MatMult* and MatSolve* methods.
These will be removed in a subsequent branch as it is not clear
what the architecture should be yet.

In order to accomodate all the different functionality for various
Krylov solves, two new data structures were defined in cusparsematimpl.h.
The first is a Mat_SeqAIJCUSPARSEMultStruct struct. This contains an opaque pointer
for a matrix, a MatDescription data structure, and indices vector which will
be useful in MatMultAdd functions. The second new data structure is a
Mat_SeqAIJCUSPARSETriFactorStruct struct. This contains an CSR Matrix pointer,
a MatDescription data structure, a solve analysis data structure and an
operation type.

Next, Mat_SeqAIJCUSPARSETriFactors was redefined to hold pointers
to up to 4 different Mat_SeqAIJCUSPARSETriFactorStruct structs: one for lower
and one for upper solves for both ILU and ICC. Two more for lower and upper
solves in algorithms that require a transpose, such as BiCG. The
latter two are necessary, as far as I can tell, because one doesn't
know until runtime if data structures for the transpose are needed
Thus, those are created on demand. Indexing vectors for reorderings
are also stored in Mat_SeqAIJCUSPARSETriFactors.

Lastly, Mat_SeqAIJCUSPARSE is the data structure that holds the
data needed in multiply. There are 2 pointers to Mat_SeqAIJCUSPARSEMultStruct
structs for MatMult and MatMultTranspose. Several auxilliary data
structures like workvectors and few other necessary data for MatMult
are also stored in here. One important variable, the cudaStream_t,
is stored here but it is not owned. Streams are necessary for the parallel
SpMV (a subsequent commit will add code setting stream variables from
the MPIAIJCUSPARSE class) and the matrices used in the MatMult and
MatMultAdd will then use the same stream identifier to attain optimal
performance. The MPIAIJCUSPARSE class will own the stream variable which
is then used in the SEQAIJCUSPARSE methods.

In matregis.c as well as the petscmat.h and finclude/petscmat.h,
I've changed the dependency of SEQAIJCUSPARSE to be on CUDA and
not TXPETSCGPU.

The test series TESTEXAMPLES_TXPETSCGPU has been changed to
TESTEXAMPLES_CUDA since SEQAIJCUSPARSE only depends on CUDA as
discussed above. ksp/ksp/examples/tests/ex43-aijcusparse.c has
been renamed to ksp/ksp/examples/tests/ex43.c, the targets in
the makefile have been changed appropriately and the results
fiels are renamed. Two new test targets were added in
ksp/ksp/examples/tests/makefile that test aijcusparse using
bicg (and thus the MatSolveTranspose and MatMultTranspose methods) as well as
bicg with reordering. The previous results for runex43_2.out (formerly
runex43-aijcusparse_2.out) were wrong and so I'm committing
new results that agree with CPU based computation. The code is
valgrind clean and cuda-memcheck clean.