xref: /petsc/src/ts/characteristic/interface/mocregis.c (revision 609bdbee21ea3be08735c64dbe00a9ab27759925)
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 /*@C
13   CharacteristicRegisterAll - Registers all of the Krylov subspace methods in the Characteristic package.
14 
15   Not Collective
16 
17   Level: advanced
18 
19 .keywords: Characteristic, register, all
20 
21 .seealso:  CharacteristicRegisterDestroy()
22 @*/
23 PetscErrorCode CharacteristicRegisterAll(void)
24 {
25   PetscErrorCode ierr;
26 
27   PetscFunctionBegin;
28   if (CharacteristicRegisterAllCalled) PetscFunctionReturn(0);
29   CharacteristicRegisterAllCalled = PETSC_TRUE;
30 
31   ierr = CharacteristicRegister(CHARACTERISTICDA,  CharacteristicCreate_DA);CHKERRQ(ierr);
32   PetscFunctionReturn(0);
33 }
34