xref: /petsc/src/ts/characteristic/interface/mocregis.c (revision 8865f1ea4ea560cd84ab8db62e98b7095cdff96f)
1 #include <petsc-private/characteristicimpl.h>  /*I "petsccharacteristic.h" I*/
2 
3 EXTERN_C_BEGIN
4 extern PetscErrorCode CharacteristicCreate_DA(Characteristic);
5 EXTERN_C_END
6 
7 /*
8     This is used by CharacteristicSetType() to make sure that at least one
9     CharacteristicRegisterAll() is called. In general, if there is more than one
10     DLL, then CharacteristicRegisterAll() may be called several times.
11 */
12 extern PetscBool CharacteristicRegisterAllCalled;
13 
14 #undef __FUNCT__
15 #define __FUNCT__ "CharacteristicRegisterAll"
16 /*@C
17   CharacteristicRegisterAll - Registers all of the Krylov subspace methods in the Characteristic package.
18 
19   Not Collective
20 
21   Level: advanced
22 
23 .keywords: Characteristic, register, all
24 
25 .seealso:  CharacteristicRegisterDestroy()
26 @*/
27 PetscErrorCode CharacteristicRegisterAll(const char path[])
28 {
29   PetscErrorCode ierr;
30 
31   PetscFunctionBegin;
32   CharacteristicRegisterAllCalled = PETSC_TRUE;
33 
34   ierr = CharacteristicRegisterDynamic(CHARACTERISTICDA, path, "CharacteristicCreate_DA", CharacteristicCreate_DA);CHKERRQ(ierr);
35   PetscFunctionReturn(0);
36 }
37