File: TSRegisterDynamic.html

package info (click to toggle)
petsc 2.2.0-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 64,404 kB
  • ctags: 284,528
  • sloc: ansic: 223,999; python: 11,758; makefile: 7,707; fortran: 6,327; cpp: 4,104; sh: 3,387; csh: 41; asm: 6
file content (66 lines) | stat: -rw-r--r-- 3,066 bytes parent folder | download
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
61
62
63
64
65
66
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>TSRegisterDynamic</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="TSRegisterDynamic"><H1>TSRegisterDynamic</H1></A>
Adds a creation method to the <A HREF="../TS/TS.html#TS">TS</A> package. 
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
</PRE>
<A HREF="../TS/TSRegisterDynamic.html#TSRegisterDynamic">TSRegisterDynamic</A>(char *name, char *path, char *func_name, int (*create_func)(<A HREF="../TS/TS.html#TS">TS</A>))
<P>
Not Collective
<P>
<H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name        </B></TD><TD>- The name of a new user-defined creation routine
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>path        </B></TD><TD>- The path (either absolute or relative) of the library containing this routine
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func_name   </B></TD><TD>- The name of the creation routine
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>create_func </B></TD><TD>- The creation routine itself
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
<A HREF="../TS/TSRegisterDynamic.html#TSRegisterDynamic">TSRegisterDynamic</A>() may be called multiple times to add several user-defined tses.
<P>
If dynamic libraries are used, then the fourth input argument (create_func) is ignored.
<P>
<H3><FONT COLOR="#CC3333">Sample usage</FONT></H3>
<PRE>
  <A HREF="../TS/TSRegisterDynamic.html#TSRegisterDynamic">TSRegisterDynamic</A>("my_ts", "/home/username/my_lib/lib/libO/solaris/libmy.a", "MyTSCreate", MyTSCreate);
</PRE>

<P>
Then, your ts type can be chosen with the procedural interface via
<PRE>
    <A HREF="../TS/TSCreate.html#TSCreate">TSCreate</A>(<A HREF="../Sys/MPI_Comm.html#MPI_Comm">MPI_Comm</A>, <A HREF="../TS/TS.html#TS">TS</A> *);
    <A HREF="../TS/TSSetType.html#TSSetType">TSSetType</A>(vec, "my_ts")
</PRE>

or at runtime via the option
<PRE>
    -ts_type my_ts
</PRE>

<P>
Notes: $PETSC_ARCH and $BOPT occuring in pathname will be replaced with appropriate values.
If your function is not being put into a shared library then use <A HREF="../TS/TSRegister.html#TSRegister">TSRegister</A>() instead
<P>

<P>
<H3><FONT COLOR="#CC3333">Keywords</FONT></H3>
 <A HREF="../TS/TS.html#TS">TS</A>, register
<BR>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
 <A HREF="../TS/TSRegisterAll.html#TSRegisterAll">TSRegisterAll</A>(), <A HREF="../TS/TSRegisterDestroy.html#TSRegisterDestroy">TSRegisterDestroy</A>()
<BR><P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>advanced
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/ts/../../include/petscts.h.html#TSRegisterDynamic">src/ts/../../include/petscts.h</A>
<BR><A HREF="./index.html">Index of all TS routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
</BODY></HTML>