petsc-3.7.1 2016-05-15
Report Typos and Errors

PetscDSRegister

Adds a new PetscDS implementation

Synopsis

#include "petscds.h" 
PetscErrorCode PetscDSRegister(const char sname[], PetscErrorCode (*function)(PetscDS))
Not Collective Many br

Input Parameters

name - The name of a new user-defined creation routine Many br
create_func - The creation routine itself Many br

Notes

PetscDSRegister() may be called multiple times to add several user-defined PetscDSs Many br

Sample usage

    PetscDSRegister("my_ds", MyPetscDSCreate);
Many br

Then, your PetscDS type can be chosen with the procedural interface via Many br

    PetscDSCreate(MPI_Comm, PetscDS *);
    PetscDSSetType(PetscDS, "my_ds");
Many bror at runtime via the option Many br
    -petscds_type my_ds
Many br

Many br

Keywords

PetscDS, register

See Also

PetscDSRegisterAll(), PetscDSRegisterDestroy()

Level:advanced
Location:
src/dm/dt/interface/dtds.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages