/usr/lib/petscdir/3.4.2/include/petscbag.h is in libpetsc3.4.2-dev 3.4.2.dfsg1-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | #if !defined(__PETSCBAG_H)
#define __PETSCBAG_H
#include <petscsys.h>
/*S
PetscBag - PETSc object that manages a collection of user data including parameters.
A bag is essentially a C struct with serialization (you can save it and load it from files).
Level: beginner
Sample Usage:
$ typedef struct {
$ PetscInt height;
$ PetscScalar root;
$ PetscReal byebye;
$ } MyParameters;
$
$ PetscBag bag;
$ MyParameters *params;
$
$ ierr = PetscBagCreate(PETSC_COMM_WORLD,sizeof(MyParameters),&bag);
$ ierr = PetscBagGetData(bag,(void **)¶ms);
$ ierr = PetscBagSetName(bag,"MyParameters");
$ ierr = PetscBagRegisterInt(bag,¶ms.height,22,"height","Height of the water tower");
$
.seealso: PetscBagSetName(), PetscBagGetName(), PetscBagView(), PetscBagLoad(), PetscBagGetData()
PetscBagRegisterReal(), PetscBagRegisterInt(), PetscBagRegisterBool(), PetscBagRegisterScalar()
PetscBagSetFromOptions(), PetscBagRegisterVec(), PetscBagCreate(), PetscBagDestroy(), PetscBagRegisterEnum()
S*/
typedef struct _n_PetscBag* PetscBag;
typedef struct _n_PetscBagItem* PetscBagItem;
PETSC_EXTERN PetscErrorCode PetscBagCreate(MPI_Comm,size_t,PetscBag*);
PETSC_EXTERN PetscErrorCode PetscBagDestroy(PetscBag*);
PETSC_EXTERN PetscErrorCode PetscBagGetData(PetscBag,void **);
PETSC_EXTERN PetscErrorCode PetscBagRegisterReal(PetscBag,void*,PetscReal, const char*, const char*);
PETSC_EXTERN PetscErrorCode PetscBagRegisterRealArray(PetscBag,void*,PetscInt, const char*, const char*);
PETSC_EXTERN PetscErrorCode PetscBagRegisterString(PetscBag,void*,PetscInt,const char*, const char*, const char*);
PETSC_EXTERN PetscErrorCode PetscBagRegisterScalar(PetscBag,void*,PetscScalar,const char*,const char*);
PETSC_EXTERN PetscErrorCode PetscBagRegisterInt(PetscBag,void*,PetscInt,const char*,const char*);
PETSC_EXTERN PetscErrorCode PetscBagRegisterIntArray(PetscBag,void*,PetscInt,const char*,const char*);
PETSC_EXTERN PetscErrorCode PetscBagRegisterEnum(PetscBag,void*,const char*const*,PetscEnum,const char*,const char*);
PETSC_EXTERN PetscErrorCode PetscBagRegisterBool(PetscBag,void*,PetscBool ,const char*,const char*);
PETSC_EXTERN PetscErrorCode PetscBagSetFromOptions(PetscBag);
PETSC_EXTERN PetscErrorCode PetscBagGetName(PetscBag, char **);
PETSC_EXTERN PetscErrorCode PetscBagSetName(PetscBag, const char *, const char *);
PETSC_EXTERN PetscErrorCode PetscBagSetOptionsPrefix(PetscBag, const char *);
PETSC_EXTERN PetscErrorCode PetscBagView(PetscBag,PetscViewer);
PETSC_EXTERN PetscErrorCode PetscBagLoad(PetscViewer,PetscBag);
PETSC_EXTERN PetscErrorCode PetscBagSetViewer(PetscBag,PetscErrorCode (*)(PetscBag,PetscViewer));
PETSC_EXTERN PetscErrorCode PetscBagSetLoader(PetscBag,PetscErrorCode (*)(PetscBag,PetscViewer));
PETSC_EXTERN PetscErrorCode PetscBagSetDestroy(PetscBag,PetscErrorCode (*)(PetscBag));
#define PETSC_BAG_FILE_CLASSID 1211219
#endif
|