PetscObject, Logging and Devices - Low-level Interface
- PetscObject: operations shared by every PETSc object (names, options prefixes, reference counting, composed objects,
PetscObjectGetComm). Any Julia handle (PetscVec,PetscMat,KSP, ...) is accepted where aPetscObjectis expected. - PetscLog: performance logging with stages and events (
-log_view). - PetscDevice: GPU device and stream management (
PetscDeviceContext). - PetscContainer, PetscFunctionList, PetscDLLibrary: attaching user data to objects, registering implementations and loading shared libraries.
Basic Usage
using PETSc, MPI
MPI.Init()
petsclib = PETSc.getlib()
PETSc.initialize(petsclib)
v = LibPETSc.VecCreate(petsclib, MPI.COMM_SELF)
LibPETSc.PetscObjectSetName(petsclib, v, "rhs")
name = LibPETSc.PetscObjectGetName(petsclib, v) # "rhs"
cls = LibPETSc.PetscObjectGetClassName(petsclib, v) # "Vec"
comm = LibPETSc.PetscObjectGetComm(petsclib, v) # an MPI.Comm
# Logging: register a stage and an event, then view the summary at the end
LibPETSc.PetscLogDefaultBegin(petsclib)
stage = LibPETSc.PetscLogStageRegister(petsclib, "Assembly")
classid = LibPETSc.PetscClassIdRegister(petsclib, "MyApp")
event = LibPETSc.PetscLogEventRegister(petsclib, "MyAssembly", classid)
LibPETSc.PetscLogStagePush(petsclib, stage)
# ... work ...
LibPETSc.PetscLogStagePop(petsclib)
LibPETSc.PetscLogView(petsclib, LibPETSc.PETSC_VIEWER_STDOUT_WORLD(petsclib))
LibPETSc.VecDestroy(petsclib, v)
PETSc.finalize(petsclib)PetscLogEventBegin/PetscLogEventEnd are C macros and have no wrapper; time your own code with stages, or pass -log_view on the command line to get PETSc's own event timings.
Function Reference
PetscObject
PETSc.LibPETSc.PetscObjectAddOptionsHandler — Method
PetscObjectAddOptionsHandler(petsclib::PetscLibType, obj, handle::external, destroy::external, ctx::Ptr{Cvoid})Adds an additional function to check for options when XXXSetFromOptions() is called.
Not Collective
Input Parameters:
obj- the PETSc objecthandle- function that checks for optionsdestroy- function to destroyctxif providedctx- optional context for check function
Calling sequence of handle:
obj- the PETSc objectPetscOptionsObject- thePetscOptionItemsobjectctx- optional context forhandle
Calling sequence of destroy:
obj- the PETSc objectctx- optional context forhandle
Level: developer
See also: KSPSetFromOptions(), PCSetFromOptions(), SNESSetFromOptions(), PetscObjectProcessOptionsHandlers(), PetscObjectDestroyOptionsHandlers(), PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectAddOptionsHandler
PETSc.LibPETSc.PetscObjectAppendOptionsPrefix — Method
PetscObjectAppendOptionsPrefix(petsclib::PetscLibType, obj, prefix::String)Appends to the prefix used for searching for options for the given object in the database.
Input Parameters:
obj- any PETSc object, for example aVec,MatorKSP.prefix- the prefix string to prepend to option requests of the object.
Level: advanced
See also: PetscOptionsCreate(), PetscOptionsDestroy(), PetscObjectSetOptionsPrefix(), PetscObjectPrependOptionsPrefix(), PetscObjectGetOptionsPrefix(), TSAppendOptionsPrefix(), SNESAppendOptionsPrefix(), KSPAppendOptionsPrefix()
External Links
- PETSc Manual:
Sys/PetscObjectAppendOptionsPrefix
PETSc.LibPETSc.PetscObjectBaseTypeCompare — Method
same::PetscBool = PetscObjectBaseTypeCompare(petsclib::PetscLibType, obj, type_name::String)Determines whether a PetscObject is of a given base type. For example the base type of MATSEQAIJPERM is MATSEQAIJ
Not Collective
Input Parameters:
obj- the objecttype_name- string containing a type name
Output Parameter:
same-PETSC_TRUEif the object is of the same base type identified bytype_nameor bothNULL,PETSC_FALSEotherwise
Level: intermediate
See also: PetscObject, PetscObjectTypeCompare(), PetscObjectTypeCompareAny(), PetscObjectBaseTypeCompareAny()
External Links
- PETSc Manual:
Sys/PetscObjectBaseTypeCompare
PETSc.LibPETSc.PetscObjectChangeTypeName — Method
PetscObjectChangeTypeName(petsclib::PetscLibType, obj, type_name::String)Changes the type name stored on a PetscObject
Logically collective
Input Parameters:
obj- thePetscObjecttype_name- the new type name
Level: developer
See also: PetscObject, PetscObjectGetType(), PetscObjectSetName()
External Links
- PETSc Manual:
Sys/PetscObjectChangeTypeName
PETSc.LibPETSc.PetscObjectCompareId — Method
eq::PetscBool = PetscObjectCompareId(petsclib::PetscLibType, obj, id::PetscObjectId)compares the objects ID with a given id
Not Collective
Input Parameters:
obj- objectid- integer ID
Output Parameter:
eq- the ids are equal
Level: developer
See also: PetscObjectStateGet(), PetscObjectGetId()
External Links
- PETSc Manual:
Sys/PetscObjectCompareId
PETSc.LibPETSc.PetscObjectCompose — Method
PetscObjectCompose(petsclib::PetscLibType, obj, name::String, ptr)Associates another PETSc object with a given PETSc object.
Not Collective
Input Parameters:
obj- the PETSc object; this must be cast with (PetscObject), for example,
PetscObjectCompose((PetscObject)mat,...);
name- name associated with the child objectptr- the other PETSc object to associate with the PETSc object; this must also be
cast with (PetscObject)
Level: advanced
See also: PetscObjectQuery(), PetscContainerCreate(), PetscObjectComposeFunction(), PetscObjectQueryFunction(), PetscContainer, PetscContainerSetPointer(), PetscObject, PetscObjectContainerCompose()
External Links
- PETSc Manual:
Sys/PetscObjectCompose
PETSc.LibPETSc.PetscObjectContainerCompose — Method
PetscObjectContainerCompose(petsclib::PetscLibType, obj, name::String, pointer::Ptr{Cvoid}, destroy::Ptr{Cvoid})Creates a PetscContainer, provides all of its values and composes it with a PetscObject
Collective
Input Parameters:
obj- thePetscObjectname- the name for the composed containerpointer- the pointer to the datadestroy- the routine to destroy the container's data, seePetscCtxDestroyFnfor its calling sequence; usePetscCtxDestroyDefault()if aPetscFree()frees the data
Level: advanced
See also: PetscContainerCreate(), PetscContainerDestroy(), PetscContainerSetPointer(), PetscContainerGetPointer(), PetscObjectCompose(), PetscObjectQuery(), PetscContainerSetCtxDestroy(), PetscObject, PetscObjectContainerQuery()
External Links
- PETSc Manual:
Sys/PetscObjectContainerCompose
PETSc.LibPETSc.PetscObjectContainerQuery — Method
ptr::Ptr{Cvoid} = PetscObjectContainerQuery(petsclib::PetscLibType, obj, name::String)Accesses the pointer in a container composed to a PetscObject with PetscObjectContainerCompose()
Collective
Input Parameters:
obj- thePetscObjectname- the name for the composed container
Output Parameter:
ptr- the pointer to the data
Level: advanced
See also: PetscContainerCreate(), PetscContainerDestroy(), PetscContainerSetPointer(), PetscContainerGetPointer(), PetscObjectCompose(), PetscObjectQuery(), PetscContainerSetCtxDestroy(), PetscObject, PetscObjectContainerCompose()
External Links
- PETSc Manual:
Sys/PetscObjectContainerQuery
PETSc.LibPETSc.PetscObjectDereference — Method
PetscObjectDereference(petsclib::PetscLibType, obj)Indicates to any PetscObject that it is being referenced by one less PetscObject. This decreases the reference count for that object by one.
Collective on obj if reference reaches 0 otherwise Logically Collective
Input Parameter:
obj- the PETSc object; this must be cast with (PetscObject), for example,
PetscObjectDereference((PetscObject)mat);
Level: advanced
See also: PetscObjectCompose(), PetscObjectReference(), PetscObjectDestroy(), PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectDereference
PETSc.LibPETSc.PetscObjectDestroy — Method
PetscObjectDestroy(petsclib::PetscLibType, obj::Union{PetscObject, Ref{PetscObject}})Destroys a PetscObject, regardless of the class.
Collective
Input Parameter:
obj- any PETSc object, for example aVec,MatorKSP. It must be cast with a (PetscObject*), for example,
PetscObjectDestroy((PetscObject*)&mat);
Level: beginner
See also: PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectDestroy
PETSc.LibPETSc.PetscObjectDestroyOptionsHandlers — Method
PetscObjectDestroyOptionsHandlers(petsclib::PetscLibType, obj)Destroys all the option handlers attached to an object
Not Collective
Input Parameter:
obj- the PETSc object
Level: developer
See also: KSPSetFromOptions(), PCSetFromOptions(), SNESSetFromOptions(), PetscObjectAddOptionsHandler(), PetscObjectProcessOptionsHandlers(), PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectDestroyOptionsHandlers
PETSc.LibPETSc.PetscObjectGetClassId — Method
classid::PetscClassId = PetscObjectGetClassId(petsclib::PetscLibType, obj)Gets the classid for any PetscObject
Not Collective
Input Parameter:
obj- any PETSc object, for example aVec,MatorKSP. It must be cast with a (PetscObject), for example,
PetscObjectGetClassId((PetscObject)mat,&classid);
Output Parameter:
classid- the classid
Level: developer
See also: PetscObject, PetscClassId, PetscObjectGetClassName(), PetscObjectGetType()
External Links
- PETSc Manual:
Sys/PetscObjectGetClassId
PETSc.LibPETSc.PetscObjectGetClassName — Method
classname::String = PetscObjectGetClassName(petsclib::PetscLibType, obj)Gets the class name for any PetscObject
Not Collective
Input Parameter:
obj- any PETSc object, for example aVec,MatorKSP. It must be cast with a (PetscObject), for example,
PetscObjectGetClassName((PetscObject)mat,&classname);
Output Parameter:
classname- the class name, for example "Vec"
Level: developer
See also: PetscObject, PetscClassId, PetscObjectGetType(), PetscObjectGetClassId()
External Links
- PETSc Manual:
Sys/PetscObjectGetClassName
PETSc.LibPETSc.PetscObjectGetComm — Method
comm::MPI_Comm = PetscObjectGetComm(petsclib::PetscLibType, obj)Gets the MPI communicator for any PetscObject regardless of the type.
Not Collective
Input Parameter:
obj- any PETSc object, for example aVec,MatorKSP. It must be cast with a (PetscObject), for example,
PetscObjectGetComm((PetscObject)mat,&comm);
Output Parameter:
comm- the MPI communicator
Level: advanced
See also: PetscObject, PetscObjectComm()
External Links
- PETSc Manual:
Sys/PetscObjectGetComm
PETSc.LibPETSc.PetscObjectGetId — Method
id::PetscObjectId = PetscObjectGetId(petsclib::PetscLibType, obj)get a unique object ID for the PetscObject
Not Collective
Input Parameter:
obj- object
Output Parameter:
id- integer ID
Level: developer
See also: PetscObjectStateGet(), PetscObjectCompareId()
External Links
- PETSc Manual:
Sys/PetscObjectGetId
PETSc.LibPETSc.PetscObjectGetName — Method
name::String = PetscObjectGetName(petsclib::PetscLibType, obj)Gets a string name associated with a PETSc object.
Not Collective unless obj has not yet been named
Input Parameters:
obj- the PETSc variable. It must be cast with a (PetscObject), for example,
PetscObjectGetName((PetscObject)mat,&name);
name- the name associated withobj, do not free
Level: intermediate
See also: PetscObjectSetName(), PetscObjectName(), PetscObject, PetscObjectGetId()
External Links
- PETSc Manual:
Sys/PetscObjectGetName
PETSc.LibPETSc.PetscObjectGetNewTag — Method
tag::PetscMPIInt = PetscObjectGetNewTag(petsclib::PetscLibType, obj)Gets a unique new tag from a PETSc object. All processors that share the object MUST call this routine EXACTLY the same number of times. This tag should only be used with the current objects communicator; do NOT use it with any other MPI communicator.
Collective
Input Parameter:
obj- the PETSc object; this must be cast with a (PetscObject), for example,
PetscObjectGetNewTag((PetscObject)mat,&tag);
Output Parameter:
tag- the new tag
Level: developer
See also: PetscCommGetNewTag()
External Links
- PETSc Manual:
Sys/PetscObjectGetNewTag
PETSc.LibPETSc.PetscObjectGetOptions — Method
options::PetscOptions = PetscObjectGetOptions(petsclib::PetscLibType, obj)Gets the options database used by the object that has been set with PetscObjectSetOptions()
Collective
Input Parameter:
obj- any PETSc object, for example aVec,MatorKSP.
Output Parameter:
options- the options database
Level: advanced
See also: PetscOptionsCreate(), PetscOptionsDestroy(), PetscObjectSetOptionsPrefix(), PetscObjectAppendOptionsPrefix(), PetscObjectPrependOptionsPrefix(), PetscObjectGetOptionsPrefix(), PetscObjectSetOptions()
External Links
- PETSc Manual:
Sys/PetscObjectGetOptions
PETSc.LibPETSc.PetscObjectGetOptionsPrefix — Method
prefix::String = PetscObjectGetOptionsPrefix(petsclib::PetscLibType, obj)Gets the prefix of the PetscObject used for searching in the options database
Input Parameter:
obj- any PETSc object, for example aVec,MatorKSP.
Output Parameter:
prefix- pointer to the prefix string used is returned
Level: advanced
See also: PetscOptionsCreate(), PetscOptionsDestroy(), PetscObjectSetOptionsPrefix(), PetscObjectAppendOptionsPrefix(), PetscObjectPrependOptionsPrefix(), TSGetOptionsPrefix(), SNESGetOptionsPrefix(), KSPGetOptionsPrefix()
External Links
- PETSc Manual:
Sys/PetscObjectGetOptionsPrefix
PETSc.LibPETSc.PetscObjectGetReference — Method
cnt::PetscInt = PetscObjectGetReference(petsclib::PetscLibType, obj)Gets the current reference count for a PETSc object.
Not Collective
Input Parameter:
obj- the PETSc object; this must be cast with (PetscObject), for example,
PetscObjectGetReference((PetscObject)mat,&cnt); obj cannot be NULL
Output Parameter:
cnt- the reference count
Level: advanced
See also: PetscObjectCompose(), PetscObjectDereference(), PetscObjectReference(), PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectGetReference
PETSc.LibPETSc.PetscObjectGetTabLevel — Method
tab::PetscInt = PetscObjectGetTabLevel(petsclib::PetscLibType, obj)Gets the number of tabs that PETSCVIEWERASCII output for that object uses
Not Collective
Input Parameter:
obj- any PETSc object, for example aVec,MatorKSP. It must be cast with a (PetscObject), for example,
PetscObjectGetTabLevel((PetscObject)mat,&tab);
Output Parameter:
tab- the number of tabs
Level: developer
See also: PetscObjectIncrementTabLevel(), PetscObjectSetTabLevel(), PETSCVIEWERASCII, PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectGetTabLevel
PETSc.LibPETSc.PetscObjectGetType — Method
type::String = PetscObjectGetType(petsclib::PetscLibType, obj)Gets the object type of any PetscObject.
Not Collective
Input Parameter:
obj- any PETSc object, for example aVec,MatorKSP. It must be cast with a (PetscObject), for example,
PetscObjectGetType((PetscObject)mat,&type);
Output Parameter:
type- the object type, for example,MATSEQAIJ
Level: advanced
See also: PetscObject, PetscClassId, PetscObjectGetClassName(), PetscObjectGetClassId()
External Links
- PETSc Manual:
Sys/PetscObjectGetType
PETSc.LibPETSc.PetscObjectHasFunction — Method
has::PetscBool = PetscObjectHasFunction(petsclib::PetscLibType, obj, name::String)Query if a function is associated with a given object.
Logically Collective
Input Parameters:
obj- the PETSc objectname- name associated with the child function
Output Parameter:
has- the boolean value
Level: advanced
See also: PetscObject, PetscObjectComposeFunction(), PetscObjectQueryFunction()
External Links
- PETSc Manual:
Sys/PetscObjectHasFunction
PETSc.LibPETSc.PetscObjectIncrementTabLevel — Method
PetscObjectIncrementTabLevel(petsclib::PetscLibType, obj, oldobj, tab::PetscInt)Increments the number of tabs that PETSCVIEWERASCII output for that object use based on the tablevel of another object. This should be called immediately after the object is created.
Not Collective
Input Parameters:
obj- any PETSc object where we are changing the taboldobj- the object providing the tab, optional passNULLto use 0 as the previous tablevel forobjtab- the increment that is added to the old objects tab
Level: developer
See also: PETSCVIEWERASCII, PetscObjectSetTabLevel(), PetscObjectGetTabLevel()
External Links
- PETSc Manual:
Sys/PetscObjectIncrementTabLevel
PETSc.LibPETSc.PetscObjectInheritPrintedOptions — Method
PetscObjectInheritPrintedOptions(petsclib::PetscLibType, pobj, obj)If the child object is not on the MPI rank 0 process of the parent object and the child is sequential then the child gets it set.
Input Parameters:
pobj- the parent objectobj- thePetscObject
Level: developer
See also: PetscOptionsInsert(), PetscObjectSetPrintedOptions(), PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectInheritPrintedOptions
PETSc.LibPETSc.PetscObjectName — Method
PetscObjectName(petsclib::PetscLibType, obj)Gives obj a name if it does not have one
Collective
Input Parameter:
obj- the PETSc object. It must be cast with a (PetscObject), for example,PetscObjectName((PetscObject)mat,name);
Level: developer
See also: PetscObjectGetName(), PetscObjectSetName()
External Links
- PETSc Manual:
Sys/PetscObjectName
PETSc.LibPETSc.PetscObjectObjectTypeCompare — Method
same::PetscBool = PetscObjectObjectTypeCompare(petsclib::PetscLibType, obj1, obj2)Determines whether two PETSc objects are of the same type
Logically Collective
Input Parameters:
obj1- any PETSc object, for example aVec,MatorKSP.obj2- another PETSc object
Output Parameter:
same-PETSC_TRUEif they are the same or both unset, elsePETSC_FALSE
Level: intermediate
See also: PetscObjectTypeCompare(), VecGetType(), KSPGetType(), PCGetType(), SNESGetType(), PetscObjectBaseTypeCompare(), PetscObjectTypeCompareAny(), PetscObjectBaseTypeCompareAny()
External Links
- PETSc Manual:
Sys/PetscObjectObjectTypeCompare
PETSc.LibPETSc.PetscObjectPrependOptionsPrefix — Method
PetscObjectPrependOptionsPrefix(petsclib::PetscLibType, obj, prefix::String)Sets the prefix used for searching for options of for this object in the database.
Input Parameters:
obj- any PETSc object, for example aVec,MatorKSP.prefix- the prefix string to prepend to option requests of the object.
Level: advanced
See also: PetscOptionsCreate(), PetscOptionsDestroy(), PetscObjectSetOptionsPrefix(), PetscObjectAppendOptionsPrefix(), PetscObjectGetOptionsPrefix()
External Links
- PETSc Manual:
Sys/PetscObjectPrependOptionsPrefix
PETSc.LibPETSc.PetscObjectPrintClassNamePrefixType — Method
PetscObjectPrintClassNamePrefixType(petsclib::PetscLibType, obj, viewer::PetscViewer)used in the XXXView() methods to display information about the class, name, prefix and type of an object
Input Parameters:
obj- the PETSc objectviewer-PETSCVIEWERASCIIviewer where the information is printed, function does nothing if the viewer is notPETSCVIEWERASCIItype
Level: developer
See also: PetscObjectSetName(), PetscObjectName()
External Links
- PETSc Manual:
Sys/PetscObjectPrintClassNamePrefixType
PETSc.LibPETSc.PetscObjectProcessOptionsHandlers — Method
PetscObjectProcessOptionsHandlers(petsclib::PetscLibType, obj, PetscOptionsObject::PetscOptionItems)Calls all the options handlers attached to an object
Not Collective
Input Parameters:
obj- the PETSc objectPetscOptionsObject- the options context
Level: developer
See also: KSPSetFromOptions(), PCSetFromOptions(), SNESSetFromOptions(), PetscObjectAddOptionsHandler(), PetscObjectDestroyOptionsHandlers(), PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectProcessOptionsHandlers
PETSc.LibPETSc.PetscObjectQuery — Method
PetscObjectQuery(petsclib::PetscLibType, obj, name::String, ptr::PetscObject)Gets a PETSc object associated with a given object that was composed with PetscObjectCompose()
Not Collective
Input Parameters:
obj- the PETSc object. It must be cast with a (PetscObject), for example,
PetscObjectCompose((PetscObject)mat,...);
name- name associated with child objectptr- the other PETSc object associated with the PETSc object, this must be
cast with (PetscObject*)
Level: advanced
See also: PetscObjectCompose(), PetscObjectComposeFunction(), PetscObjectQueryFunction(), PetscContainer, PetscContainerGetPointer(), PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectQuery
PETSc.LibPETSc.PetscObjectReference — Method
PetscObjectReference(petsclib::PetscLibType, obj)Indicates to a PetscObject that it is being referenced by another PetscObject. This increases the reference count for that object by one.
Logically Collective
Input Parameter:
obj- the PETSc object. This must be cast with (PetscObject), for example,PetscObjectReference((PetscObject)mat);
Level: advanced
See also: PetscObjectCompose(), PetscObjectDereference(), PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectReference
PETSc.LibPETSc.PetscObjectRegisterDestroy — Method
PetscObjectRegisterDestroy(petsclib::PetscLibType, obj)Registers a PETSc object to be destroyed when PetscFinalize() is called.
Logically Collective
Input Parameter:
obj- a PETSc object, for example aVec,MatorKSP. It must be cast with a (PetscObject), for example,
PetscObjectRegisterDestroy((PetscObject)mat);
Level: developer
See also: PetscObjectRegisterDestroyAll()
External Links
- PETSc Manual:
Sys/PetscObjectRegisterDestroy
PETSc.LibPETSc.PetscObjectRegisterDestroyAll — Method
PetscObjectRegisterDestroyAll(petsclib::PetscLibType)Frees all the PETSc objects that have been registered with PetscObjectRegisterDestroy(). Called by PetscFinalize()
Logically Collective on the individual PetscObjects that are being processed
Level: developer
See also: PetscObjectRegisterDestroy()
External Links
- PETSc Manual:
Sys/PetscObjectRegisterDestroyAll
PETSc.LibPETSc.PetscObjectRemoveReference — Method
PetscObjectRemoveReference(petsclib::PetscLibType, obj, name::String)Removes a reference link from a PetscObject's object list without dereferencing the referenced object
Logically collective
Input Parameters:
obj- thePetscObjectwhose list will be modifiedname- the name under which the reference was composed
Level: developer
See also: PetscObject, PetscObjectCompose(), PetscObjectQuery(), PetscObjectReference(), PetscObjectDereference()
External Links
- PETSc Manual:
Sys/PetscObjectRemoveReference
PETSc.LibPETSc.PetscObjectSetFromOptions — Method
PetscObjectSetFromOptions(petsclib::PetscLibType, obj)Sets generic parameters from user options.
Collective
Input Parameter:
obj- thePetscObject
Level: beginner
See also: PetscObjectSetOptionsPrefix(), PetscObjectGetOptionsPrefix(), PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectSetFromOptions
PETSc.LibPETSc.PetscObjectSetName — Method
PetscObjectSetName(petsclib::PetscLibType, obj, name::String)Sets a string name for a PETSc object.
Not Collective
Input Parameters:
obj- the PETSc object. It must be cast with a (PetscObject), for example,
PetscObjectSetName((PetscObject)mat,name);
name- the name to give obj
Level: advanced
See also: PetscObjectGetName(), PetscObjectName()
External Links
- PETSc Manual:
Sys/PetscObjectSetName
PETSc.LibPETSc.PetscObjectSetOptions — Method
PetscObjectSetOptions(petsclib::PetscLibType, obj, options::AbstractPetscOptions)Sets the options database used by the object. Call immediately after creating the object.
Collective
Input Parameters:
obj- any PETSc object, for example aVec,MatorKSP.options- the options database, use NULL for default
Level: advanced
See also: PetscOptionsCreate(), PetscOptionsDestroy(), PetscObjectSetOptionsPrefix(), PetscObjectAppendOptionsPrefix(), PetscObjectPrependOptionsPrefix(), PetscObjectGetOptionsPrefix(), PetscObjectGetOptions()
External Links
- PETSc Manual:
Sys/PetscObjectSetOptions
PETSc.LibPETSc.PetscObjectSetOptionsPrefix — Method
PetscObjectSetOptionsPrefix(petsclib::PetscLibType, obj, prefix::String)Sets the prefix used for searching for all options for the given object in the database.
Collective
Input Parameters:
obj- any PETSc object, for example aVec,MatorKSP.prefix- the prefix string to prepend to option requests of the object.
Level: advanced
See also: PetscOptionsCreate(), PetscOptionsDestroy(), PetscObjectAppendOptionsPrefix(), PetscObjectPrependOptionsPrefix(), PetscObjectGetOptionsPrefix(), TSSetOptionsPrefix(), SNESSetOptionsPrefix(), KSPSetOptionsPrefix()
External Links
- PETSc Manual:
Sys/PetscObjectSetOptionsPrefix
PETSc.LibPETSc.PetscObjectSetPrintedOptions — Method
PetscObjectSetPrintedOptions(petsclib::PetscLibType, obj)indicate to an object that it should behave as if it has already printed the help for its options so it will not display the help message
Input Parameter:
obj- thePetscObject
Level: developer
See also: PetscOptionsInsert(), PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectSetPrintedOptions
PETSc.LibPETSc.PetscObjectSetTabLevel — Method
PetscObjectSetTabLevel(petsclib::PetscLibType, obj, tab::PetscInt)Sets the number of tabs that PETSCVIEWERASCII output for that object uses
Not Collective
Input Parameters:
obj- any PETSc object, for example aVec,MatorKSP. It must be cast with a (PetscObject), for example,
PetscObjectSetTabLevel((PetscObject)mat,tab;
tab- the number of tabs
Level: developer
See also: PetscObjectIncrementTabLevel(), PetscObjectGetTabLevel()
External Links
- PETSc Manual:
Sys/PetscObjectSetTabLevel
PETSc.LibPETSc.PetscObjectSetUp — Method
PetscObjectSetUp(petsclib::PetscLibType, obj)Sets up the internal data structures for later use of the object
Collective
Input Parameter:
obj- thePetscObject
Level: advanced
See also: PetscObjectDestroy(), PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectSetUp
PETSc.LibPETSc.PetscObjectTypeCompare — Method
same::PetscBool = PetscObjectTypeCompare(petsclib::PetscLibType, obj, type_name::String)Determines whether a PETSc object is of a particular type.
Not Collective
Input Parameters:
obj- a PETSc object, for example aVec,MatorKSP. It must be cast with a (PetscObject), for example,
PetscObjectTypeCompare((PetscObject)mat);
type_name- string containing a type name
Output Parameter:
same-PETSC_TRUEif the type ofobjandtype_nameare the same or bothNULL, elsePETSC_FALSE
Level: intermediate
See also: PetscObject, VecGetType(), KSPGetType(), PCGetType(), SNESGetType(), PetscObjectBaseTypeCompare(), PetscObjectTypeCompareAny(), PetscObjectBaseTypeCompareAny(), PetscObjectObjectTypeCompare()
External Links
- PETSc Manual:
Sys/PetscObjectTypeCompare
PETSc.LibPETSc.PetscObjectView — Method
PetscObjectView(petsclib::PetscLibType, obj, viewer::PetscViewer)Views, that is displays or stores information about a PetscObject.
Collective
Input Parameters:
obj- any PETSc object, for example aVec,MatorKSP. It must be cast with a (PetscObject), for example,
PetscObjectView((PetscObject)mat,viewer);
viewer- any PETSc viewer
Level: intermediate
See also: PetscObject, PetscObjectViewFromOptions(), PetscViewer
External Links
- PETSc Manual:
Sys/PetscObjectView
PETSc.LibPETSc.PetscObjectViewFromOptions — Method
PetscObjectViewFromOptions(petsclib::PetscLibType, obj, bobj, name::String)Processes command line options to determine if/how a PetscObject is to be viewed.
Collective
Input Parameters:
obj- the objectbobj- optional other object that provides prefix (ifNULLthen the prefix inobjis used)name- option string that is used to activate viewing. It typically ends with _view.
Options Database Key:
-name [viewertype][:...]- option name and values. In actual usage the key might be something like-vec_view
Level: developer
See also: PetscObject, PetscObjectView(), PetscOptionsCreateViewer()
External Links
- PETSc Manual:
Sys/PetscObjectViewFromOptions
PETSc.LibPETSc.PetscObjectViewSAWs — Method
PetscObjectViewSAWs(petsclib::PetscLibType, obj, viewer::PetscViewer)View the base portion of any object with an SAWs viewer
Collective
Input Parameters:
obj- thePetscObjectvariable. It must be cast with a (PetscObject), for example,PetscObjectSetName((PetscObject)mat,name);viewer- the SAWs viewer
Level: advanced
See also: PetscViewer, PetscObject, PetscObjectSetName()
External Links
- PETSc Manual:
Viewer/PetscObjectViewSAWs
PETSc.LibPETSc.PetscObjectsDump — Method
PetscObjectsDump(petsclib::PetscLibType, fd::Libc.FILE, all::PetscBool)Prints all the currently existing objects.
Input Parameters:
fd- file pointerall- by default only tries to display objects created explicitly by the user, if all isPETSC_TRUEthen lists all outstanding objects
Options Database Key:
-objects_dump all- print information about all the objects that exist at the end of the programs run
Level: advanced
See also: PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectsDump
PETSc.LibPETSc.PetscObjectsGetObject — Method
obj::PetscObject,classname::String = PetscObjectsGetObject(petsclib::PetscLibType, name::String)Get a pointer to a named object
Not Collective
Input Parameter:
name- the name of an object
Output Parameters:
obj- the object orNULLif there is no object, optional, pass inNULLif not neededclassname- the name of the class of the object, optional, pass inNULLif not needed
Level: advanced
See also: PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectsGetObject
PETSc.LibPETSc.PetscObjectsListGetGlobalNumbering — Method
count::PetscInt,numbering::PetscInt = PetscObjectsListGetGlobalNumbering(petsclib::PetscLibType, comm::MPI_Comm, len::PetscInt, objlist::Vector{PetscObject})computes a global numbering of PetscObjects living on subcommunicators of a given communicator.
Collective.
Input Parameters:
comm- theMPI_Commlen- local length ofobjlistobjlist- a list of PETSc objects living on subcomms of comm and containing this comm rank
(subcomm ordering is assumed to be deadlock-free)
Output Parameters:
count- global number of distinct subcommunicators on objlist (may be >len)numbering- global numbers of objlist entries (allocated by user)
Level: developer
See also: PetscCommDuplicate(), PetscObjectDestroy()
External Links
- PETSc Manual:
Sys/PetscObjectsListGetGlobalNumbering
PETSc.LibPETSc.PetscObjectsView — Method
PetscObjectsView(petsclib::PetscLibType, viewer::PetscViewer)Prints the currently existing objects.
Logically Collective
Input Parameter:
viewer- must be anPETSCVIEWERASCIIviewer
Level: advanced
See also: PetscObject
External Links
- PETSc Manual:
Sys/PetscObjectsView
PetscLog
PETSc.LibPETSc.PetscLogHandlerCreate — Method
handler::PetscLogHandler = PetscLogHandlerCreate(petsclib::PetscLibType, comm::MPI_Comm)Create a log handler for profiling events and stages. PETSc provides several implementations of PetscLogHandler that interface to different ways to summarize or visualize profiling data: see PetscLogHandlerType for a list.
Collective
Input Parameter:
comm- the communicator for synchronizing and viewing events with this handler
Output Parameter:
handler- thePetscLogHandler
Level: developer
See also: PetscLogHandler, PetscLogHandlerSetType(), PetscLogHandlerStart(), PetscLogHandlerStop()
External Links
- PETSc Manual:
Log/PetscLogHandlerCreate
PETSc.LibPETSc.PetscLogHandlerCreateLegacy — Method
handler::PetscLogHandler = PetscLogHandlerCreateLegacy(petsclib::PetscLibType, comm::MPI_Comm, PetscLogPLB::external, PetscLogPLE::external, PetscLogPHC::external, PetscLogPHD::external)Create a PetscLogHandler from callbacks matching PETSc's legacy log handler callbacks
Collective
Input Parameters:
comm- an MPI communicatorPetscLogPLB- a function to call duringPetscLogHandlerEventBegin()(orNULL)PetscLogPLE- a function to call duringPetscLogHandlerEventEnd()(orNULL)PetscLogPHC- a function to call duringPetscLogHandlerObjectCreate()(orNULL)PetscLogPHD- a function to call duringPetscLogHandlerObjectDestroy()(orNULL)
Output Parameter:
handler- aPetscLogHandler
Calling sequence of PetscLogPLB:
e- aPetscLogEventthat is beginning_i- deprecated, unusedo1- aPetscObjectassociated withe(orNULL)o2- aPetscObjectassociated withe(orNULL)o3- aPetscObjectassociated withe(orNULL)o4- aPetscObjectassociated withe(orNULL)
Calling sequence of PetscLogPLE:
e- aPetscLogEventthat is beginning_i- deprecated, unusedo1- aPetscObjectassociated withe(orNULL)o2- aPetscObjectassociated withe(orNULL)o3- aPetscObjectassociated withe(orNULL)o4- aPetscObjectassociated withe(orNULL)
Calling sequence of PetscLogPHC:
o- aPetscObjectthat has just been created
Calling sequence of PetscLogPHD:
o- aPetscObjectthat is about to be destroyed
Level: developer
Notes: This is for transitioning from the deprecated function PetscLogSet() and should not be used in new code.
PetscLogLegacyCallbacksBegin(), which calls this function, creates and starts (PetscLogHandlerStart()) a log handler, should be used in almost all cases.
External Links
- PETSc Manual:
Log/PetscLogHandlerCreateLegacy
PETSc.LibPETSc.PetscLogHandlerCreateTrace — Method
file::Libc.FILE,handler::PetscLogHandler = PetscLogHandlerCreateTrace(petsclib::PetscLibType, comm::MPI_Comm)Create a logger that traces events and stages to a given file descriptor
Collective, No Fortran Support
Input Parameters:
comm- an MPI communicatorfile- a file descriptor
Output Parameters:
handler- aPetscLogHandler of typePETSCLOGHANDLERTRACE`
Level: developer
See also: PetscLogHandler, PetscLogHandlerTraceBegin()
External Links
- PETSc Manual:
Log/PetscLogHandlerCreateTrace
PETSc.LibPETSc.PetscLogHandlerDestroy — Method
PetscLogHandlerDestroy(petsclib::PetscLibType, handler::Union{PetscLogHandler, Ref{PetscLogHandler}})Destroy a PetscLogHandler
Logically collective
Input Parameter:
handler- handler to be destroyed
Level: developer
See also: PetscLogHandler, PetscLogHandlerCreate()
External Links
- PETSc Manual:
Log/PetscLogHandlerDestroy
PETSc.LibPETSc.PetscLogHandlerDump — Method
PetscLogHandlerDump(petsclib::PetscLibType, handler::PetscLogHandler, sname::String)Dump the records of a log handler to file
Not collective
Input Parameters:
handler- aPetscLogHandlersname- the name of the file to dump log data to
Level: developer
Note: The default log handler PETSCLOGHANDLERDEFAULT implements this function, but others generally do not. You can use PetscLogDump() to call this function for the default log handler that is connected to the global logging state (PetscLogGetState()).
External Links
- PETSc Manual:
Log/PetscLogHandlerDump
PETSc.LibPETSc.PetscLogHandlerEventBegin — Method
PetscLogHandlerEventBegin(petsclib::PetscLibType, h::PetscLogHandler, e::PetscLogEvent, o1, o2, o3, o4)Record the beginning of an event in a log handler
Not collective
Input Parameters:
h- thePetscLogHandlere- a registeredPetscLogEvento1-PetscObjectassociated with the event (may beNULL)o2-PetscObjectassociated with the event (may beNULL)o3-PetscObjectassociated with the event (may beNULL)o4-PetscObjectassociated with the event (may beNULL)
Level: developer
See also: PetscLogHandler, PetscLogEventBegin(), PetscLogEventEnd(), PetscLogEventSync(), PetscLogHandlerEventEnd(), PetscLogHandlerEventSync()
External Links
- PETSc Manual:
Log/PetscLogHandlerEventBegin
PETSc.LibPETSc.PetscLogHandlerEventDeactivatePop — Method
PetscLogHandlerEventDeactivatePop(petsclib::PetscLibType, handler::PetscLogHandler, stage::PetscLogStage, event::PetscLogEvent)Undo temporary deactivation a logging event for a log handler
Not collective
Input Parameters:
handler- aPetscLogHandlerstage- aPetscLogStage(orPETSC_DEFAULTfor the current stage)event- aPetscLogEvent
Level: developer
See also: PetscLogHandlerEventDeactivatePush()
External Links
- PETSc Manual:
Log/PetscLogHandlerEventDeactivatePop
PETSc.LibPETSc.PetscLogHandlerEventDeactivatePush — Method
PetscLogHandlerEventDeactivatePush(petsclib::PetscLibType, handler::PetscLogHandler, stage::PetscLogStage, event::PetscLogEvent)Temporarily deactivate a logging event for a log handler
Not collective
Input Parameters:
handler- aPetscLogHandlerstage- aPetscLogStage(orPETSC_DEFAULTfor the current stage)event- aPetscLogEvent
Level: developer
See also: PetscLogHandlerEventDeactivatePop()
External Links
- PETSc Manual:
Log/PetscLogHandlerEventDeactivatePush
PETSc.LibPETSc.PetscLogHandlerEventEnd — Method
PetscLogHandlerEventEnd(petsclib::PetscLibType, h::PetscLogHandler, e::PetscLogEvent, o1, o2, o3, o4)Record the end of an event in a log handler
Not collective
Input Parameters:
h- thePetscLogHandlere- a registeredPetscLogEvento1-PetscObjectassociated with the event (may beNULL)o2-PetscObjectassociated with the event (may beNULL)o3-PetscObjectassociated with the event (may beNULL)o4-PetscObjectassociated with the event (may beNULL)
Level: developer
See also: PetscLogHandler, PetscLogEventBegin(), PetscLogEventEnd(), PetscLogEventSync(), PetscLogHandlerEventBegin(), PetscLogHandlerEventSync()
External Links
- PETSc Manual:
Log/PetscLogHandlerEventEnd
PETSc.LibPETSc.PetscLogHandlerEventSync — Method
PetscLogHandlerEventSync(petsclib::PetscLibType, h::PetscLogHandler, e::PetscLogEvent, comm::MPI_Comm)Synchronize a logging event
Collective
Input Parameters:
h- thePetscLogHandlere- a registeredPetscLogEventcomm- the communicator over which to synchronizee
Level: developer
See also: PetscLogHandler, PetscLogEventBegin(), PetscLogEventEnd(), PetscLogEventSync(), PetscLogHandlerEventBegin(), PetscLogHandlerEventEnd()
External Links
- PETSc Manual:
Log/PetscLogHandlerEventSync
PETSc.LibPETSc.PetscLogHandlerEventsPause — Method
PetscLogHandlerEventsPause(petsclib::PetscLibType, handler::PetscLogHandler)Put event logging into "paused" mode (see PetscLogEventsPause() for details.) for a log handler
Not collective
Input Parameter:
handler- aPetscLogHandler
Level: developer
See also: PetscLogHandlerEventsResume()
External Links
- PETSc Manual:
Log/PetscLogHandlerEventsPause
PETSc.LibPETSc.PetscLogHandlerEventsResume — Method
PetscLogHandlerEventsResume(petsclib::PetscLibType, handler::PetscLogHandler)Resume event logging that had been put into "paused" mode (see PetscLogEventsPause() for details.) for a log handler
Not collective
Input Parameter:
handler- aPetscLogHandler
Level: developer
See also: PetscLogHandlerEventsPause()
External Links
- PETSc Manual:
Log/PetscLogHandlerEventsResume
PETSc.LibPETSc.PetscLogHandlerGetEventPerfInfo — Method
event_info::Ptr{PetscEventPerfInfo} = PetscLogHandlerGetEventPerfInfo(petsclib::PetscLibType, handler::PetscLogHandler, stage::PetscLogStage, event::PetscLogEvent)Get a direct reference to the PetscEventPerfInfo of a stage and event
Not collective, No Fortran Support
Input Parameters:
handler- aPetscLogHandlerstage- aPetscLogStage(orPETSC_DEFAULTfor the current stage)event- aPetscLogEvent
Output Parameter:
event_info- a pointer to a performance log foreventduringstage(orNULLif this handler does not use
PetscEventPerfInfo to record performance data); writing to event_info will change the record in handler
Level: developer
See also: PetscLogEventGetPerfInfo(), PETSCLOGHANDLERDEFAULT
External Links
- PETSc Manual:
Log/PetscLogHandlerGetEventPerfInfo
PETSc.LibPETSc.PetscLogHandlerGetNumObjects — Method
num_objects::PetscInt = PetscLogHandlerGetNumObjects(petsclib::PetscLibType, handler::PetscLogHandler)Get the number of objects that were logged with a log handler
Not Collective
Input Parameter:
handler- aPetscLogHandler
Output Parameter:
num_objects- the number of objects whose creations and destructions were logged withhandler
(PetscLogHandlerObjectCreate() / PetscLogHandlerObjectDestroy()), or -1 if the handler does not keep track of this number.
Level: developer
Note: The default log handler PETSCLOGHANDLERDEFAULT implements this function, but others generally do not.
External Links
- PETSc Manual:
Log/PetscLogHandlerGetNumObjects
PETSc.LibPETSc.PetscLogHandlerGetStagePerfInfo — Method
stage_info::Ptr{PetscEventPerfInfo} = PetscLogHandlerGetStagePerfInfo(petsclib::PetscLibType, handler::PetscLogHandler, stage::PetscLogStage)Get a direct reference to the PetscEventPerfInfo of a stage
Not collective, No Fortran Support
Input Parameters:
handler- aPetscLogHandlerstage- aPetscLogStage(orPETSC_DEFAULTfor the current stage)
Output Parameter:
stage_info- a pointer to a performance log forstage(orNULLif this handler does not usePetscEventPerfInfo
to record performance data); writing to stage_info will change the record in handler
Level: developer
See also: PetscLogEventGetPerfInfo(), PETSCLOGHANDLERDEFAULT
External Links
- PETSc Manual:
Log/PetscLogHandlerGetStagePerfInfo
PETSc.LibPETSc.PetscLogHandlerGetState — Method
state::PetscLogState = PetscLogHandlerGetState(petsclib::PetscLibType, h::PetscLogHandler)Get the logging state that provides the stream of events and stages for a log handler.
Logically collective
Input Parameter:
h- thePetscLogHandler
Output Parameter:
state- thePetscLogState
Level: developer
See also: PetscLogHandler, PetscLogState, PetscLogEventBegin(), PetscLogHandlerStart()
External Links
- PETSc Manual:
Log/PetscLogHandlerGetState
PETSc.LibPETSc.PetscLogHandlerGetType — Method
name::String = PetscLogHandlerGetType(petsclib::PetscLibType, handler::PetscLogHandler)Gets the PetscLoagHandlerType (as a string) from the PetscLogHandler object.
Not collective
Input Parameter:
handler- thePetscLogHandler
Output Parameter:
name- ThePetscLogHandlerTypename
Level: developer
See also: PetscLogHandler, PetscLogHandlerCreate(), PetscLogHandlerRegister(), PetscLogHandlerSetType()
External Links
- PETSc Manual:
Log/PetscLogHandlerGetType
PETSc.LibPETSc.PetscLogHandlerObjectCreate — Method
PetscLogHandlerObjectCreate(petsclib::PetscLibType, h::PetscLogHandler, obj)Record the creation of an object in a log handler.
Not collective
Input Parameters:
h- thePetscLogHandlerobj- a newly createdPetscObject
Level: developer
See also: PetscLogHandler, PetscLogObjectCreate(), PetscLogObjectDestroy(), PetscLogHandlerObjectDestroy()
External Links
- PETSc Manual:
Log/PetscLogHandlerObjectCreate
PETSc.LibPETSc.PetscLogHandlerObjectDestroy — Method
PetscLogHandlerObjectDestroy(petsclib::PetscLibType, h::PetscLogHandler, obj)Record the destruction of an object in a log handler.
Not collective
Input Parameters:
h- thePetscLogHandlerobj- a newly createdPetscObject
Level: developer
See also: PetscLogHandler, PetscLogObjectCreate(), PetscLogObjectDestroy(), PetscLogHandlerObjectCreate()
External Links
- PETSc Manual:
Log/PetscLogHandlerObjectDestroy
PETSc.LibPETSc.PetscLogHandlerRegister — Method
PetscLogHandlerRegister(petsclib::PetscLibType, sname::String, fnc::external)Register a new PetscLogHandler
Not Collective, No Fortran Support
Input Parameters:
sname- The name of a new user-defined creation routinefunction- The creation routine
See also: PetscLogHandler, PetscLogHandlerCreate(), PetscLogHandlerSetType(), PetscLogHandlerGetType()
External Links
- PETSc Manual:
Log/PetscLogHandlerRegister
PETSc.LibPETSc.PetscLogHandlerSetLogActions — Method
PetscLogHandlerSetLogActions(petsclib::PetscLibType, handler::PetscLogHandler, flag::PetscBool)Determines whether actions are logged for a log handler.
Not Collective
Input Parameters:
handler- aPetscLogHandlerflag-PETSC_TRUEif actions are to be logged (ignored ifhandlerdoes not log actions)
Level: developer
See also: PetscLogSetLogActions(), PetscLogStagePush(), PetscLogStagePop(), PetscLogGetDefaultHandler()
External Links
- PETSc Manual:
Log/PetscLogHandlerSetLogActions
PETSc.LibPETSc.PetscLogHandlerSetLogObjects — Method
PetscLogHandlerSetLogObjects(petsclib::PetscLibType, handler::PetscLogHandler, flag::PetscBool)Determines whether objects are logged for a log handler.
Not Collective
Input Parameters:
handler- aPetscLogHandlerflag-PETSC_TRUEif objects are to be logged (ignored ifhandlerdoes not log objects)
Level: developer
See also: PetscLogSetLogObjects(), PetscLogStagePush(), PetscLogStagePop(), PetscLogGetDefaultHandler()
External Links
- PETSc Manual:
Log/PetscLogHandlerSetLogObjects
PETSc.LibPETSc.PetscLogHandlerSetState — Method
PetscLogHandlerSetState(petsclib::PetscLibType, h::PetscLogHandler, state::PetscLogState)Set the logging state that provides the stream of events and stages for a log handler.
Logically collective
Input Parameters:
h- thePetscLogHandlerstate- thePetscLogState
Level: developer
See also: PetscLogHandler, PetscLogState, PetscLogEventBegin(), PetscLogHandlerStart()
External Links
- PETSc Manual:
Log/PetscLogHandlerSetState
PETSc.LibPETSc.PetscLogHandlerSetType — Method
PetscLogHandlerSetType(petsclib::PetscLibType, handler::PetscLogHandler, name::String)Set the type of a PetscLogHandler
Input Parameters:
handler- thePetscLogHandlername- The kind of log handler
Level: developer
See also: PetscLogHandler, PetscLogHandlerCreate(), PetscLogHandlerRegister(), PetscLogHandlerGetType()
External Links
- PETSc Manual:
Log/PetscLogHandlerSetType
PETSc.LibPETSc.PetscLogHandlerStageGetVisible — Method
isVisible::PetscBool = PetscLogHandlerStageGetVisible(petsclib::PetscLibType, handler::PetscLogHandler, stage::PetscLogStage)Get the visibility of logging stage in PetscLogHandlerView() for a log handler
Not collective
Input Parameters:
handler- aPetscLogHandlerstage- aPetscLogStage
Output Parameter:
isVisible- the visibility flag,PETSC_TRUEto print, elsePETSC_FALSE(defaults toPETSC_TRUE)
Level: developer
See also: PetscLogHandlerStageSetVisible()
External Links
- PETSc Manual:
Log/PetscLogHandlerStageGetVisible
PETSc.LibPETSc.PetscLogHandlerStagePop — Method
PetscLogHandlerStagePop(petsclib::PetscLibType, h::PetscLogHandler, stage::PetscLogStage)End the current logging stage in a log handler.
Not collective
Input Parameters:
h- thePetscLogHandlerstage- a registeredPetscLogStage
Level: developer
See also: PetscLogHandler, PetscLogStagePush(), PetscLogStagePop(), PetscLogHandlerStagePush()
External Links
- PETSc Manual:
Log/PetscLogHandlerStagePop
PETSc.LibPETSc.PetscLogHandlerStagePush — Method
PetscLogHandlerStagePush(petsclib::PetscLibType, h::PetscLogHandler, stage::PetscLogStage)Begin a new logging stage in a log handler.
Not collective
Input Parameters:
h- thePetscLogHandlerstage- a registeredPetscLogStage
Level: developer
See also: PetscLogHandler, PetscLogStagePush(), PetscLogStagePop(), PetscLogHandlerStagePop()
External Links
- PETSc Manual:
Log/PetscLogHandlerStagePush
PETSc.LibPETSc.PetscLogHandlerStageSetVisible — Method
PetscLogHandlerStageSetVisible(petsclib::PetscLibType, handler::PetscLogHandler, stage::PetscLogStage, isVisible::PetscBool)Set the visibility of logging stage in PetscLogHandlerView() for a log handler
Not collective
Input Parameters:
handler- aPetscLogHandlerstage- aPetscLogStageisVisible- the visibility flag,PETSC_TRUEto print, elsePETSC_FALSE(defaults toPETSC_TRUE)
Level: developer
See also: PetscLogHandlerStageGetVisible()
External Links
- PETSc Manual:
Log/PetscLogHandlerStageSetVisible
PETSc.LibPETSc.PetscLogHandlerStart — Method
PetscLogHandlerStart(petsclib::PetscLibType, h::PetscLogHandler)Connect a log handler to PETSc's global logging stream and state.
Logically collective
Input Parameters:
h- aPetscLogHandler
Level: developer
See also: PetscLogHandler, PetscLogState, PetscLogHandlerStop(), PetscInitialize()
External Links
- PETSc Manual:
Log/PetscLogHandlerStart
PETSc.LibPETSc.PetscLogHandlerStop — Method
PetscLogHandlerStop(petsclib::PetscLibType, h::PetscLogHandler)Disconnect a log handler from PETSc's global logging stream.
Logically collective
Input Parameters:
h- aPetscLogHandler
Level: developer
See also: PetscLogHandler, PetscLogState, PetscLogHandlerStart()
External Links
- PETSc Manual:
Log/PetscLogHandlerStop
PETSc.LibPETSc.PetscLogHandlerView — Method
PetscLogHandlerView(petsclib::PetscLibType, h::PetscLogHandler, viewer::PetscViewer)View the data recorded in a log handler.
Collective
Input Parameters:
h- thePetscLogHandlerviewer- thePetscViewer
Level: developer
See also: PetscLogHandler, PetscLogView()
External Links
- PETSc Manual:
Log/PetscLogHandlerView
PETSc.LibPETSc.PetscLogStateClassGetInfo — Method
info::PetscLogClassInfo = PetscLogStateClassGetInfo(petsclib::PetscLibType, state::PetscLogState, clss::PetscLogClass)Get the registration information of an class
Not collective
Input Parameters:
state- aPetscLogStateclss- a registeredPetscLogClass
Output Parameter:
info- thePetscLogClassInfoof the class will be copied into info
Level: developer
See also: PetscLogState, PetscLogStateClassRegister(), PetscLogStateGetClassFromName()
External Links
- PETSc Manual:
Log/PetscLogStateClassGetInfo
PETSc.LibPETSc.PetscLogStateClassRegister — Method
logclass::PetscLogClass = PetscLogStateClassRegister(petsclib::PetscLibType, state::PetscLogState, name::String, id::PetscClassId)Register a class to with a PetscLogState used by PetscLogHandlers.
Logically collective on PETSC_COMM_WORLD
Input Parameters:
state- aPetscLogStatename- the name of a class registered withPetscClassIdRegister()id- thePetscClassIdobtained fromPetscClassIdRegister()
Output Parameter:
logclass- aPetscLogClassfor this class with this state
Level: developer
See also: PetscLogStateClassGetInfo(), PetscLogStateGetClassFromName(), PetscLogStateGetClassFromClassId()
External Links
- PETSc Manual:
Log/PetscLogStateClassRegister
PETSc.LibPETSc.PetscLogStateClassSetActive — Method
PetscLogStateClassSetActive(petsclib::PetscLibType, state::PetscLogState, stage::PetscLogStage, classid::PetscClassId, isActive::PetscBool)Set logging events associated with an event as active or inactive during a logging stage.
Not collective
Input Parameters:
state- aPetscLogStatestage- a registeredPetscLogStage, orPETSC_DEFAULTfor the current stageclassid- aPetscClassIdisActive- ifPETSC_FALSE,PetscLogStateEventGetActive()will return
PETSC_FALSE for this stage and all events that were associated with this class when they were registered (see PetscLogStateEventRegister()).
Level: developer
See also: PetscLogState, PetscLogEventGetActive(), PetscLogStateEventSetActive()
External Links
- PETSc Manual:
Log/PetscLogStateClassSetActive
PETSc.LibPETSc.PetscLogStateClassSetActiveAll — Method
PetscLogStateClassSetActiveAll(petsclib::PetscLibType, state::PetscLogState, classid::PetscClassId, isActive::PetscBool)Set logging events associated with an event as active or inactive for all logging stages
Not collective
Input Parameters:
state- aPetscLogStateclassid- aPetscClassIdisActive- ifPETSC_FALSE,PetscLogStateEventGetActive()will return
PETSC_FALSE for all events that were associated with this class when they were registered (see PetscLogStateEventRegister()).
Level: developer
See also: PetscLogState, PetscLogEventGetActive(), PetscLogStateClassSetActive()
External Links
- PETSc Manual:
Log/PetscLogStateClassSetActiveAll
PETSc.LibPETSc.PetscLogStateCreate — Method
state::PetscLogState = PetscLogStateCreate(petsclib::PetscLibType)Create a logging state.
Not collective
Output Parameters:
state- aPetscLogState
Level: developer
See also: PetscLogState, PetscLogStateDestroy()
External Links
- PETSc Manual:
Log/PetscLogStateCreate
PETSc.LibPETSc.PetscLogStateDestroy — Method
PetscLogStateDestroy(petsclib::PetscLibType, state::Union{PetscLogState, Ref{PetscLogState}})Destroy a logging state.
Not collective
Input Parameters:
state- aPetscLogState
Level: developer
See also: PetscLogState, PetscLogStateCreate()
External Links
- PETSc Manual:
Log/PetscLogStateDestroy
PETSc.LibPETSc.PetscLogStateEventGetActive — Method
isActive::PetscBool = PetscLogStateEventGetActive(petsclib::PetscLibType, state::PetscLogState, stage::PetscLogStage, event::PetscLogEvent)Check if a logging event is active or inactive during a logging stage.
Not collective
Input Parameters:
state- aPetscLogStatestage- a registeredPetscLogStage, orPETSC_DEFAULTfor the current stageevent- a registeredPetscLogEvent
Output Parameter:
isActive- IfPETSC_FALSE, log handlers should not be notified of the event's beginning or end.
Level: developer
See also: PetscLogState, PetscLogEventGetActive(), PetscLogStateGetCurrentStage(), PetscLogHandler()
External Links
- PETSc Manual:
Log/PetscLogStateEventGetActive
PETSc.LibPETSc.PetscLogStateEventGetInfo — Method
info::PetscLogEventInfo = PetscLogStateEventGetInfo(petsclib::PetscLibType, state::PetscLogState, event::PetscLogEvent)Get the registration information of an event
Not collective
Input Parameters:
state- aPetscLogStateevent- a registeredPetscLogEvent
Output Parameter:
info- thePetscLogEventInfoof the event will be copied into info
Level: developer
See also: PetscLogState, PetscLogStateEventRegister(), PetscLogStateGetEventFromName()
External Links
- PETSc Manual:
Log/PetscLogStateEventGetInfo
PETSc.LibPETSc.PetscLogStateEventRegister — Method
event::PetscLogEvent = PetscLogStateEventRegister(petsclib::PetscLibType, state::PetscLogState, sname::String, id::PetscClassId)Register a new event with a logging state
Not collective
Input Parameters:
state- aPetscLogStatesname- a unique nameid- thePetscClassIdfor the type of object most closely associated with this event
Output Parameter:
event- the identifier for the registered event
Level: developer
See also: PetscLogState, PetscLogStageRegister()
External Links
- PETSc Manual:
Log/PetscLogStateEventRegister
PETSc.LibPETSc.PetscLogStateEventSetActive — Method
PetscLogStateEventSetActive(petsclib::PetscLibType, state::PetscLogState, stage::PetscLogStage, event::PetscLogEvent, isActive::PetscBool)Set a logging event as active or inactive during a logging stage.
Not collective
Input Parameters:
state- aPetscLogStatestage- a registeredPetscLogStage, orPETSC_DEFAULTfor the current stageevent- a registeredPetscLogEventisActive- ifPETSC_FALSE,PetscLogStateEventGetActive()will returnPETSC_FALSEfor this stage and this event
Level: developer
See also: PetscLogState, PetscLogEventGetActive(), PetscLogStateGetCurrentStage(), PetscLogEventSetActiveAll()
External Links
- PETSc Manual:
Log/PetscLogStateEventSetActive
PETSc.LibPETSc.PetscLogStateEventSetActiveAll — Method
PetscLogStateEventSetActiveAll(petsclib::PetscLibType, state::PetscLogState, event::PetscLogEvent, isActive::PetscBool)Set logging event as active or inactive for all logging stages
Not collective
Input Parameters:
state- aPetscLogStateevent- a registeredPetscLogEventisActive- ifPETSC_FALSE,PetscLogStateEventGetActive()will returnPETSC_FALSEfor all stages and all events
Level: developer
See also: PetscLogState, PetscLogEventGetActive()
External Links
- PETSc Manual:
Log/PetscLogStateEventSetActiveAll
PETSc.LibPETSc.PetscLogStateEventSetCollective — Method
PetscLogStateEventSetCollective(petsclib::PetscLibType, state::PetscLogState, event::PetscLogEvent, collective::PetscBool)Set the collective nature of a logging event
Logically collective
Input Parameters:
state- aPetscLogStateevent- a registeredPetscLogEventcollective- ifPETSC_TRUE, MPI processes synchronize during this event, andPetscLogHandlerEventSync()can be used to help measure the delays between when the processes begin the event
Level: developer
See also: PetscLogState, PetscLogEventRegister()
External Links
- PETSc Manual:
Log/PetscLogStateEventSetCollective
PETSc.LibPETSc.PetscLogStateGetClassFromClassId — Method
clss::PetscLogClass = PetscLogStateGetClassFromClassId(petsclib::PetscLibType, state::PetscLogState, classid::PetscClassId)Get a PetscLogClass from the PetscClassId it was registered with.
Not collective
Input Parameters:
state- aPetscLogStateclassid- aPetscClassId
Output Parameter:
clss- the classes's logging id
Level: developer
See also: PetscLogState, PetscLogStateClassRegister(), PetscLogStateClassGetInfo()
External Links
- PETSc Manual:
Log/PetscLogStateGetClassFromClassId
PETSc.LibPETSc.PetscLogStateGetClassFromName — Method
clss::PetscLogClass = PetscLogStateGetClassFromName(petsclib::PetscLibType, state::PetscLogState, name::String)Get a PetscLogClass from the name of the class it was registered with.
Not collective
Input Parameters:
state- aPetscLogStatename- the name string of the class
Output Parameter:
clss- the classes's logging id
Level: developer
See also: PetscLogState, PetscLogStateClassRegister(), PetscLogStateClassGetInfo()
External Links
- PETSc Manual:
Log/PetscLogStateGetClassFromName
PETSc.LibPETSc.PetscLogStateGetCurrentStage — Method
current::PetscLogStage = PetscLogStateGetCurrentStage(petsclib::PetscLibType, state::PetscLogState)Get the last stage that was started
Not collective
Input Parameter:
state- aPetscLogState
Output Parameter:
current- the lastPetscLogStagestarted withPetscLogStateStagePop()
Level: developer
See also: PetscLogState, PetscLogStateStageRegister(), PetscLogStateStagePush(), PetscLogStateStagePop()
External Links
- PETSc Manual:
Log/PetscLogStateGetCurrentStage
PETSc.LibPETSc.PetscLogStateGetEventFromName — Method
event::PetscLogEvent = PetscLogStateGetEventFromName(petsclib::PetscLibType, state::PetscLogState, name::String)Get a PetscLogEvent from the name it was registered with.
Not collective
Input Parameters:
state- aPetscLogStatename- an event's name
Output Parameter:
event- the event's id
Level: developer
See also: PetscLogState, PetscLogStateEventRegister(), PetscLogStateEventGetInfo()
External Links
- PETSc Manual:
Log/PetscLogStateGetEventFromName
PETSc.LibPETSc.PetscLogStateGetNumClasses — Method
numClasses::PetscInt = PetscLogStateGetNumClasses(petsclib::PetscLibType, state::PetscLogState)Get the number of registered classes in a logging state.
Not collective
Input Parameter:
state- aPetscLogState
Output Parameter:
numClasses- the number of registeredPetscLogClasss
Level: developer
See also: PetscLogState, PetscLogStateClassRegister()
External Links
- PETSc Manual:
Log/PetscLogStateGetNumClasses
PETSc.LibPETSc.PetscLogStateGetNumEvents — Method
numEvents::PetscInt = PetscLogStateGetNumEvents(petsclib::PetscLibType, state::PetscLogState)Get the number of registered events in a logging state.
Not collective
Input Parameter:
state- aPetscLogState
Output Parameter:
numEvents- the number of registeredPetscLogEvents
Level: developer
See also: PetscLogState, PetscLogStateEventRegister()
External Links
- PETSc Manual:
Log/PetscLogStateGetNumEvents
PETSc.LibPETSc.PetscLogStateGetNumStages — Method
numStages::PetscInt = PetscLogStateGetNumStages(petsclib::PetscLibType, state::PetscLogState)Get the number of registered stages in a logging state.
Not collective
Input Parameter:
state- aPetscLogState
Output Parameter:
numStages- the number of registeredPetscLogStages
Level: developer
See also: PetscLogState, PetscLogStateStageRegister()
External Links
- PETSc Manual:
Log/PetscLogStateGetNumStages
PETSc.LibPETSc.PetscLogStateGetStageFromName — Method
stage::PetscLogStage = PetscLogStateGetStageFromName(petsclib::PetscLibType, state::PetscLogState, name::String)Get a PetscLogStage from the name it was registered with.
Not collective
Input Parameters:
state- aPetscLogStatename- a stage's name
Output Parameter:
stage- the stage's id
Level: developer
See also: PetscLogState, PetscLogStateStageRegister(), PetscLogStateStageGetInfo()
External Links
- PETSc Manual:
Log/PetscLogStateGetStageFromName
PETSc.LibPETSc.PetscLogStateStageGetActive — Method
isActive::PetscBool = PetscLogStateStageGetActive(petsclib::PetscLibType, state::PetscLogState, stage::PetscLogStage)Check if a logging stage is active or inactive.
Not collective
Input Parameters:
state- aPetscLogStatestage- a registeredPetscLogStage
Output Parameter:
isActive- ifPETSC_FALSE, the state should not send logging events to log handlers during this stage.
Level: developer
See also: PetscLogState, PetscLogStageSetActive(), PetscLogHandler, PetscLogHandlerStart(), PetscLogHandlerEventBegin(), PetscLogHandlerEventEnd()
External Links
- PETSc Manual:
Log/PetscLogStateStageGetActive
PETSc.LibPETSc.PetscLogStateStageGetInfo — Method
info::PetscLogStageInfo = PetscLogStateStageGetInfo(petsclib::PetscLibType, state::PetscLogState, stage::PetscLogStage)Get the registration information of an stage
Not collective
Input Parameters:
state- aPetscLogStatestage- a registeredPetscLogStage
Output Parameter:
info- thePetscLogStageInfoof the stage will be copied into info
Level: developer
See also: PetscLogState, PetscLogStateStageRegister(), PetscLogStateGetStageFromName()
External Links
- PETSc Manual:
Log/PetscLogStateStageGetInfo
PETSc.LibPETSc.PetscLogStateStagePop — Method
PetscLogStateStagePop(petsclib::PetscLibType, state::PetscLogState)End a running logging stage.
Not collective
Input Parameter:
state- aPetscLogState
Level: developer
See also: PetscLogState, PetscLogStateStageRegister(), PetscLogStateStagePush(), PetscLogStateGetCurrentStage()
External Links
- PETSc Manual:
Log/PetscLogStateStagePop
PETSc.LibPETSc.PetscLogStateStagePush — Method
PetscLogStateStagePush(petsclib::PetscLibType, state::PetscLogState, stage::PetscLogStage)Start a new logging stage.
Not collective
Input Parameters:
state- aPetscLogStatestage- a registeredPetscLogStage
Level: developer
See also: PetscLogState, PetscLogStateStageRegister(), PetscLogStateStagePop(), PetscLogStateGetCurrentStage()
External Links
- PETSc Manual:
Log/PetscLogStateStagePush
PETSc.LibPETSc.PetscLogStateStageRegister — Method
stage::PetscLogStage = PetscLogStateStageRegister(petsclib::PetscLibType, state::PetscLogState, sname::String)Register a new stage with a logging state
Not collective
Input Parameters:
state- aPetscLogStatesname- a unique name
Output Parameter:
stage- the identifier for the registered stage
Level: developer
See also: PetscLogState, PetscLogStateStagePush(), PetscLogStateStagePop()
External Links
- PETSc Manual:
Log/PetscLogStateStageRegister
PETSc.LibPETSc.PetscLogStateStageSetActive — Method
PetscLogStateStageSetActive(petsclib::PetscLibType, state::PetscLogState, stage::PetscLogStage, isActive::PetscBool)Mark a stage as active or inactive.
Not collective
Input Parameters:
state- aPetscLogStatestage- a registeredPetscLogStageisActive- ifPETSC_FALSE,PetscLogStateEventGetActive()will returnPETSC_FALSEfor all events during this stage
Level: developer
See also: PetscLogState, PetscLogStateEventSetActive()
External Links
- PETSc Manual:
Log/PetscLogStateStageSetActive
PetscDevice
PETSc.LibPETSc.PetscDeviceConfigure — Method
PetscDeviceConfigure(petsclib::PetscLibType, device::PetscDevice)External Links
- PETSc Manual:
Sys/PetscDeviceConfigure
PETSc.LibPETSc.PetscDeviceContextCreate — Method
dctx::PetscDeviceContext = PetscDeviceContextCreate(petsclib::PetscLibType)External Links
- PETSc Manual:
Sys/PetscDeviceContextCreate
PETSc.LibPETSc.PetscDeviceContextDestroy — Method
PetscDeviceContextDestroy(petsclib::PetscLibType, dctx::Union{PetscDeviceContext, Ref{PetscDeviceContext}})External Links
- PETSc Manual:
Sys/PetscDeviceContextDestroy
PETSc.LibPETSc.PetscDeviceContextDuplicate — Method
dctxdup::PetscDeviceContext = PetscDeviceContextDuplicate(petsclib::PetscLibType, dctx::PetscDeviceContext)External Links
- PETSc Manual:
Sys/PetscDeviceContextDuplicate
PETSc.LibPETSc.PetscDeviceContextFork — Method
PetscDeviceContextFork(petsclib::PetscLibType, dctx::PetscDeviceContext, n::PetscInt, dsub::PetscDeviceContext)External Links
- PETSc Manual:
Sys/PetscDeviceContextFork
PETSc.LibPETSc.PetscDeviceContextForkWithStreamType — Method
PetscDeviceContextForkWithStreamType(petsclib::PetscLibType, dctx::PetscDeviceContext, stype::PetscStreamType, n::PetscInt, dsub::PetscDeviceContext)External Links
- PETSc Manual:
Sys/PetscDeviceContextForkWithStreamType
PETSc.LibPETSc.PetscDeviceContextGetCurrentContext — Method
PetscDeviceContextGetCurrentContext(petsclib::PetscLibType, dctx::PetscDeviceContext)External Links
- PETSc Manual:
Sys/PetscDeviceContextGetCurrentContext
PETSc.LibPETSc.PetscDeviceContextGetDevice — Method
PetscDeviceContextGetDevice(petsclib::PetscLibType, dctx::PetscDeviceContext, device::PetscDevice)External Links
- PETSc Manual:
Sys/PetscDeviceContextGetDevice
PETSc.LibPETSc.PetscDeviceContextGetDeviceType — Method
type::PetscDeviceType = PetscDeviceContextGetDeviceType(petsclib::PetscLibType, dctx::PetscDeviceContext)External Links
- PETSc Manual:
Sys/PetscDeviceContextGetDeviceType
PETSc.LibPETSc.PetscDeviceContextGetStreamHandle — Method
handle::Ptr{Cvoid} = PetscDeviceContextGetStreamHandle(petsclib::PetscLibType, dctx::PetscDeviceContext)External Links
- PETSc Manual:
Sys/PetscDeviceContextGetStreamHandle
PETSc.LibPETSc.PetscDeviceContextGetStreamType — Method
type::PetscStreamType = PetscDeviceContextGetStreamType(petsclib::PetscLibType, dctx::PetscDeviceContext)External Links
- PETSc Manual:
Sys/PetscDeviceContextGetStreamType
PETSc.LibPETSc.PetscDeviceContextJoin — Method
PetscDeviceContextJoin(petsclib::PetscLibType, dctx::PetscDeviceContext, n::PetscInt, joinMode::PetscDeviceContextJoinMode, dsub::PetscDeviceContext)External Links
- PETSc Manual:
Sys/PetscDeviceContextJoin
PETSc.LibPETSc.PetscDeviceContextQueryIdle — Method
idle::PetscBool = PetscDeviceContextQueryIdle(petsclib::PetscLibType, dctx::PetscDeviceContext)External Links
- PETSc Manual:
Sys/PetscDeviceContextQueryIdle
PETSc.LibPETSc.PetscDeviceContextSetCurrentContext — Method
PetscDeviceContextSetCurrentContext(petsclib::PetscLibType, dctx::PetscDeviceContext)External Links
- PETSc Manual:
Sys/PetscDeviceContextSetCurrentContext
PETSc.LibPETSc.PetscDeviceContextSetDevice — Method
PetscDeviceContextSetDevice(petsclib::PetscLibType, dctx::PetscDeviceContext, device::PetscDevice)External Links
- PETSc Manual:
Sys/PetscDeviceContextSetDevice
PETSc.LibPETSc.PetscDeviceContextSetFromOptions — Method
PetscDeviceContextSetFromOptions(petsclib::PetscLibType, comm::MPI_Comm, dctx::PetscDeviceContext)External Links
- PETSc Manual:
Sys/PetscDeviceContextSetFromOptions
PETSc.LibPETSc.PetscDeviceContextSetStreamType — Method
PetscDeviceContextSetStreamType(petsclib::PetscLibType, dctx::PetscDeviceContext, type::PetscStreamType)External Links
- PETSc Manual:
Sys/PetscDeviceContextSetStreamType
PETSc.LibPETSc.PetscDeviceContextSetUp — Method
PetscDeviceContextSetUp(petsclib::PetscLibType, dctx::PetscDeviceContext)External Links
- PETSc Manual:
Sys/PetscDeviceContextSetUp
PETSc.LibPETSc.PetscDeviceContextSynchronize — Method
PetscDeviceContextSynchronize(petsclib::PetscLibType, dctx::PetscDeviceContext)External Links
- PETSc Manual:
Sys/PetscDeviceContextSynchronize
PETSc.LibPETSc.PetscDeviceContextView — Method
PetscDeviceContextView(petsclib::PetscLibType, dctx::PetscDeviceContext, viewer::PetscViewer)External Links
- PETSc Manual:
Sys/PetscDeviceContextView
PETSc.LibPETSc.PetscDeviceContextViewFromOptions — Method
PetscDeviceContextViewFromOptions(petsclib::PetscLibType, dctx::PetscDeviceContext, obj, name::String)External Links
- PETSc Manual:
Sys/PetscDeviceContextViewFromOptions
PETSc.LibPETSc.PetscDeviceContextWaitForContext — Method
PetscDeviceContextWaitForContext(petsclib::PetscLibType, dctxa::PetscDeviceContext, dctxb::PetscDeviceContext)External Links
- PETSc Manual:
Sys/PetscDeviceContextWaitForContext
PETSc.LibPETSc.PetscDeviceCreate — Method
device::PetscDevice = PetscDeviceCreate(petsclib::PetscLibType, type::PetscDeviceType, devid::PetscInt)External Links
- PETSc Manual:
Sys/PetscDeviceCreate
PETSc.LibPETSc.PetscDeviceDestroy — Method
PetscDeviceDestroy(petsclib::PetscLibType, device::Union{PetscDevice, Ref{PetscDevice}})External Links
- PETSc Manual:
Sys/PetscDeviceDestroy
PETSc.LibPETSc.PetscDeviceFinalizePackage — Method
PetscDeviceFinalizePackage(petsclib::PetscLibType)This function cleans up all components of the PetscDevice package. It is called from PetscFinalize().
See also: PetscFinalize(), PetscDeviceInitializePackage()
External Links
- PETSc Manual:
Sys/PetscDeviceFinalizePackage
PETSc.LibPETSc.PetscDeviceGetDeviceId — Method
id::PetscInt = PetscDeviceGetDeviceId(petsclib::PetscLibType, device::PetscDevice)External Links
- PETSc Manual:
Sys/PetscDeviceGetDeviceId
PETSc.LibPETSc.PetscDeviceGetType — Method
type::PetscDeviceType = PetscDeviceGetType(petsclib::PetscLibType, device::PetscDevice)External Links
- PETSc Manual:
Sys/PetscDeviceGetType
PETSc.LibPETSc.PetscDeviceInitialize — Method
PetscDeviceInitialize(petsclib::PetscLibType, type::PetscDeviceType)External Links
- PETSc Manual:
Sys/PetscDeviceInitialize
PETSc.LibPETSc.PetscDeviceInitializePackage — Method
PetscDeviceInitializePackage(petsclib::PetscLibType)This function initializes everything in the PetscDevice package. It is called on the first call to PetscDeviceContextCreate() or PetscDeviceCreate() when using shared or static libraries.
Level: developer
See also: PetscInitialize(), PetscDeviceFinalizePackage(), PetscDeviceContextCreate(), PetscDeviceCreate()
External Links
- PETSc Manual:
Sys/PetscDeviceInitializePackage
PETSc.LibPETSc.PetscDeviceMemcpy — Method
PetscDeviceMemcpy(petsclib::PetscLibType, dctx::PetscDeviceContext, dest::Ptr{Cvoid}, src::Ptr{Cvoid}, n::Csize_t)External Links
- PETSc Manual:
Sys/PetscDeviceMemcpy
PETSc.LibPETSc.PetscDeviceMemset — Method
PetscDeviceMemset(petsclib::PetscLibType, dctx::PetscDeviceContext, ptr::Ptr{Cvoid}, v::PetscInt, n::Csize_t)External Links
- PETSc Manual:
Sys/PetscDeviceMemset
PETSc.LibPETSc.PetscDeviceSetDefaultDeviceType — Method
PetscDeviceSetDefaultDeviceType(petsclib::PetscLibType, type::PetscDeviceType)External Links
- PETSc Manual:
Sys/PetscDeviceSetDefaultDeviceType
PETSc.LibPETSc.PetscDeviceView — Method
PetscDeviceView(petsclib::PetscLibType, device::PetscDevice, viewer::PetscViewer)External Links
- PETSc Manual:
Sys/PetscDeviceView
PetscContainer
PETSc.LibPETSc.PetscContainerCreate — Method
container::PetscContainer = PetscContainerCreate(petsclib::PetscLibType, comm::MPI_Comm)Creates a PETSc object that has room to hold a single pointer.
Collective, No Fortran Support
Input Parameter:
comm- MPI communicator that shares the object
Output Parameter:
container- the container created
Level: advanced
See also: PetscContainerDestroy(), PetscContainerSetPointer(), PetscContainerGetPointer(), PetscObjectCompose(), PetscObjectQuery(), PetscContainerSetCtxDestroy(), PetscObject, PetscObjectContainerCompose(), PetscObjectContainerQuery()
External Links
- PETSc Manual:
Sys/PetscContainerCreate
PETSc.LibPETSc.PetscContainerDestroy — Method
PetscContainerDestroy(petsclib::PetscLibType, obj::Union{PetscContainer, Ref{PetscContainer}})Destroys a PETSc container object.
Collective, No Fortran Support
Input Parameter:
obj- an object that was created withPetscContainerCreate()
Level: advanced
See also: PetscContainerCreate(), PetscContainerSetCtxDestroy(), PetscObject, PetscObjectContainerCompose(), PetscObjectContainerQuery()
External Links
- PETSc Manual:
Sys/PetscContainerDestroy
PETSc.LibPETSc.PetscContainerGetPointer — Method
ptr::Ptr{Cvoid} = PetscContainerGetPointer(petsclib::PetscLibType, obj::PetscContainer)Gets the pointer value contained in the container that was provided with PetscContainerSetPointer()
Not Collective, No Fortran Support
Input Parameter:
obj- the object created withPetscContainerCreate()
Output Parameter:
ptr- the pointer value
Level: advanced
See also: PetscContainerCreate(), PetscContainerDestroy(), PetscObject, PetscContainerSetPointer(), PetscObjectContainerCompose(), PetscObjectContainerQuery()
External Links
- PETSc Manual:
Sys/PetscContainerGetPointer
PETSc.LibPETSc.PetscContainerSetCtxDestroy — Method
PetscContainerSetCtxDestroy(petsclib::PetscLibType, obj::PetscContainer, des::Ptr{Cvoid})Sets the destroy function for the data provided to the PetscContainer with PetscContainerSetPointer()
Logically Collective, No Fortran Support
Input Parameters:
obj- an object that was created withPetscContainerCreate()des- name of the ctx destroy function, seePetscCtxDestroyFnfor its calling sequence
Level: advanced
See also: PetscContainerDestroy(), PetscContainerUserDestroyDefault(), PetscMalloc(), PetscMalloc1(), PetscCalloc(), PetscCalloc1(), PetscObject, PetscObjectContainerCompose(), PetscObjectContainerQuery()
External Links
- PETSc Manual:
Sys/PetscContainerSetCtxDestroy
PETSc.LibPETSc.PetscContainerSetPointer — Method
PetscContainerSetPointer(petsclib::PetscLibType, obj::PetscContainer, ptr::Ptr{Cvoid})Sets the pointer value contained in the container.
Logically Collective, No Fortran Support
Input Parameters:
obj- the object created withPetscContainerCreate()ptr- the pointer value
Level: advanced
See also: PetscContainerCreate(), PetscContainerDestroy(), PetscObjectCompose(), PetscObjectQuery(), PetscObject, PetscContainerGetPointer(), PetscObjectContainerCompose(), PetscObjectContainerQuery()
External Links
- PETSc Manual:
Sys/PetscContainerSetPointer
PetscFunctionList
PETSc.LibPETSc.PetscFunctionListClear — Method
PetscFunctionListClear(petsclib::PetscLibType, fl::PetscFunctionList)Clear a PetscFunctionList
Not Collective
Input Parameter:
fl- ThePetscFunctionListto clear
Level: developer
See also: PetscFunctionList, PetscFunctionListDestroy(), PetscFunctionListAdd()
External Links
- PETSc Manual:
Sys/PetscFunctionListClear
PETSc.LibPETSc.PetscFunctionListDestroy — Method
PetscFunctionListDestroy(petsclib::PetscLibType, fl::Union{PetscFunctionList, Ref{PetscFunctionList}})Destroys a list of registered routines.
Input Parameter:
fl- pointer to list
Level: developer
See also: PetscFunctionListAdd(), PetscFunctionList, PetscFunctionListClear()
External Links
- PETSc Manual:
Sys/PetscFunctionListDestroy
PETSc.LibPETSc.PetscFunctionListDuplicate — Method
nl::PetscFunctionList = PetscFunctionListDuplicate(petsclib::PetscLibType, fl::PetscFunctionList)Creates a new list from a given function list PetscFunctionList.
Input Parameter:
fl- pointer to list
Output Parameter:
nl- the new list (should point toNULLto start, otherwise appends)
Level: developer
See also: PetscFunctionList, PetscFunctionListAdd(), PetscFlistDestroy()
External Links
- PETSc Manual:
Sys/PetscFunctionListDuplicate
PETSc.LibPETSc.PetscFunctionListGet — Method
array::String,n::Cint = PetscFunctionListGet(petsclib::PetscLibType, list::PetscFunctionList)Gets an array the contains the entries in PetscFunctionList, this is used by help etc.
Not Collective, No Fortran Support
Input Parameter:
list- list of types
Output Parameters:
array- array of namesn- length ofarray
Level: developer
See also: PetscFunctionListAdd(), PetscFunctionList
External Links
- PETSc Manual:
Sys/PetscFunctionListGet
PETSc.LibPETSc.PetscFunctionListPrintAll — Method
PetscFunctionListPrintAll(petsclib::PetscLibType)Prints the names of all functions registered in every PetscFunctionList known to PETSc
Not Collective
Level: developer
See also: PetscFunctionList, PetscFunctionListPrintNonEmpty(), PetscFunctionListAdd(), PetscFunctionListView()
External Links
- PETSc Manual:
Sys/PetscFunctionListPrintAll
PETSc.LibPETSc.PetscFunctionListPrintNonEmpty — Method
PetscFunctionListPrintNonEmpty(petsclib::PetscLibType, fl::PetscFunctionList)Print composed names for non NULL function pointers
Logically Collective, No Fortran Support
Input Parameter:
fl- the function list
Level: developer
See also: PetscFunctionListAdd(), PetscFunctionList, PetscObjectQueryFunction()
External Links
- PETSc Manual:
Sys/PetscFunctionListPrintNonEmpty
PETSc.LibPETSc.PetscFunctionListPrintTypes — Method
PetscFunctionListPrintTypes(petsclib::PetscLibType, comm::MPI_Comm, fd::Libc.FILE, prefix::String, name::String, text::String, man::String, list::PetscFunctionList, def::String, newv::String)Prints the methods available in a list of functions
Collective, No Fortran Support
Input Parameters:
comm- the communicator (usuallyMPI_COMM_WORLD)fd- file to print to, usuallystdoutprefix- prefix to prepend to name (optional)name- option string (for example,-ksp_type)text- short description of the object (for example, "Krylov solvers")man- name of manual page that discusses the object (for example,KSPCreate)list- list of typesdef- default (current) valuenewv- new value
Level: developer
See also: PetscFunctionListAdd(), PetscFunctionList
External Links
- PETSc Manual:
Sys/PetscFunctionListPrintTypes
PETSc.LibPETSc.PetscFunctionListView — Method
PetscFunctionListView(petsclib::PetscLibType, list::PetscFunctionList, viewer::PetscViewer)prints out contents of a PetscFunctionList
Collective
Input Parameters:
list- the list of functionsviewer- thePetscViewerused to view thePetscFunctionList
Level: developer
See also: PetscFunctionListAdd(), PetscFunctionListPrintTypes(), PetscFunctionList
External Links
- PETSc Manual:
Sys/PetscFunctionListView
PetscDLLibrary
PETSc.LibPETSc.PetscDLLibraryAppend — Method
outlist::PetscDLLibrary = PetscDLLibraryAppend(petsclib::PetscLibType, comm::MPI_Comm, path::String)Appends another dynamic link library to the end of the search list
Collective, No Fortran Support
Input Parameters:
comm- MPI communicatorpath- name of the library
Output Parameter:
outlist- list of libraries
Level: developer
See also: PetscDLLibrary, PetscDLLibraryOpen(), PetscLoadDynamicLibrary(), PetscDLLibraryRetrieve(), PetscDLLibraryPrepend()
External Links
- PETSc Manual:
Sys/PetscDLLibraryAppend
PETSc.LibPETSc.PetscDLLibraryClose — Method
PetscDLLibraryClose(petsclib::PetscLibType, list::PetscDLLibrary)Destroys the search path of dynamic libraries and closes the libraries.
Collective, No Fortran Support
Input Parameter:
list- library list
Level: developer
See also: PetscDLLibrary, PetscDLLibraryOpen(), PetscLoadDynamicLibrary(), PetscDLLibraryRetrieve(), PetscDLLibraryAppend(), PetscDLLibraryPrepend()
External Links
- PETSc Manual:
Sys/PetscDLLibraryClose
PETSc.LibPETSc.PetscDLLibraryOpen — Method
entry::PetscDLLibrary = PetscDLLibraryOpen(petsclib::PetscLibType, comm::MPI_Comm, path::String)Opens a PETSc dynamic link library
Collective, No Fortran Support
Input Parameters:
comm- MPI processes that are opening the librarypath- name of the library, can be a relative or absolute path
Output Parameter:
entry- a PETSc dynamic link library entry
Level: developer
See also: PetscDLLibrary, PetscLoadDynamicLibrary(), PetscDLLibraryAppend(), PetscDLLibraryRetrieve(), PetscDLLibrarySym(), PetscDLLibraryClose()
External Links
- PETSc Manual:
Sys/PetscDLLibraryOpen
PETSc.LibPETSc.PetscDLLibraryPrepend — Method
outlist::PetscDLLibrary = PetscDLLibraryPrepend(petsclib::PetscLibType, comm::MPI_Comm, path::String)Add another dynamic library to search for symbols to the beginning of the search list
Collective, No Fortran Support
Input Parameters:
comm- MPI communicatorpath- name of the library
Output Parameter:
outlist- list of libraries
Level: developer
See also: PetscDLLibrary, PetscDLLibraryOpen(), PetscLoadDynamicLibrary(), PetscDLLibraryRetrieve(), PetscDLLibraryAppend()
External Links
- PETSc Manual:
Sys/PetscDLLibraryPrepend
PETSc.LibPETSc.PetscDLLibraryPrintPath — Method
PetscDLLibraryPrintPath(petsclib::PetscLibType, libs::PetscDLLibrary)Prints the names of all dynamic libraries in a PetscDLLibrary list to the PETSc error output stream
Not Collective
Input Parameter:
libs- the linked list of currently opened dynamic libraries
Level: developer
See also: PetscDLLibrary, PetscDLLibraryOpen(), PetscDLLibrarySym(), PetscDLLibraryAppend(), PetscDLLibraryClose()
External Links
- PETSc Manual:
Sys/PetscDLLibraryPrintPath
PETSc.LibPETSc.PetscDLLibraryRetrieve — Method
found::PetscBool = PetscDLLibraryRetrieve(petsclib::PetscLibType, comm::MPI_Comm, libname::String, lname::String, llen::Csize_t)Copies a PETSc dynamic library from a remote location (if it is remote), then indicates if it exits and its local name.
Collective
Input Parameters:
comm- MPI processes that will be opening the librarylibname- name of the library, can be a relative or absolute path and be a URLllen- length of thenamebuffer
Output Parameters:
lname- actual name of the file on local filesystem iffoundfound- true if the file exists
Level: developer
See also: PetscFileRetrieve()
External Links
- PETSc Manual:
Sys/PetscDLLibraryRetrieve
PETSc.LibPETSc.PetscDLLibrarySym — Method
value::Ptr{Cvoid} = PetscDLLibrarySym(petsclib::PetscLibType, comm::MPI_Comm, outlist::PetscDLLibrary, path::String, insymbol::String)Load a symbol from a list of dynamic link libraries.
Collective, No Fortran Support
Input Parameters:
comm- the MPI communicator that will load the symboloutlist- list of already open libraries that may contain symbol (can beNULLand only the executable is searched for the function)path- optional complete library name (if provided it checks here before checkingoutlist)insymbol- name of symbol
Output Parameter:
value- if symbol not found then this value is set toNULL
Level: developer
See also: PetscDLLibrary, PetscLoadDynamicLibrary(), PetscDLLibraryAppend(), PetscDLLibraryRetrieve(), PetscDLLibraryOpen(), PetscDLLibraryClose()
External Links
- PETSc Manual:
Sys/PetscDLLibrarySym