Also please read Chapter 5 of
http://www.mcs.anl.gov/petsc/petsc-as/developers/developers.pdf and try to make
the new source code confirm to the PETSc style as much as possible.
Thanks
Barry
On May 9, 2011, at 7:32 AM, Barry Smith wrote:
>
> On May 9, 2011, at 4:04 AM, Gong Ding wrote:
>
>> Hi
>> I created a flexible AIJ matrix type ?named as FAIJ. It has an extra hash
>> table for nonzero which do not have pre-allocated position. And the buffered
>> values in hash table will be flushed to AIJ array at MatAssemblyEnd. Both
>> sequential and parallel version have been implemented and tested.
>>
>> The test results show that for middle size problem ? matrix size around 1M,
>> FAIJ without any pre-allocation still pretty fast. The shortcoming is memory
>> overkill exists. Fortunately, modern computers have larger and larger
>> memory. User with FAIJ matrix only needs to provide approximate nonzero
>> pattern or even skip this step.
>>
> Cool! This is a very nice feature; thanks for writing it.
>
>> However, direct solvers such as mumps and superlu_dist will crash. This is
>> caused by type compare functions, i.e.:
>> ierr = PetscTypeCompare((PetscObject)A,MATMPIAIJ,&isAIJ);CHKERRQ(ierr);
>> FAIJ matrix is derived from AIJ, but it has its own type name, i.e.
>> MATMPIFAIJ. The above function will assign isAIJ false.
>>
>> Is there any function like ?PetscBaseType? exist? FAIJ matrix can hold its
>> type name as well as its base type name.
>
> We don't have a good general mechanism for handling this situation. I'll
> think about what can be done for this.
>
>>
>> I hope FAIJ can be accepted by petsc 3.2.
>
> Please see
> http://www.mcs.anl.gov/petsc/petsc-as/developers/index.html#Sending_patches_to_update_the_
> for how to prepare a patch that we can add to petsc-dev.
>
> Barry
>
>> Thanks.
>>
>> Gong Ding
>>
>>
>>
>>
>>
>