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