143e6b640SBarry Smith /* 23fdcb5c1SBarry Smith Interface to the PETSc graphics (currently only support for X-windows 343e6b640SBarry Smith */ 40a835dfdSSatish Balay #if !defined(__PETSCDRAW_H) 50a835dfdSSatish Balay #define __PETSCDRAW_H 6d382aafbSBarry Smith #include "petscsys.h" 7e9fa29b7SSatish Balay PETSC_EXTERN_CXX_BEGIN 843e6b640SBarry Smith 90700a824SBarry Smith extern PetscClassId PETSC_DRAW_CLASSID; 10f0479e8cSBarry Smith 11b9617806SBarry Smith /*E 12b9617806SBarry Smith PetscDrawType - String with the name of a PetscDraw 13b9617806SBarry Smith 14b9617806SBarry Smith Level: beginner 15b9617806SBarry Smith 16b9617806SBarry Smith .seealso: PetscDrawSetType(), PetscDraw, PetscViewer 17b9617806SBarry Smith E*/ 18a313700dSBarry Smith #define PetscDrawType char* 19b0a32e0cSBarry Smith #define PETSC_DRAW_X "x" 20b0a32e0cSBarry Smith #define PETSC_DRAW_NULL "null" 21b0a32e0cSBarry Smith #define PETSC_DRAW_WIN32 "win32" 22d6dfbf8fSBarry Smith 23b9617806SBarry Smith /*S 24b9617806SBarry Smith PetscDraw - Abstract PETSc object for graphics 25b9617806SBarry Smith 26b9617806SBarry Smith Level: beginner 27b9617806SBarry Smith 28b9617806SBarry Smith Concepts: graphics 29b9617806SBarry Smith 30b9617806SBarry Smith .seealso: PetscDrawCreate(), PetscDrawSetType(), PetscDrawType 31b9617806SBarry Smith S*/ 32b0a32e0cSBarry Smith typedef struct _p_PetscDraw* PetscDraw; 3343e6b640SBarry Smith 34b0a32e0cSBarry Smith extern PetscFList PetscDrawList; 357087cfbeSBarry Smith extern PetscErrorCode PetscDrawRegisterAll(const char[]); 367087cfbeSBarry Smith extern PetscErrorCode PetscDrawInitializePackage(const char[]); 377087cfbeSBarry Smith extern PetscErrorCode PetscDrawRegisterDestroy(void); 387b2a1423SBarry Smith 397087cfbeSBarry Smith extern PetscErrorCode PetscDrawRegister(const char*,const char*,const char*,PetscErrorCode(*)(PetscDraw)); 4030de9b25SBarry Smith 4130de9b25SBarry Smith /*MC 4230de9b25SBarry Smith PetscDrawRegisterDynamic - Adds a method to the Krylov subspace solver package. 4330de9b25SBarry Smith 4430de9b25SBarry Smith Synopsis: 451890ba74SBarry Smith PetscErrorCode PetscDrawRegisterDynamic(const char *name_solver,const char *path,const char *name_create,PetscErrorCode (*routine_create)(PetscDraw)) 4630de9b25SBarry Smith 4730de9b25SBarry Smith Not Collective 4830de9b25SBarry Smith 4930de9b25SBarry Smith Input Parameters: 5030de9b25SBarry Smith + name_solver - name of a new user-defined solver 5130de9b25SBarry Smith . path - path (either absolute or relative) the library containing this solver 5230de9b25SBarry Smith . name_create - name of routine to create method context 5330de9b25SBarry Smith - routine_create - routine to create method context 5430de9b25SBarry Smith 5530de9b25SBarry Smith Level: developer 5630de9b25SBarry Smith 5730de9b25SBarry Smith Notes: 5830de9b25SBarry Smith PetscDrawRegisterDynamic() may be called multiple times to add several user-defined solvers. 5930de9b25SBarry Smith 6030de9b25SBarry Smith If dynamic libraries are used, then the fourth input argument (routine_create) 6130de9b25SBarry Smith is ignored. 6230de9b25SBarry Smith 6330de9b25SBarry Smith Sample usage: 6430de9b25SBarry Smith .vb 6530de9b25SBarry Smith PetscDrawRegisterDynamic("my_draw_type",/home/username/my_lib/lib/libO/solaris/mylib.a, 6630de9b25SBarry Smith "MyDrawCreate",MyDrawCreate); 6730de9b25SBarry Smith .ve 6830de9b25SBarry Smith 6930de9b25SBarry Smith Then, your solver can be chosen with the procedural interface via 7030de9b25SBarry Smith $ PetscDrawSetType(ksp,"my_draw_type") 7130de9b25SBarry Smith or at runtime via the option 7230de9b25SBarry Smith $ -draw_type my_draw_type 7330de9b25SBarry Smith 7430de9b25SBarry Smith Concepts: graphics^registering new draw classes 7530de9b25SBarry Smith Concepts: PetscDraw^registering new draw classes 7630de9b25SBarry Smith 7730de9b25SBarry Smith .seealso: PetscDrawRegisterAll(), PetscDrawRegisterDestroy() 7830de9b25SBarry Smith M*/ 79aa482453SBarry Smith #if defined(PETSC_USE_DYNAMIC_LIBRARIES) 80b0a32e0cSBarry Smith #define PetscDrawRegisterDynamic(a,b,c,d) PetscDrawRegister(a,b,c,0) 817b2a1423SBarry Smith #else 82b0a32e0cSBarry Smith #define PetscDrawRegisterDynamic(a,b,c,d) PetscDrawRegister(a,b,c,d) 837b2a1423SBarry Smith #endif 8430de9b25SBarry Smith 857087cfbeSBarry Smith extern PetscErrorCode PetscDrawGetType(PetscDraw,const PetscDrawType*); 867087cfbeSBarry Smith extern PetscErrorCode PetscDrawSetType(PetscDraw,const PetscDrawType); 877087cfbeSBarry Smith extern PetscErrorCode PetscDrawCreate(MPI_Comm,const char[],const char[],int,int,int,int,PetscDraw*); 887087cfbeSBarry Smith extern PetscErrorCode PetscDrawSetFromOptions(PetscDraw); 897b2a1423SBarry Smith 900752156aSBarry Smith /* 910752156aSBarry Smith Number of basic colors in the draw routines, the others are used 920752156aSBarry Smith for a uniform colormap. 930752156aSBarry Smith */ 94b0a32e0cSBarry Smith #define PETSC_DRAW_BASIC_COLORS 33 950752156aSBarry Smith 96b0a32e0cSBarry Smith #define PETSC_DRAW_ROTATE -1 /* will rotate through the colors, start with 2 */ 97b0a32e0cSBarry Smith #define PETSC_DRAW_WHITE 0 98b0a32e0cSBarry Smith #define PETSC_DRAW_BLACK 1 99b0a32e0cSBarry Smith #define PETSC_DRAW_RED 2 100b0a32e0cSBarry Smith #define PETSC_DRAW_GREEN 3 101b0a32e0cSBarry Smith #define PETSC_DRAW_CYAN 4 102b0a32e0cSBarry Smith #define PETSC_DRAW_BLUE 5 103b0a32e0cSBarry Smith #define PETSC_DRAW_MAGENTA 6 104b0a32e0cSBarry Smith #define PETSC_DRAW_AQUAMARINE 7 105b0a32e0cSBarry Smith #define PETSC_DRAW_FORESTGREEN 8 106b0a32e0cSBarry Smith #define PETSC_DRAW_ORANGE 9 107b0a32e0cSBarry Smith #define PETSC_DRAW_VIOLET 10 108b0a32e0cSBarry Smith #define PETSC_DRAW_BROWN 11 109b0a32e0cSBarry Smith #define PETSC_DRAW_PINK 12 110b0a32e0cSBarry Smith #define PETSC_DRAW_CORAL 13 111b0a32e0cSBarry Smith #define PETSC_DRAW_GRAY 14 112b0a32e0cSBarry Smith #define PETSC_DRAW_YELLOW 15 11320563c6bSBarry Smith 114b0a32e0cSBarry Smith #define PETSC_DRAW_GOLD 16 115b0a32e0cSBarry Smith #define PETSC_DRAW_LIGHTPINK 17 116b0a32e0cSBarry Smith #define PETSC_DRAW_MEDIUMTURQUOISE 18 117b0a32e0cSBarry Smith #define PETSC_DRAW_KHAKI 19 118b0a32e0cSBarry Smith #define PETSC_DRAW_DIMGRAY 20 119b0a32e0cSBarry Smith #define PETSC_DRAW_YELLOWGREEN 21 120b0a32e0cSBarry Smith #define PETSC_DRAW_SKYBLUE 22 121b0a32e0cSBarry Smith #define PETSC_DRAW_DARKGREEN 23 122b0a32e0cSBarry Smith #define PETSC_DRAW_NAVYBLUE 24 123b0a32e0cSBarry Smith #define PETSC_DRAW_SANDYBROWN 25 124b0a32e0cSBarry Smith #define PETSC_DRAW_CADETBLUE 26 125b0a32e0cSBarry Smith #define PETSC_DRAW_POWDERBLUE 27 126b0a32e0cSBarry Smith #define PETSC_DRAW_DEEPPINK 28 127b0a32e0cSBarry Smith #define PETSC_DRAW_THISTLE 29 128b0a32e0cSBarry Smith #define PETSC_DRAW_LIMEGREEN 30 129b0a32e0cSBarry Smith #define PETSC_DRAW_LAVENDERBLUSH 31 130b0a32e0cSBarry Smith #define PETSC_DRAW_PLUM 32 1310752156aSBarry Smith 1327087cfbeSBarry Smith extern PetscErrorCode PetscDrawOpenX(MPI_Comm,const char[],const char[],int,int,int,int,PetscDraw*); 1337087cfbeSBarry Smith extern PetscErrorCode PetscDrawOpenPS(MPI_Comm,char *,PetscDraw *); 134b0a32e0cSBarry Smith #define PETSC_DRAW_FULL_SIZE -3 135b0a32e0cSBarry Smith #define PETSC_DRAW_HALF_SIZE -4 136b0a32e0cSBarry Smith #define PETSC_DRAW_THIRD_SIZE -5 137b0a32e0cSBarry Smith #define PETSC_DRAW_QUARTER_SIZE -6 138e340e5c6SBarry Smith 1397087cfbeSBarry Smith extern PetscErrorCode PetscDrawOpenNull(MPI_Comm,PetscDraw *); 140*fcfd50ebSBarry Smith extern PetscErrorCode PetscDrawDestroy(PetscDraw*); 1417087cfbeSBarry Smith extern PetscErrorCode PetscDrawIsNull(PetscDraw,PetscBool *); 14243e6b640SBarry Smith 1437087cfbeSBarry Smith extern PetscErrorCode PetscDrawGetPopup(PetscDraw,PetscDraw*); 1447087cfbeSBarry Smith extern PetscErrorCode PetscDrawCheckResizedWindow(PetscDraw); 1457087cfbeSBarry Smith extern PetscErrorCode PetscDrawResizeWindow(PetscDraw,int,int); 146d4fbbf0eSBarry Smith 1477087cfbeSBarry Smith extern PetscErrorCode PetscDrawScalePopup(PetscDraw,PetscReal,PetscReal); 1485311e20fSBarry Smith 1497087cfbeSBarry Smith extern PetscErrorCode PetscDrawLine(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,int); 1507087cfbeSBarry Smith extern PetscErrorCode PetscDrawLineSetWidth(PetscDraw,PetscReal); 1517087cfbeSBarry Smith extern PetscErrorCode PetscDrawLineGetWidth(PetscDraw,PetscReal*); 15243e6b640SBarry Smith 1537087cfbeSBarry Smith extern PetscErrorCode PetscDrawPoint(PetscDraw,PetscReal,PetscReal,int); 1547087cfbeSBarry Smith extern PetscErrorCode PetscDrawPointSetSize(PetscDraw,PetscReal); 1558ed539a5SBarry Smith 1567087cfbeSBarry Smith extern PetscErrorCode PetscDrawRectangle(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,int,int,int,int); 1577087cfbeSBarry Smith extern PetscErrorCode PetscDrawTriangle(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,PetscReal,PetscReal,int,int,int); 1587087cfbeSBarry Smith extern PetscErrorCode PetscDrawEllipse(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,int); 1597087cfbeSBarry Smith extern PetscErrorCode PetscDrawTensorContourPatch(PetscDraw,int,int,PetscReal*,PetscReal*,PetscReal,PetscReal,PetscReal*); 1607087cfbeSBarry Smith extern PetscErrorCode PetscDrawTensorContour(PetscDraw,int,int,const PetscReal[],const PetscReal[],PetscReal *); 1618ed539a5SBarry Smith 1627087cfbeSBarry Smith extern PetscErrorCode PetscDrawString(PetscDraw,PetscReal,PetscReal,int,const char[]); 1637087cfbeSBarry Smith extern PetscErrorCode PetscDrawStringVertical(PetscDraw,PetscReal,PetscReal,int,const char[]); 1647087cfbeSBarry Smith extern PetscErrorCode PetscDrawStringSetSize(PetscDraw,PetscReal,PetscReal); 1657087cfbeSBarry Smith extern PetscErrorCode PetscDrawStringGetSize(PetscDraw,PetscReal*,PetscReal*); 166d6dfbf8fSBarry Smith 1677087cfbeSBarry Smith extern PetscErrorCode PetscDrawSetViewPort(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal); 1687087cfbeSBarry Smith extern PetscErrorCode PetscDrawSplitViewPort(PetscDraw); 1692bdab257SBarry Smith 1707087cfbeSBarry Smith extern PetscErrorCode PetscDrawSetCoordinates(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal); 1717087cfbeSBarry Smith extern PetscErrorCode PetscDrawGetCoordinates(PetscDraw,PetscReal*,PetscReal*,PetscReal*,PetscReal*); 1729e25ed09SBarry Smith 1737087cfbeSBarry Smith extern PetscErrorCode PetscDrawSetTitle(PetscDraw,const char[]); 1747087cfbeSBarry Smith extern PetscErrorCode PetscDrawAppendTitle(PetscDraw,const char[]); 1757087cfbeSBarry Smith extern PetscErrorCode PetscDrawGetTitle(PetscDraw,char **); 176d4fbbf0eSBarry Smith 1777087cfbeSBarry Smith extern PetscErrorCode PetscDrawSetPause(PetscDraw,PetscReal); 1787087cfbeSBarry Smith extern PetscErrorCode PetscDrawGetPause(PetscDraw,PetscReal*); 1797087cfbeSBarry Smith extern PetscErrorCode PetscDrawPause(PetscDraw); 1807087cfbeSBarry Smith extern PetscErrorCode PetscDrawSetDoubleBuffer(PetscDraw); 1817087cfbeSBarry Smith extern PetscErrorCode PetscDrawFlush(PetscDraw); 1827087cfbeSBarry Smith extern PetscErrorCode PetscDrawSynchronizedFlush(PetscDraw); 1837087cfbeSBarry Smith extern PetscErrorCode PetscDrawClear(PetscDraw); 1847087cfbeSBarry Smith extern PetscErrorCode PetscDrawSynchronizedClear(PetscDraw); 1857087cfbeSBarry Smith extern PetscErrorCode PetscDrawBOP(PetscDraw); 1867087cfbeSBarry Smith extern PetscErrorCode PetscDrawEOP(PetscDraw); 187cddf8d76SBarry Smith 1887087cfbeSBarry Smith extern PetscErrorCode PetscDrawSetDisplay(PetscDraw,char*); 189a3489287SBarry Smith #define PetscDrawSetFilename(a,b) PetscDrawSetDisplay(a,b) 190a3489287SBarry Smith 1917087cfbeSBarry Smith extern PetscErrorCode PetscDrawGetSingleton(PetscDraw,PetscDraw*); 1927087cfbeSBarry Smith extern PetscErrorCode PetscDrawRestoreSingleton(PetscDraw,PetscDraw*); 1936831982aSBarry Smith 194b9617806SBarry Smith /*E 195b9617806SBarry Smith PetscDrawButton - Used to determine which button was pressed 196b9617806SBarry Smith 197b9617806SBarry Smith Level: intermediate 198b9617806SBarry Smith 199b9617806SBarry Smith .seealso: PetscDrawGetMouseButton(), PetscDrawSynchronizedGetMouseButton() 200b9617806SBarry Smith E*/ 2014ebda54eSMatthew Knepley typedef enum {BUTTON_NONE,BUTTON_LEFT,BUTTON_CENTER,BUTTON_RIGHT,BUTTON_LEFT_SHIFT,BUTTON_CENTER_SHIFT,BUTTON_RIGHT_SHIFT} PetscDrawButton; 202b9617806SBarry Smith 2037087cfbeSBarry Smith extern PetscErrorCode PetscDrawGetMouseButton(PetscDraw,PetscDrawButton *,PetscReal*,PetscReal *,PetscReal *,PetscReal *); 2047087cfbeSBarry Smith extern PetscErrorCode PetscDrawSynchronizedGetMouseButton(PetscDraw,PetscDrawButton *,PetscReal*,PetscReal *,PetscReal *,PetscReal *); 20520563c6bSBarry Smith 2067087cfbeSBarry Smith extern PetscErrorCode PetscDrawZoom(PetscDraw,PetscErrorCode (*)(PetscDraw,void *),void *); 2077c922b88SBarry Smith 208b9617806SBarry Smith /*S 209b9617806SBarry Smith PetscDrawViewPorts - Subwindows in a PetscDraw object 210b9617806SBarry Smith 211b9617806SBarry Smith Level: intermediate 212b9617806SBarry Smith 213b9617806SBarry Smith Concepts: graphics 214b9617806SBarry Smith 215b9617806SBarry Smith .seealso: PetscDrawViewPortsCreate(), PetscDrawViewPortsSet() 216b9617806SBarry Smith S*/ 2177c922b88SBarry Smith typedef struct { 2187c307921SBarry Smith PetscInt nports; 21967e28bfeSBarry Smith PetscReal *xl; 22067e28bfeSBarry Smith PetscReal *xr; 22167e28bfeSBarry Smith PetscReal *yl; 22267e28bfeSBarry Smith PetscReal *yr; 223b0a32e0cSBarry Smith PetscDraw draw; 224b0a32e0cSBarry Smith } PetscDrawViewPorts; 2257087cfbeSBarry Smith extern PetscErrorCode PetscDrawViewPortsCreate(PetscDraw,PetscInt,PetscDrawViewPorts**); 2267087cfbeSBarry Smith extern PetscErrorCode PetscDrawViewPortsCreateRect(PetscDraw,PetscInt,PetscInt,PetscDrawViewPorts**); 2277087cfbeSBarry Smith extern PetscErrorCode PetscDrawViewPortsDestroy(PetscDrawViewPorts*); 2287087cfbeSBarry Smith extern PetscErrorCode PetscDrawViewPortsSet(PetscDrawViewPorts*,PetscInt); 2297c922b88SBarry Smith 230b9617806SBarry Smith /*S 231b9617806SBarry Smith PetscDrawAxis - Manages X-Y axis 232b9617806SBarry Smith 233b9617806SBarry Smith Level: advanced 234b9617806SBarry Smith 235b9617806SBarry Smith Concepts: graphics, axis 236b9617806SBarry Smith 237b9617806SBarry Smith .seealso: PetscDrawAxisCreate(), PetscDrawAxisSetLimits(), PetscDrawAxisSetColors(), PetscDrawAxisSetLabels() 238b9617806SBarry Smith S*/ 239b0a32e0cSBarry Smith typedef struct _p_DrawAxis* PetscDrawAxis; 240b9617806SBarry Smith 2410700a824SBarry Smith extern PetscClassId DRAWAXIS_CLASSID; 2428ba1e511SMatthew Knepley 2437087cfbeSBarry Smith extern PetscErrorCode PetscDrawAxisCreate(PetscDraw,PetscDrawAxis *); 244*fcfd50ebSBarry Smith extern PetscErrorCode PetscDrawAxisDestroy(PetscDrawAxis*); 2457087cfbeSBarry Smith extern PetscErrorCode PetscDrawAxisDraw(PetscDrawAxis); 2467087cfbeSBarry Smith extern PetscErrorCode PetscDrawAxisSetLimits(PetscDrawAxis,PetscReal,PetscReal,PetscReal,PetscReal); 2477087cfbeSBarry Smith extern PetscErrorCode PetscDrawAxisSetHoldLimits(PetscDrawAxis,PetscBool ); 2487087cfbeSBarry Smith extern PetscErrorCode PetscDrawAxisSetColors(PetscDrawAxis,int,int,int); 2497087cfbeSBarry Smith extern PetscErrorCode PetscDrawAxisSetLabels(PetscDrawAxis,const char[],const char[],const char[]); 25020563c6bSBarry Smith 251b9617806SBarry Smith /*S 252b9617806SBarry Smith PetscDrawLG - Manages drawing x-y plots 253b9617806SBarry Smith 254b9617806SBarry Smith Level: advanced 255b9617806SBarry Smith 256b9617806SBarry Smith Concepts: graphics, axis 257b9617806SBarry Smith 258b9617806SBarry Smith .seealso: PetscDrawAxisCreate(), PetscDrawLGCreate(), PetscDrawLGAddPoint() 259b9617806SBarry Smith S*/ 260b0a32e0cSBarry Smith typedef struct _p_DrawLG* PetscDrawLG; 261b9617806SBarry Smith 2620700a824SBarry Smith extern PetscClassId DRAWLG_CLASSID; 2638ba1e511SMatthew Knepley 2647087cfbeSBarry Smith extern PetscErrorCode PetscDrawLGCreate(PetscDraw,int,PetscDrawLG *); 265*fcfd50ebSBarry Smith extern PetscErrorCode PetscDrawLGDestroy(PetscDrawLG*); 2667087cfbeSBarry Smith extern PetscErrorCode PetscDrawLGAddPoint(PetscDrawLG,PetscReal*,PetscReal*); 2677087cfbeSBarry Smith extern PetscErrorCode PetscDrawLGAddPoints(PetscDrawLG,int,PetscReal**,PetscReal**); 2687087cfbeSBarry Smith extern PetscErrorCode PetscDrawLGDraw(PetscDrawLG); 2697087cfbeSBarry Smith extern PetscErrorCode PetscDrawLGPrint(PetscDrawLG); 2707087cfbeSBarry Smith extern PetscErrorCode PetscDrawLGReset(PetscDrawLG); 2717087cfbeSBarry Smith extern PetscErrorCode PetscDrawLGSetDimension(PetscDrawLG,PetscInt); 2727087cfbeSBarry Smith extern PetscErrorCode PetscDrawLGGetAxis(PetscDrawLG,PetscDrawAxis *); 2737087cfbeSBarry Smith extern PetscErrorCode PetscDrawLGGetDraw(PetscDrawLG,PetscDraw *); 2747087cfbeSBarry Smith extern PetscErrorCode PetscDrawLGIndicateDataPoints(PetscDrawLG); 2757087cfbeSBarry Smith extern PetscErrorCode PetscDrawLGSetLimits(PetscDrawLG,PetscReal,PetscReal,PetscReal,PetscReal); 27643e6b640SBarry Smith 277b9617806SBarry Smith /*S 278b9617806SBarry Smith PetscDrawSP - Manages drawing scatter plots 279b9617806SBarry Smith 280b9617806SBarry Smith Level: advanced 281b9617806SBarry Smith 282b9617806SBarry Smith Concepts: graphics, scatter plots 283b9617806SBarry Smith 284b9617806SBarry Smith .seealso: PetscDrawSPCreate() 285b9617806SBarry Smith S*/ 286b0a32e0cSBarry Smith typedef struct _p_DrawSP* PetscDrawSP; 287b9617806SBarry Smith 2880700a824SBarry Smith extern PetscClassId DRAWSP_CLASSID; 2898ba1e511SMatthew Knepley 2907087cfbeSBarry Smith extern PetscErrorCode PetscDrawSPCreate(PetscDraw,int,PetscDrawSP *); 291*fcfd50ebSBarry Smith extern PetscErrorCode PetscDrawSPDestroy(PetscDrawSP*); 2927087cfbeSBarry Smith extern PetscErrorCode PetscDrawSPAddPoint(PetscDrawSP,PetscReal*,PetscReal*); 2937087cfbeSBarry Smith extern PetscErrorCode PetscDrawSPAddPoints(PetscDrawSP,int,PetscReal**,PetscReal**); 2947087cfbeSBarry Smith extern PetscErrorCode PetscDrawSPDraw(PetscDrawSP); 2957087cfbeSBarry Smith extern PetscErrorCode PetscDrawSPReset(PetscDrawSP); 2967087cfbeSBarry Smith extern PetscErrorCode PetscDrawSPSetDimension(PetscDrawSP,int); 2977087cfbeSBarry Smith extern PetscErrorCode PetscDrawSPGetAxis(PetscDrawSP,PetscDrawAxis *); 2987087cfbeSBarry Smith extern PetscErrorCode PetscDrawSPGetDraw(PetscDrawSP,PetscDraw *); 2997087cfbeSBarry Smith extern PetscErrorCode PetscDrawSPSetLimits(PetscDrawSP,PetscReal,PetscReal,PetscReal,PetscReal); 3007087cfbeSBarry Smith extern PetscErrorCode PetscDrawLGSPDraw(PetscDrawLG,PetscDrawSP); 301d4fbbf0eSBarry Smith 302b9617806SBarry Smith /*S 303b9617806SBarry Smith PetscDrawHG - Manages drawing histograms 304b9617806SBarry Smith 305b9617806SBarry Smith Level: advanced 306b9617806SBarry Smith 307b9617806SBarry Smith Concepts: graphics, histograms 308b9617806SBarry Smith 309b9617806SBarry Smith .seealso: PetscDrawHGCreate() 310b9617806SBarry Smith S*/ 311b0a32e0cSBarry Smith typedef struct _p_DrawHG* PetscDrawHG; 312b9617806SBarry Smith 3130700a824SBarry Smith extern PetscClassId DRAWHG_CLASSID; 3148ba1e511SMatthew Knepley 3157087cfbeSBarry Smith extern PetscErrorCode PetscDrawHGCreate(PetscDraw,int,PetscDrawHG *); 316*fcfd50ebSBarry Smith extern PetscErrorCode PetscDrawHGDestroy(PetscDrawHG*); 3177087cfbeSBarry Smith extern PetscErrorCode PetscDrawHGAddValue(PetscDrawHG,PetscReal); 3187087cfbeSBarry Smith extern PetscErrorCode PetscDrawHGDraw(PetscDrawHG); 3197087cfbeSBarry Smith extern PetscErrorCode PetscDrawHGPrint(PetscDrawHG); 3207087cfbeSBarry Smith extern PetscErrorCode PetscDrawHGReset(PetscDrawHG); 3217087cfbeSBarry Smith extern PetscErrorCode PetscDrawHGGetAxis(PetscDrawHG,PetscDrawAxis *); 3227087cfbeSBarry Smith extern PetscErrorCode PetscDrawHGGetDraw(PetscDrawHG,PetscDraw *); 3237087cfbeSBarry Smith extern PetscErrorCode PetscDrawHGSetLimits(PetscDrawHG,PetscReal,PetscReal,int,int); 3247087cfbeSBarry Smith extern PetscErrorCode PetscDrawHGSetNumberBins(PetscDrawHG,int); 3257087cfbeSBarry Smith extern PetscErrorCode PetscDrawHGSetColor(PetscDrawHG,int); 3267087cfbeSBarry Smith extern PetscErrorCode PetscDrawHGCalcStats(PetscDrawHG, PetscBool ); 3277087cfbeSBarry Smith extern PetscErrorCode PetscDrawHGIntegerBins(PetscDrawHG, PetscBool ); 328ba6fa466SBarry Smith 329ba6fa466SBarry Smith /* 330b0a32e0cSBarry Smith PetscViewer routines that allow you to access underlying PetscDraw objects 3313f1d51d7SBarry Smith */ 3327087cfbeSBarry Smith extern PetscErrorCode PetscViewerDrawGetDraw(PetscViewer,PetscInt,PetscDraw*); 3337087cfbeSBarry Smith extern PetscErrorCode PetscViewerDrawBaseAdd(PetscViewer,PetscInt); 3347087cfbeSBarry Smith extern PetscErrorCode PetscViewerDrawBaseSet(PetscViewer,PetscInt); 3357087cfbeSBarry Smith extern PetscErrorCode PetscViewerDrawGetDrawLG(PetscViewer,PetscInt,PetscDrawLG*); 3367087cfbeSBarry Smith extern PetscErrorCode PetscViewerDrawGetDrawAxis(PetscViewer,PetscInt,PetscDrawAxis*); 3375311e20fSBarry Smith 3387087cfbeSBarry Smith extern PetscErrorCode PetscDrawUtilitySetCmapHue(unsigned char *,unsigned char *,unsigned char *,int); 3397087cfbeSBarry Smith extern PetscErrorCode PetscDrawUtilitySetGamma(PetscReal); 3407c922b88SBarry Smith 341e9fa29b7SSatish Balay PETSC_EXTERN_CXX_END 34243e6b640SBarry Smith #endif 343