PartitionRegister

Adds a creation method to the partition package.

Synopsis


PartitionRegister(char *name, char *path, char *func_name, int (*create_func)(Partition))

Not Collective

Input Parameters

name - The name of a new user-defined creation routine
path - The path (either absolute or relative) of the library containing this routine
func_name - The name of routine to create method context
create_func - The creation routine itself

Notes

PartitionRegister() may be called multiple times to add several user-defined meshes.

If dynamic libraries are used, then the fourth input argument (create_func) is ignored.

Sample usage

  PartitionRegister("my_part", /home/username/my_lib/lib/libO/solaris/mylib.a, "MyFunc", MyFunc);

Then, your mesh type can be chosen with the procedural interface via

    PartitionSetType(vec, "my_part")
or at runtime via the option
    -part_type my_part

$PETSC_ARCH and $BOPT occuring in pathname will be replaced with appropriate values.

Keywords

partition, register

See Also

PartitionRegisterAll(), PartitionRegisterDestroy()

Level:advanced
Location:
src/mesh/interface/partreg.c
Index of all Mesh routines
Table of Contents for all manual pages
Index of all manual pages